asp.net| problems using Vs.net's friends can often encounter situations where you can't debug asp.net, and some friends give you some practical solutions. To sum up, the following aspects are generally included (Please note: Here is a discussion about local debugging solutions):
-Determine if the current user has been added to the Debugger Users group
-Determines whether the current user has administrator permissions
-The Allow debug ASP.net property in the Web Application project properties is set to true. You can also implement this by modifying the Debug property of the compilation element of the Web.config file to true.
needs to be explained that the operating system required for local debugging asp.net applications is Windows Professional, Windows Server, Windows Advanced Server, Windows XP Professional and Windows Server 2003. In other words, we can't debug on Windows XP home,windowsme and Windows98. Crap )
in general, some of the above solutions can basically use the debugging work we run asp.net. There are really problems by trying to use it. NET from the aspnet_regiis. EXE to reconfigure IIS, it should be OK.
However, this article would like to discuss with you how to debug without the permissions of the local administrator asp.net. At first sound, does it feel unnecessary? But if you think about it, you will realize the necessity of doing so. The reason is simple, in most management more formal software companies, developers are generally not granted permissions to the local administrator, so how to debug the asp.net application without the permissions of the native administrator is the first problem to be solved. To this end I looked up some information (mainly MSDN Online), and summed up a feasible solution, I hope to share with you. Test environment: Windows XP Professional SP1, Vistual Studio. Net 2002.
First, add the currently logged-on user to the Debugger Users group (in addition, this user should be at least the Users group.) In most cases, developers will be granted Power users permissions. By the way, if you want this user to be able to maintain a Web virtual directory, you need to add this user to the VS Developers Group. Of course, this has nothing to do with whether you can debug asp.net applications.
then, according to Microsoft, if this user wants to debug the ASP.net application under Windows XP Professional, it will also need to add the user to the "Log on as a batch job" policy (of course, Other versions of Windows that support debugging asp.net do not need this setting, so you can debug. You can join this user in the "Security settings-> Local policy-> User Rights Assignment-> as a batch job" section of the Control Panel-> Administrative Tools-> Local Security Settings tool. Unfortunately, the results are not as relevant as Microsoft's documentation says, and they can be debugged after they are set. After a period of research, I found the answer from an article in MSDN online. I'm sure you all know that by default, aspnet_wp. The EXE process runs as a Web server with the user name ASPNET. In this case, how we want to debug the Web application, we must have native administrator permissions. This is why we have not yet been able to debug the reason. So how do we solve this problem? NET provides an alternative solution for asp.net users, and we can make aspnet_wp. EXE runs as a worker process under a specified user, at which point the specified user can be debugged as long as it belongs to the Debugger Users group. Finally saw the dawn of victory.
So, how to make aspnet_wp. EXE to run under the specified user account? The answer is to configure the related configuration items for the Machine.config file. Take vs.net2002 as an example, this file is located in C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\CONFIG. All we have to do is find processmodel configuration items and modify the username and Password properties. Note that if you are using a domain user, please fill in the <domain>\username. Then, locate the temporary asp.net Files properties directory, which is located in the same directory as the Config directory. Select "Property-> Security-> Advanced" in the right-click pop-up menu, and the "Temporary Advanced security settings for ASP.net Files Properties" dialog box pops up. In the Permissions tab, click the Add button to add the specified user to the "Permission entries" list. Restart your computer and you are done. Note: The above operation requires native administrator permissions, which requires the support of the system administrator.
feel, it should be relatively easy to configure. If you have any deficiencies, please advise.