Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are some problems in Asp.net debugging

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly explains "what are some problems of Asp.net debugging". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what are some of the problems of Asp.net debugging"?

The cause is this: when the machine was running IE, it faked death. I was unhappy with it, so I started it without saying anything. As a result, something happened.

When I reopened the project I was working on in Vs2003.Net, there was no response for a long time, and the machine became extremely slow. Of course, out of professional sensitivity, I immediately came to Ctrl+Alt+Del. This is not good. CPU occupies 100%, keeps high, runs IE, and does not respond for a long time. First instinct, are you hit?

Speed first, shut down and restart, immediately open KV2006 genuine antivirus software, kill again, nearly 2 hours of torture, my machine is clean, there is no shadow of cancer (absolutely no porn, I am a good youth)! Is that what happened at first? Then called a Ctrl+Del+Alt to check the task manager to see if there were any "aliens" invading our territory. I saw that the task manager windows was relatively watery on Baidu, so I went to an aports that was said to be more arrogant to analyze the process. At first, it was suspected that svshost.exe had been raped! (many articles say that win2000 has only 2 of this thing, but mine walked out of three.) if you close him, the CPU is still 100%, all the processes are shut down, and the result is the same.-so the first possibility: the possibility of being hit by the machine is ruled out!

Since there was no hint at the beginning, only CPU was tortured, but it was normal to open vs2003, I tried to open other projects and it was normal! Is there something wrong with my program? Without saying a word, get yesterday's backup program out (this is working normally), rename the current source file, get the backup in (I often do this, there is nothing wrong before), restart, open project, the problem remains. The second possibility: the possibility of something wrong with the program is also ruled out!

Is this how to be tortured? I posted a post for advice on CSDN, but I didn't get a good solution. You can't wait forever!

Some netizens said that they used an agent to surf the Internet and caused this problem. I haven't used an agent to surf the Internet again. Some netizens said that it was the CPU resource problem caused by some BT and electric donkey. I denied it without saying a word. Xiao Sheng, I never use BT electric donkey. Another netizen posted that he asked me to turn off the SMTP virtual server and then start it. I tried it according to his method, but it still didn't work! What about the new project? I didn't think of this method at the moment. I could just build a new project and reference the original code. A thought flashed through my mind, opened Vs2003.Net, built a new project, KAO, finished, no movement, dead. I took another look at Ctrl+Alt+Del. CPU100% needless to say, a straight line is running in front of my eyes.

I'm starting to wonder if IIS is in trouble. Found that it is not possible to open the original project under IIS, CPU unexpectedly occupies 100%! Anyway, we're all going to die. We won't know until we do it. So, restart the machine, and I delete the virtual directory that IIS automatically corresponds to when I built the original project, and create a new project with a different name, which leads to a new problem:

Unable to find script library: / aspnet_client/system-web/v1.14322/webuivalidation.js

This problem is not difficult and easy to solve:

The method is:

Click start → to run: C:\ winnt\ microsoft.net\ framework\ v1.14322\ aspnet-regiis-c

OK

This problem is solved, and I think I should name the current project as the original project name, so re-quote the original code, it should be able to solve it! Cut the crap and talk about the action-the result! no way! Back to the original CPU100%.

