When an httpmodule crystal report is used, the chart and image of the crystal report cannot be displayed.

Source: Internet
Author: User

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!

 

 

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.