Problems with the Asp.net debugger and related solutions

Source: Internet
Author: User
Tags dedicated ip

Message 1: Debugging cannot be started on the server (unable to start debugging on the Web server)

Cause 1: Iis Application Program Enable the Windows Integration authentication option.

Cause 2: Check the "keep HTTP Connection" option in IIS to make sure this option is selected.
Message 2: you do not have the permission to start debugging on the server (You do not have permission to debug the server)

Cause 1: Make sure that the windows integrated AUTHENTICATION option is enabled.
Cause 2: If you have enabled the Windows Integration authentication option, make sure that your user account has full control over the IIS directory.
Cause 3: If your web project uses the full machine name as the project name (machinename. domainname. something), then this web site will be considered as an Internet site, so the default settings of IE will affect the login status. In this case, you need to allow you to log on using the current user account in the Internet area set by IE; this is not the default setting of IE, so you 'd better use your machine name as your project name!

Message 3: server side error (server side-error occurred on sending debug HTTP request)

Cause 1: Your Web application may not have an application name. To solve this problem, you must use iis mmc to assign an application name to your web project;

Cause 2: If you are using the NTFS file system, make sure that the ASPNET account has the appropriate read and write permissions for the wwwroot or your application folder.
Message 4: The current project is not configured to allow debugging (the project is not configured to be debugged)

For this error, make sure that your web is configured as debugging. To complete this task, set DEBUG = true in Web. config.
Cause 1: Asp.net debugging is not enabled in project properties;

Cause 2: Make sure that the expected dll has been loaded into the corresponding debugging symbol file. You can check
Message 5: the debugger may not be installed)

If you encounter such a problem, check the debugging function in the console application project. If the error message shown in the figure is displayed in the console application project, it means that your. NET Framework has not been fully installed.

Run the "regsvr32 mscordbi. dll" command to manually register your "mscordbi. dll" file.
Message 6: the server does not support Asp.net or ATL server application debugging.

If you are using Windows XP Pro or Win2000 pro, you may have to think about installing. net sequence problem; if you install. if you install IIS only after net, you will encounter this error. In this case, you need to run the "aspnet_regiis.exe-I" command to register "aspnet_isapi.dll"
Message 7: access is denied. Check whether you are a system administrator or a member of the... group (access is denied. Verify that you are an administrator or a member ...)

Your account may not be a member of the local debugger Users Group. Adding your account to this group can solve this problem;
Message 8: unable to start ASP. Net or ATL server debugging

Cause 1: You may have installed IIS Lockdown. If so, find the URLScan. ini file and add the debug (case sensitive) field to [allowverbs ].
Cause 2: If you are using domain controller as your server and your project uses the machine name instead of the complete domain name, you may need to change the URL of your project to use the complete Domain Name
Cause 3: If your IIS is set to use a dedicated IP address as the web site identification, you will encounter this error; in this case, you need to change your project name to use the IP address directly as the project name. For an existing project, you need to edit the. sln file and. webinfo file to change the project name to IP address.
Cause 4: The Message 9: Access Denied

Cause: You may be a member of the debugger Users group, but you do not have the permission to debug the ASPNET workflow because you are not a member of the ASPNET user account or administrator group. Add your user account to the Administrator Group of the machine to solve this problem.

Unable to debug an extended File
In aspx, you cannot debug a sorted ded file. A sorted ded FIE is usually the result of your switching from ASP project to Aspx. If you use <! -- # Include file = "file name" --> include file. You may not be able to correctly debug the include file. You need to <! -- # Include virtual = "file name" -->.

When changing your password, you need to perform log off/log in for ASP. NET debugging.
After Win2000 SP4 is installed, ASP. NET cannot debug and reports the following error: "Access Denied"
Solution: run the "regsvr32-I aspnet_isap.dll" command to re-register aspnet_isapi.dll.
You can only stop at the breakpoint when the page is loaded for the first time (hit breakpoint)
There may be several different causes for this problem, but the most likely cause is that you are on the web. the page cache option is used in the config file. <add key = "<your web project name ". web. enablepagecache "value =" true "/>. You need to set value to false to disable the web page cache. After changing this setting, you should be able to stop at the breakpoint;
You need to share a Web server for debugging, but do not want other users to manage it on this machine.
In vs. net, there are two things that determine whether a user can debug. One is the debugger Users group, and the other is the user permission, such as administrator, power user, or sedebug.
The debugger Users Group determines whether users can access the vs debugging module (mainly the mdm-machine debug manager, a part of VS). Therefore, as a member of this group, you are granted the permission to access the MDM, therefore, you can debug your open process and view the process list on your machine.
However, whether or not you can debug processes of other users depends on your permissions. For example, if you want to debug native processes of other users ), you must have the sedebug permission. For managed processes of other users, you must be the administrator of the machine!
Due to these constraints, students must be promoted to administrators. If they do not, ASP. NET workflow cannot be debugged by default.