Depressed, make myself a little angry! Turn off the phone and restart it for the 48th time. I opened VsNet2003 again. I was in despair. Anyway, I had to see how to die. I opened the project and waited for him to run CPU to see what the final result was! Run like a snail (there is a text prompt in the status bar, such as "opening the web server). After about 30 minutes (I've had two cups of tea), a dialog box pops up:

Visual Studio cannot create or open the application because the web server is not running on this computer. Please start the Web server before continuing with the next step

This is bullshit, my IIS is obviously open! In the case of CPU100%, I had the patience to reopen IIS and restart IIS. At the same time, there are hundreds of related materials on another machine, and some people say that they want to set the access permission of the wwwroot folder to everyone, which doesn't work, because my folder is already shared (of course, it may be for a different problem). The method is:

Permission problem, maybe the asp.net user does not have a write operation to wwwroot.

Solution: try:

Control Panel-Administrative tools-computer Management-Local users and groups

Then add the aspnet user to the administrators group.

After such an ordeal, I simply rebooted the machine again to see if there were any new adverse reactions to the VS2003.Net. Hey, it really happened.

New error prompt.

Home directory of IIS default website; local path setting

Set to "C:\ Inetpub\ wwwroot". On the local area network, clients can access it with "http://localhost/Mydir/index.aspx"." To make it easier for clients to access, I set IIS by default

Confirm that the home directory > local path of the website is set to "C:\ Inetpub\ wwwroot\ Mydir". At this point, the client can access it with "http://localhost/index.aspx"." But I'm here.

When the VS.NET 2003 development environment opens this project (MyWeb), the following problems occur:

Unable to get the project file from the Web server. Unable to open Web project MyWeb. File path "C:\ Inetpub\ wwwroot\ Mydir" and URL

"http://localhost/Mydir" does not match. Both need to be mapped to the same server location.

HTTP error 404: Not Found

There are two more options:

What do you want to do:

1 retry with a different folder sharing path

two。 Try to open the project through the FrontPage server extension

I think this problem should be a problem on the virtual path. Facing the path prompted by it, I opened IIS and found that the default site path C:\ Inetpub\ wwwroot\, and the path of my project is also correct. Inadvertently found that CPU does not account for 100%, it seems that the original problem is solved, but the new problem comes out again, that is, there is no discount, first CSDN the community to see if there are similar problems, fortunately, a lot of methods

Method 1. Go to IIS- > default website-> right click "Properties"-> Directory Security-> Authentication and access Control-> Edit-> change your anonymous login account to Administrator and enter your password

I tried this, but it didn't work.

Method 2: reinstall IIS

Open the Windows components wizard.

Click Application Server in components, and then click details.

In the Application Server dialog box, under subcomponents of the application server, click Internet Information Services (IIS), and then click details.

In the Internet Information Services (IIS) dialog box, under subcomponents of Internet Information Services (IIS), do any of the following:

To add optional components, select the check box next to the component you want to install.

To delete an optional component, clear the check box next to the component you want to delete.

Click OK until you return to the Windows components Wizard.

Click next, and then click finish.

I'll save this for last use.

Method 3: select "File" menu-- > "Open Project on Web", then find the disk where you put the project (such as e:\ webfile), and open the .vbproj extension (the same for cs projects). Note: do not open .sln.

Then regenerate the solution.

I tried this, but it didn't seem to work, because the new project didn't work, and the original one couldn't be opened.

That's how I solved it.

Method 4:

A:1 . Open the IIS Manager.

two. Right-click "Default Web Site" and select Properties.

three. Click "Http Header".

four. Click "MIME Types".

five. Click "New".

six. In Extension, enter ".tmp". (no quotation marks required)

seven. In MIME Type, enter "Temp". (no quotation marks required)

Alas, after doing it for a long time, we finally got it! We are puzzled by some mistakes in VS.net2003. In order to make you have some tricks in the face of these problems, I have searched out some common problems by the way. Dismissal is helpful to you.

Problem 1: unable to create web application

Source: http://dev.csdn.net/develop/article/19/19725.shtm

1. When the home directory of the site does not create an application:

To establish WEBAPP by means of FP extension + virtual directory, the steps are as follows:

(1) right-click the site-- all tasks-- configure the server extension

(2) create a virtual directory and configure the application

(3) create a WEB project in VS, which is also named *.

(4) establish WEB through FP extension

2. When the home directory of the site creates the application:

The first method-- FP extension:

(1) right-click the site-- all tasks-- configure the server extension

(2) set up a WEB project in VS and choose its own name.

(3) establish WEB through FP extension

The second method-WEB sharing:

(1) change the IP address to all unassigned in IIS

(2) change the address to 127.0.0.1 or LOCALHOST

3. If it cannot be established, try the following methods:

(1) "site"-right-click-"Properties"-"all tasks"-"recalculate hyperlinks on Web"

Then create it through the frontpage server extension under vs.net

(2) indicates that you want to access the project files on the Web server directly through file sharing; you do not need to install the FrontPage server extension on this server.

When you install Visual Studio .NET, a user group of "VS Developers" (VS developers) is created and granted read / write permissions to the inetpub\ wwwroot folder. Anyone who wants to create a Web project using file sharing on your computer needs to be added to the "VS Developers" (VS developers) user group. The new "VS Developers" (VS developers) group does not have any members, so even users who install Visual Studio must manually add themselves to this group.

If you do not want to install Visual Studio on the server, you can install only the server components through the Visual Studio installer to create the "VS Developers" (VS developers) group.

(3) under win2003:

In VS.NET, to test URL and UNC, VS.NET generates a .tmp file under the directory and then makes a request for it through HTTP. However, in IIS 6, the tmp file is not registered for security reasons, and by default, it will be block and then generate a HTTP 404 error.

To solve this problem, please refer to the following methods:

one. Open the IIS Manager.

two. Right-click "Default Web Site" and select Properties.

three. Click "Http Header".

four. Click "MIME Types".

five. Click "New".

six. In Extension, enter ".tmp". (no quotation marks required)

seven. In MIME Type, enter "Temp". (no quotation marks required)

Another solution is that you can use the following command line:

% systemdrive%\ inetpub\ adminscripts\ adsutil.vbs set w3svc/1/root/MimeMap .tmp, temp

When creating a Web Application, VS.Net needs to create a temporary file with the suffix .tmp under the creation path.

When VS.Net has created the project, it will look for project files from the Web folder in HTTP, as well as temporary files. Because the IIS of windows2003 did not set the .tmp file to type MIME in some installation steps, IIS returned an error of unknown file type to VS.Net, that is, the file could not be found. So VS.Net thinks your IIS path is set up incorrectly.

Problem 2: aspx project cannot be debugged

Causes and solutions

1. A debugging process has been started (two projects are open at the same time, and one is already debugging): only one can be started at a time

2. Debug= "false" in configuration file: change it to true

3. The application is not created in the virtual directory (or the name is empty): click "Application" in the virtual directory properties to create.

4. Configure the project as Release: click menu "build"-configure, and select "debug"

5. "you do not have the right to debug the server": modify the security settings of IE and "automatically log in with the current user name and password"

Problem 3: the Automation server cannot create objects

Causes and solutions

1: modify the registry ([HKEY_LOCAL_MACHINE\ SOFTWARE\ Classes\ CLSID\ {0D43FE01-F093-11CF-8940-00A0C9054228}\ ProgID]

@ = "Scripting.FileSystemObject"), change FileSystemObject to an arbitrary name

two。 Run Regsvr32 scrrun.dll

Problem 4: unable to start debugging on the Web server

Causes and solutions

Does the 1.Web application have a Web.config file? is the Web.config file by setting the debug property to true?

two。 Are you a member of the Debugger users (Debugger Users) group?

3.IE Internet options-> Security-> Intranet- > Custom level-> user authenticated "automatically log in with the current user and password

Question 5:

The Web server reported the following error: "Http/1.1 400Bad request

Causes and solutions

1. There are two ip addresses. So localhost made an error. Just change the ip address in iis to "all unassigned".

two。 The first step is to re-register Asp.net with IIS and run the following command: aspnet_regiis-I

Step 2: go to IIS Manager, change "default website"-"Properties"-"site", change "IP address" to "(all unassigned)"; click "WEB Service extension" and change "ASP.NET v1.1.4322" to "allow".

Question 6: Microsoft Visual Studio .NET 2003 cannot open an existing ASP.NET 1.1Web project under the following circumstances:? Set ASP.NET 1.1 to prohibited in the Web Service extensions list.

-and-

Set ASP.NET 1.0 to allow in the Web Service extensions list.

And-

The computer is running Microsoft Windows Server 2003.

When you try to create a new ASP.NET 1.1 project, you may receive the following error message:

Visual Studio .NET has detected that the specified Web server is not running ASP.NET version 1.1.You will be unable to run ASP.NET Web applications or services.

Causes and solutions

Please change the status of ASP.NET 1.1 to allow in the Web Service extensions list in IIS 6.0. To do this, follow these steps: 1. Click start, point to programs, and then click Control Panel.

two。 Double-click Administrative tools, and then double-click Internet Information Services (IIS).

3. Click Web Service extension.

4. In the details pane, click ASP.NET v1.1.4322 in the Web Service extensions list.

5. Click allow to change the status from prohibit to allow.

If your IIS is not version 6. 0. You can use the following methods:

-start-all programs-Microsoft Visual Studio. NET2003-Visual Studio.net tools-Visual Studio .NET 2003 Command prompt

After opening the Cmd command window above, type: aspnet_regiis / I

Question 7: try to open the web project, and the web server reports the following error: http/1.1 500Internal server error

Causes and solutions

1. Use agents to surf the Internet

2.regsvr32 script.dll

3. Step 1: use the add / remove program to reinstall the FRONTPAGE extension service in the IIS component.

Step 2: go to administrative tools, INTERNET options, default site, right-click properties. Home directory. Check the write permission and click create. Confirm

4. Run Regsvr32 scrrun.dll

Question 8:

Vs.net has detected that the established WEB server is not running ASP.NET1.1, and you cannot run ASP.NET WEB applications or services

Reasons and solutions:

1. Reason: delete the "default web site" in IIS and build a new site, which runs normally, but cannot be compiled or created, and there is a non-1.1 version error. The previous error is because the server uses a fixed IP, and the administrator takes the IP address in the attribute as the specified ip address.

Solution: 1. Of course, make sure that version 1.1 is really installed, check the path C:\ WINNT\ Microsoft.NET\ Framework\ v1.1.4322, reinstall aspnet_regiis, and make sure that your "Internet Information Service" uses the "default web site" and that the IP address in its properties is "(all unassigned)" instead of the ip address you have specified. If IE uses a proxy, check Bypass Proxy Server for local adresses.

Also: parameters of aspnet_regiis

Problem 9: http redirect request failed

Reason: whether to use Forms verification in the program, and modify the relevant verification settings in web.config

Question 10: when vs.net develops a new asp.net project, it prompts "cannot establish a connection with the server."

The problem with IIS

Run C:\ WINDOWS\ Microsoft.NET\ Framework\ v1.1.4322\ aspnet_regiis.exe-I

Problem 11: an error occurred while trying to run the project: unable to start debugging on the web server. Failed to start Asp.net or Atl Server debugging

Explain and explain

Http://support.microsoft.com/?scid=kb;zh-cn;318465

Run in the DOS command window

Enter WINNT\ Microsoft.NET\ Framework\ v1.1.4322

Cd C:\ WINNT\ Microsoft.NET\ Framework\ v1.1.4322

Execute aspnet_regiis.exe / I

Problem 12: an error occurred when VS 2003 created a new project: the VC package is not available or is not registered

To solve this problem, you need to run the Visual Studio .NET hotfix. Because the fix forces the registration of items that are not registered in the installer, it can solve this problem more effectively.

Follow these steps to run the fix:

At the beginning, point to Settings, click Control Panel, and then click add / remove programs; in the list of installed programs, click Visual Studio .NET, and then click change / remove; click the second item in the Visual Studio .NET installation dialog box 123 project

Click "repair / reinstall" and follow the on-screen prompts.

More relevant information: ways to reproduce the problem

To recreate this problem, it is best to have two operating systems installed on separate partitions, and two Windows XP Professional will do this.

1. Install Visual Studio .NET under an operating system.

2. Under another operating system, Visual Studio .NET, change the default installation path during installation to match the path of the first installation. (both installation results will be declared successful)

3. Then start the second installation of Visual Studio .NET (you will find a recurrence of this problem).

This form of installation is never recommended, even if the two installation options are exactly the same, and you will save disk space, but there is a good chance of potential problems. If one Visual Studio .NET changes file and registration options, those changes are not recorded in another Visual Studio .NET, creating a potential risk of unpredictable results.

In addition, if you reinstall the system and then reinstall VS.NET to the same directory before reinstalling the system (the original files in this directory are not deleted), the error message "VC package is not available or not registered" may also appear!

Problem 13: error trying to run the project: unable to start debugging on the Web server

Problems and solutions:

1. Debug ASP.NET project

Check whether the project has a valid Web.config file, whether the Web.config file has "debug" set to "true", and whether the debug predicate is associated with .aspx.

two。 Debug ISAPI application

Debugging ISAPI applications requires special attention to the setup steps. The general steps for debugging preparation include:

Create a solution for the server application with the option to run the service interactively.

Set permissions in the user Manager. You must log out and log back in for permissions to take effect.

Stop and restart the service.

three

Step1:. Integrated window authentication

Right-click my computer-> Administration-> Services and applications-> Internet Information Services Manager

-> Web site-> default Web site-> Properties-> Directory Security Tab-> Authentication and access Control Block-> Editor-> check Integrated windows Authentication (for win2003 systems, other systems are roughly the same)

Step2. After integrated authentication, use the following windows user accounts for anonymous users

The user name is the machine name\ IUSR_ machine name, and the password system is automatically added. This user belongs to the Guests user group and cannot be changed.

Anonymously access the built-in account of the Internet Information Service

Step3. Login users belong to Debuger Group group and Adminstrator group (debug permissions and full control of files), ASPNET users belong to Administrator group (permissions to manipulate apsx files)

Step4. Automatically log in with the current user name and password in IE (login is valid only if you log out)

Tools-> Internet options-> Custom level-> automatically log in with current username and password

Step5. Check whether the keep HTTP connection check box is selected, and if not, check it.

Step6:. No application was created

Control Panel-> Administrative tools-- > Internet Information Services-- > find your project

-- > attribute-- "Virtual directory option, there is one below and one after that."

To see whether to create or delete, if it is created, click the button to delete, and then save.

Question 14: the web server reports the following error. Unable to resolve server name and address

I checked the relevant information, found that this is not the problem of Vs.Net, but your system problem, there is such a case: when the network connection is unblocked, this error will naturally disappear, of course, you first check the web.config in your program to see if there is an external IP address or URL, and check whether the database is connected to the external network. Take a look at the virtual path in the CSPROJ file again. If there is nothing wrong with these, it can only be your system that has a problem.

Problem 15: Visual Studio .NET cannot create or open an application. The problem is most likely because the required components are not installed on the local Web server. Please run Visual Studio .NET installer and add Web development components

Reason:

This is mainly due to the fact that the path of the virtual directory established in IIS is different from the real path in the project, and we can solve this problem.

Find the csprojl.info file in the project and the sln file first, open it with notes, and check the first three lines of the two files. There must be a path to a virtual directory in the middle. First of all, we have to make sure that the path in the two files is the same. Then open IIS and create a new virtual directory according to your path in csproj.info and sln.

Problem 16: Visual Studio .NET was unable to create or open the application. The problem is most likely due to the fact that the required components are not installed on the local WEB local server. Please run Visual Studio .NET installer and add WEB development components

Reason: usually when you copy from another machine or from another place to your own machine to open the project, this error occurs, mostly because it is not placed in the default root directory of iis, that is to say, you may not have established a corresponding virtual directory, of course, this problem will also occur if you do not reference related components in the project.

Here are the general methods found on the Internet:

1. Confirm that IIS is installed. One way to do this is to open Control Panel and select Internet Service Manager. If you have installed IIS, you will be able to use this utility to stop and start it.

If IIS is not installed, on the Windows Control Panel, select add or remove programs, and then select add / remove Windows components. In the list, select Internet Information Services (IIS) and continue with the installation. See the Windows help for more information.

Security instructions when installing IIS, it is strongly recommended that you secure the Web server computer. For more information, see the file WebServer.htm that belongs to the installation documentation. The location of the file on the installation CD is Disk1\ Setup\ WebServer.htm. After installing Visual Studio, you can also find this file on your hard drive at% install%\ CSetupMM\ WebServer.htm.

two。 Install or reinstall the .NET Framework. Run the Visual Studio.NET installation and select option 1 "Windows component updates".

Note that you can skip this step if you determine that the current version of .NET Framework is installed on the Web server computer.

3. Open the run window of Windows and type the following to enable ASP.NET:

Aspnet_regiis.exe / i

Prompt you to open the command window directly from the correct directory of the command. From the Windows start menu, point to programs, Visual Studio .NET 2003, Visual Studio .NET tools, and then choose Visual Studio .NET Command prompt. When the window opens, type aspnet_regiis / I.

4. Install the Visual Studio .NET server components.

a. Run the Visual Studio .NET installation again and select option 2 "Visual Studio .NET".

Tips you can run the installation from the Control Panel by selecting add or remove programs, select Microsoft Visual Studio .NET (the name will vary slightly depending on the version and language installed), and then click change / remove.

b. Select add or remove Features.

c. Open the Server components node and select Web Development.

d. Click Update now!

5. Perform a security lock on IIS, but then enable ASP.NET.

If you are using IIS 5.0 running on Windows 2000 or Windows XP, you can use the IIS locking tool (version 2.1).

Question 17: the project you are trying to open is a local project. You need to open it by specifying its file path.

Solution: create a new project and add all the folders in the current project to the new project.

Question 18: tip: "cannot start a project with a class library output type directly, please go to the debug tab under configuration settings in the project properties" is set to start an external program or start URL. Another way is to add a non-library project referenced by this project to the solution and set it to start.

Reason: the solution contains two or more projects, no startup project is set, or files that are not supported in the startup project are set. Only web project, Form project, and Console can start the project.

Resolve:

Method 1: menu-> Project-> attribute output type changed to Windows application

Method 2: solution Explorer-> right-click-> set Startup Project

Question 19:

In VS.NET 2003, press F5 to run the ASP.NET project, and a dialog box with an error message pops up as follows:

Error while trying to run project: Unable to start debugging on the web server. You do not have permission to debug the application. The URL for this project is in the Internet zone.

Solution:

This problem cannot make an exception. The cause of this problem is likely to be a permission problem. When you encounter a situation that cannot be debugged, you can try to do the following two steps

1. IE browser-> Internet options-> Security-> Internet Custom level-> user Authentication-> Log in: automatically use the current user name and password

2. Right-click on the project in solution Explorer, select "Properties", select "configuration Properties" / "Debug" in the open window, and change "enable ASP.NET debugging" to "Ture"

Query the parameter aspnet_regiis / all under the vs.net command prompt of the vs.net vs.net tool of the program

That's all for the time being. I hope it will be useful to all of you if we add it later.

There are also some related things on MSDN, put up for you to see that when you encounter problems, it will be of some help to you.

Web Project and Source Code Management Integration in Visual Studio .NET

Http://msdn.microsoft.com/library/chs/default.asp?url=/library/CHS/sccvs70... Ntrolintegrationinvisualstudionet_convert.asp

Q: unable to start debugging, catastrophic errors (common errors when debugging ASP.NET applications in Visual Studio .NET)

A: http://support.microsoft.com/?id=306172

The problem that ASP.NET can't debug and its solution

The most common one is that ASP.NET cannot be debugged: the browser starts normally and the code runs properly, but breakpoints are invalid.

1. This is mainly due to the setup of IE browsers. Script debugging is not allowed in IE6 IE7's default advanced option, but script debugging is disabled in IE8.

If script debugging is disabled, the above situation occurs, that is, the browser starts normally and the code runs normally, but the breakpoint is invalid.

In my impression, it seems that this is only related to js debugging, and now it is also related to ASP.NET debugging.

two。 Another possibility that this debugging error occurs is that the ASP.NET debugger is not used in the project's options. Just tick ASP.NET on the property page = "Startup options =".

Thank you for your reading, these are the contents of "some problems in Asp.net debugging". After the study of this article, I believe you have a deeper understanding of some problems in Asp.net debugging, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report