Apache|asp.net we know that the ASP.net 1.1 project relies very tightly on IIS because of Microsoft's design and implementation. Whether you are creating a ASP.net project, or opening or debugging a ASP.net project, IIS is required to run properly, otherwise nothing can be done. So when we run the asp.net on Apache, can you do it on the source level of step into/out debugging it?
Because of the mod_aspdotnet sub-project implementation problem (or bug) in the Apache2 project, there are some differences in the correctness of running the ASP.net program on it, and in the Aspnet_wp|w3wp on IIS. So it is necessary to debug the source code of the ASP.net project on Apache (mod_aspdotnet). Although the ASP.net 2.0 has been officially released, the 1.1 version of the project is currently in the mainstream, so let's look at Apache support for these two versions of the framework. As I said earlier, the ASP.net 1.1 project relies heavily on IIS, so at the moment I can only debug an existing ASP.net 1.1 project on Apache and not create it (after that). Because IIS first installs and consumes 80 ports, my Apache WEB server can only run on other ports (for example, 8080, via httpd.conf file configuration).
First, we need to have the debugged project run correctly on IIS, and the project can be opened correctly by the Vs.net 2003 IDE. Then configure Apache so that the project runs correctly on Apache as well. We can go through the IDE's ctrl+alt+p to attach the process that we want to be debug, when we see that there are two Apache.exe processes in the task list (which requires check "show system Processes"). I don't know what it should be, though they are all ". NET, Win32," but only one is the mod_aspdotnet hosting process. Of course, we can still use a small trick to judge, is to open taskmgr and refresh Apache running Web Site page, see that Apache.exe process CPU, then it is asp.net support module host. Attach successful after you can set breakpoints in the Vs.net, the step into/out the source code level debugging.
Above is the ASP.net 1.1 project debugging method, if is ASP.net 2.0 project? As the. NET Framework and Visual Studio 2005 improved, debugging 2.0 of the ASP.net project became odd easy! Once you've run the project on Apache, you can use Visual Studio 2005 to open the source code (*.cs) file of the page you want to debug, and then set the breakpoint directly after you attach the Apache process, and you don't need to open the project. Of course, and IIS completely disconnected from the relationship.
Whether it's 1.1 or 2.0, you need to determine which Apache.exe process is the host
A known possible problem with debugging failures on Apache:
1, not using the debug version of the project DLL to run, this ... Still a problem?
2, the second case, if not attention, may be considered Apache can not debug 1.1 of the asp.net. If the machine is installed at the same time Fx1.1 and fx2.0,mod_aspdotnet will default to our ASP.net program loaded on the Fx2.0 run, then if you use Vs.net 2003 to debug will not be able to attach any Apache.exe process. Of course, it is possible to use Visual Studio 2005. The workaround requires that the "aspnetversion v1.1.4322" command be used in httpd.conf to display the. NET framework version of the specified ASP.net program at run time.
I mentioned earlier that the 1.1 version of the ASP.net project must be built with IIS because when the project is created Vs.net 2003 you need to get the version information for the asp.net currently supported by IIS, and then create some project-required files on the server with some getting and post actions, as follows:
Created asp.net project by vs.net 2003 Command#region Created asp.net project by vs.net 2003 Command
Get localhost/debugdemo/get_aspx_ver.aspx
Internal Server Error
Get localhost/get_aspx_ver.aspx
404 Not Found
Get localhost/debugdemo/vs28758389629759149_tmp.htm
OK
POST Localhost/debugdemo/_vti_bin/_vti_aut/author.dll
MB Continue
401 Access denied
POST Localhost/debugdemo/_vti_bin/_vti_aut/author.dll
401 Access Denied
POST Localhost/debugdemo/_vti_bin/_vti_aut/author.dll
MB Continue
OK
POST Localhost/_vti_bin/_vti_aut/author.dll
MB Continue
401 Access denied
POST Localhost/_vti_bin/_vti_aut/author.dll
401 Access Denied
POST Localhost/_vti_bin/_vti_aut/author.dll
MB Continue
OK
POST Localhost/_vti_bin/_vti_adm/admin.dll
MB Continue
401 Access denied
POST Localhost/_vti_bin/_vti_adm/admin.dll
401 Access Denied
POST Localhost/_vti_bin/_vti_adm/admin.dll
MB Continue
OK
POST Localhost/debugdemo/_vti_bin/_vti_aut/author.dll
401 Access Denied
POST Localhost/debugdemo/_vti_bin/_vti_aut/author.dll
MB Continue
OK
POST Localhost/debugdemo/_vti_bin/_vti_aut/author.dll
#endregion
Also in ASP.net 2.0, this step is completely unwanted, ASP. NET project is a directory, completely disconnected from the Web server. We also do not have to because of the trouble of IIS, and so can not develop the ASP.net program ~ ~ ~
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.