General debugging)
These situations are based on the console application type
Message 1: Debugging cannot be started.

This problem occurs because mscordbi. dll is not correctly registered. You can solve this problem by registering the file again.
Message 2: access is denied because debugging cannot be started.

Make sure that the machine debugger Manager Service is correctly started and you are a member of the debugger Users group or administrator
I can start managed debugging, but PDB is not loaded, so I cannot set any breakpoint
If the debugger runs correctly but you have not stopped at any breakpoint, you may need to check the installation of diasymreader. dll. This file may not be registered. You need to do this:
Regsvr32 <path to DLL> \ diasymreader. dll
Managed debugging cannot work
When you attach a process to a natural process in CLR mode and the process has not created a CLR object, managed debugging will not work.
Solution 1: In CLR Code This process is used before being attached to it.
Solution 2: Use InterOP mode to attach to the process. In this case, you do not need to attach the process after the CLR code is called.
The managed debugger does not respond.
When you start debugging for hosted code, the debugger does not respond
Solution: confirm that the. NET Framework support service is stopped and disabled (it is not enough to stop the service only)
If you do not have. NET Framework support running, disable the IIS Admin Service.
Incorrect stepping result for C # code
Take a look at the following code:
String somestr;
Somestr = "somevalue ";
If (somestr = NULL)
Console. writeline ("what's up? ");
Try
{
}
Catch (exception E)
{
}
If you use step for this code, you will find that when you enter the "if" Statement, the instruction pointer (Instruction Pointer) will be moved to the console. writeline ("what's up? ");
This is not a debugger bug, but it is a problem for debugging information of try catch blocks. Let's look at the decompilation code in the following example:
If (somestr = NULL)
2017002a cmp dword ptr [ebp-18h], 0
0000002e JNE 0000003c
Console. writeline ("what's up? ");
00000030 mov ECx, dword ptr ds: [01c50070h]
00000036 call dword ptr ds: [02f0257ch]
2017003c JMP 00000048
Catch (exception E)
2017003e mov dword ptr [ebp-1Ch], eax
00000041 call 762c0846
00000046 JMP 00000048
}
00000048 NOP
When the value is not true, the command pointer is moved to the line 003c JMP 00000048, but this line of error corresponds to the statement block of the IF statement. When the execution result is correct, the debugging process is incorrect!

Causal debugging: stepping between the Web service client and the Web Service (Stepping)
You cannot access the Web service from the Web service client for debugging.
By default, you are not allowed to access the Web service from the Web service client.
The ASPnet workflow works under the "ASPnet" or "Network Service" user account. These accounts do not have the permission to access MDM through DCOM. Therefore, you need to add these accounts to the debugger Users Group.
After the Web Service (impersonation of Web Service) can be assumed, you cannot perform a causal step.
You need to do the following to correct the steps between the client and the service
1. Disable Anonymous Access to IIS
2. Change the client code and set a security certificate (Credential) to WebService.
Service1 OBJ = new service1 ();
OBJ. Credentials = system. net. credentialcache. defaultcredentials;

Debugger Suspension
If your web service client code runs in a single thread apartment model and
Wait for an asynchronous call to complete, as shown in the following code:
Single thread apartment
Service1 OBJ = new service1 ();
System. iasyncresult AR = obj. beginhelloworld (new system. asynccallback
(Class1.handle), OBJ );
While (AR. iscompleted! = True)
{
System. Threading. thread. Sleep (1000 );
}
Then the debugger will be suspended. The reason for this suspension is that a Debugger component is locked by your code in this debugging. solution 1 is to change your code to use events for thread synchronization or mutext. other solutions are to log out of CSM. DLL. the second solution is to disable causal debugging. You can manually add aspnet_wp.exe to debug the web service.

 

Related Article

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.