The "System.NullReferenceException" type of exception occurs in App_web_j2s3gau3.dll, but the bug solution is not processed in user code

Source: Internet
Author: User

The cause of this abnormal error may be in different projects, there are many reasons for the error. Here I aimed at my project, read the tip of the error, find a big half day. Finally found the ... Alas.. Although simple, but still write.

My project implemented a URL rewrite, URL rewrite class inside a "Web Access log" function, the function is simply to record the URL of the site, and save the database. Here I use the cache (Httpruntime.cache), which can be accessed throughout the application. Before the Microsoft. NET Framework 3.5, when I went to Microsoft. NET Framework 4.0, I reported some errors, mainly because the webconfig was not configured properly. As shown

"True" of "<identity impersonate="true"/>" is set to "false" before the node of <system.web>. We can.

In. NetFramework3.5, the node "<HttpModules>" is written under "<system.web>", which is basically specifying the URL rewrite class, which is equivalent to initializing the class. 3.5 There is no problem in the framework. When you upgrade to 4.0, you will get an error. As shown

At that time, I put this "<HttPModules>" removed when debugging, you can access the home page, but a click on other pages, the "' System.NullReferenceException ' type of exception in the App_Web_ occurred in J2s3gau3.dll. " As shown

When you come out, let me faint. Looking for most of the day, also on the Internet to find. No relevant information was found. Finally, the error message is carefully read the prompt. The <system.webServer> node was added to the webconfig. It's OK.

1 <configuration>2 <system.webServer>3     <modules>4       <add name="httpmodule" type="DKBDT. Web.UI.HttpModule, DKBDT. Web.ui"/>5     </modules>6   </system.webServer> 7 </configuration>

Also note here: When publishing, the managed pipeline mode for the selected application pool is " integrated ", and if it is "classic" It will also report the above error. (On IIS running environment WIN8)

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.