Three common problems encountered during Asp.net program debugging and Their Solutions

Source: Internet
Author: User

This article is intended for friends who have just started learning ASP. NET. You do not have to delay reading the article. :)

Three common problems encountered during Asp.net program debugging and their solutions:

1. the first problem is: When we create a new ASP.. Net project or open a download from the Internet. asp.. net source code project, Visual Studio. NET provides an error message: Visual Studio. net has detected that the specified web server is not running ASP. NET 1.1.

There are two solutions to this problem:

(1) There may be two reasons for the first case: First, you install Visual Studio. NET and then install IIS, so Asp.net is not registered on IIS. The second reason may be that you have re-specified the root directory of the IIS website. The solution to this problem is to re-register it. The specific steps are as follows: Windows Start Menu> program> Visual Studio. NET 2003 "->" Visual Studio.. Net tool> Visual Studio. net command prompt, and then enter it in this window, enter aspnet_regiis/I enter. After the installation is successful, you have added a folder named aspnet_client to the root directory of the IIS website, indicating that you have successfully registered it!

(2) The second case mainly occurs when we open others' ASP. net source code project appears, because the virtual address of this project may be different from the IIS website address on our own machine, another reason is that we have not created a virtual directory for this project in IIS. To solve this problem, use NotePad to open a file named *. csproj. webinfo in the project, which contains the urlpath value. We need to modify it. For example, if the value is "http: // localhost/treeviewdemos. csproj ". The first one is to change the localhost value, which should be the same as the website address of our IIS. Of course, if they are the same, you do not need to change the value. Second, if you do not want to change the treeviewdemos name, you need the IIS website to set up a virtual directory named treeviewdemos to point to it. If you have created a virtual directory with another name pointing to the project, you need to change treeviewdemos to the directory with the virtual name of the project.

2. the second problem is: When we create a new project and complete the initial work, we want to debug the project and debug Visual Studio. NET provides an error message: (An error occurred while trying to run the project. You cannot start the debugging on the Web server. You do not have the permission to debug this application. The URL of this project is in the Internet region .)

To solve this problem, follow these steps: right-click Internet Explorer and choose "properties" from the shortcut menu. On the "Internet properties" tab, select the "Security" tab. On the "please specify security for Web content in different regions" tab setting, click "Local intranet" or "trusted site"-> click "Site"-> in the "Local intranet" or "trusted site" dialog box, click "advanced"-> in the "add this Web site to Region" box, enter the project URL, and click "add ", click "OK"-> click "OK" to close the "Local intranet" or "trusted site" dialog box-> click "OK" to close the "Internet Options" dialog box.

3. The third problem is that Visual Studio. NET gave an error prompt during debugging: An error occurred while trying to run the project. The debugging cannot be started on the Web server. Debugging failed because integrated Windows authentication is not enabled.

To solve this problem, right-click "Internet Information Service" and choose "properties" from the shortcut menu. In the "properties" dialog box, select the "Directory Security" tab-> in the "Anonymous Access and authentication" section, click "edit". In the "authentication method" dialog box, select "Integrated Windows Authentication ".

Of course, after the preceding error dialog box appears, you can click the Help button in the dialog box to obtain the msdn help information.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.