The development status refers to the status of running a webpage in the vs2005 environment. The actual application status refers to the status in which the user accesses the server and the service is provided by IIS.
In the development status, when debugging some pages, it was originally called by other pages, but I only need to set some sessions in page_load so that it can be set as the start page directly during debugging. However, in the actual application status, the code for setting the session cannot be run. In VB6, this code can be used to differentiate:
If getmodulehandle ("vb6.exe") = 0 then
Bruninvb6 = false
Else
Bruninvb6 = true
End if
In ASP. NET, I also use this idea to try to differentiate, and write the following code in page_load:
// If the process contains webdev. webserve and is considered to be in the development status, set this setting.
Foreach (process thisproc in process. getprocesses ())
{
// Debug. Print (thisproc. processname );
If (thisproc. processname = "webdev. webserver ")
{
// The content passed in the previous interface: session ["zggh"] And session ["fwq"]
Session ["zggh"] = "91005 ";
Session ["fwq"] = "192.168.15.13 ";
Break;
}
}
Damn it, using system. diagnostics; not added.