After the configuration is complete, deploy your webpage on iis, right-click the website and choose add website (the physical path here must include the web. config directory): Then select Browse *: 8081 (http) in the Operation column. Then, right-click the newly created website wpf and select Edit permission, the "project folder properties" dialog box appears. Select the Security tab. Click "advanced". Click "Change permission". Then, add the folder to the store (enter "a" in the object name, and click "Check name ): authenticated users will appear. Select and click OK. Then confirm and select full control. Then, always confirm! After completing the preceding steps, log on to the iis manager and select Browse *: 8081 (http ). Then your webpage is successfully deployed! Note: Check the web page for authentication (in which anonymous authentication must be enabled): In addition, When you select f5 to debug the source code of other people's web pages, the following will appear: the Section registered as allowdefinition = 'machinetoapplication' outside the application level is incorrect.
Cause: this error may occur if the virtual directory is not configured as an application in iis. There are many answers to this question on the Internet. Some people may be able to solve this problem according to that method. However, after my exploration, I found that when adding a virtual directory to iis on the internet, you must add the web. config. Sometimes a website project contains many folders, including database tutorials and code. Assume that your web. config file is in the wpf folder. When you add a virtual directory, select the wpf folder.