I wrote httpmodule before, and later found that the project's Crystal Report chart is not displayed.
Public void Init (httpapplication context)
{
Context. acquirerequeststate + = new eventhandler (context_acquirerequeststate );
}
# Endregion
Void context_acquirerequeststate (Object sender, eventargs E)
{
// Obtain the applicationProgram
Httpapplication application = (httpapplication) sender;
String url = application. Context. Request. path;
String type = URL. substring (URL. lastindexof ('.'));
If (type. tolower () = ". aspx "&&URL! = "/Crystalimagehandler. aspx ")
{
// Execute the operation ~~
By name, right-click the icon that cannot be displayed. a png image is found, and the address is placed in the URL. An error is found:
Object reference not set to an instance of an object.
Description:An unhandled exception occurred during the execution of the current Web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception details:System. nullreferenceexception: object reference not set to an instance of an object.
Source error:
Line 39: // check whether the user has logged on to line 40: Line 41: If (application. Context. session ["loginusername"] = NULL) line 42: {Line 43:
|
It is found that the method written by the previous module is session judgment.
After debugging, it is found that when the crystal report displays the icon in/crystalimagehandler. aspx "to the browser, the page does not know why the session cannot be detected.
This page cannot be displayed!