About "WebForm_PostBackOptions undefined"

Source: Internet
Author: User

After uploading the website to the server (. net2.0), the following problems are found:

You cannot run the LinkButton control on some pages after it is clicked. The IE status bar prompts a javascript script error (WebForm_PostBackOptions is not defined), but it can be used properly locally. Some server space providers are searching for ASP. NET security measures, remove some default mappings, to ensure that the server is as less vulnerable to intrusion attacks and potential security vulnerabilities.

The local test result shows that the ing between the extension:. axd and C: \ WINDOWS \ Microsoft. NET \ Framework \ v2.0.50727 \ aspnet_isapi.dll is deleted.
If no form verification control exists on the page, after LinkButton runs, it calls _ doPostBack (...) in IE (...), if the form verification control exists on the page, LinkButton calls WebForm_DoPostBackWithOptions (...) in IE (...), if no. axd ing may cause problems. Find the following in "View Source File" in IE:

<Script src = "/.../WebResource. axd ?... "Type =" text/javascript "> </script>

Try to open the path in src in IE. The path cannot be opened without ing.

 

Solution:

1. Add the. axd ing to the site configuration, but you cannot select "check whether the file exists.

GET, HEAD, POST, DEBUG
C: \ WINDOWS \ Microsoft. NET \ Framework \ v2.0.50727 \ aspnet_isapi.dll
. Axd

2. If the server provider is unwilling to modify the server configuration, it has to write a program for verification on the page that requires the LinkButton control. Or set the CausesValidation of the LinkButton to "False". The Button should be used whenever possible for verification submission. However, asp.net ajax cannot be used, and a script error may also occur.

----------------------------------------------------------------

After HttpCompress is used, the web page is opened much faster, but an error still occurs in the use of javascript applications (including the Validation control) and FreeTextBox control. The following provides a solution for these two types of errors.

In web. config

<HttpCompress preferredAlgorithm = "gzip" compressionLevel = "high">
<ExcludedMimeTypes>
<Add type = "image/jpeg"/>
<Add type = "image/gif"/>
<Add type = "text/x-component"/> <! -- Solve the Problem of FreeTextBox errors -->
</ExcludedMimeTypes>
<ExcludedPaths>
<Add path = "NoCompress. aspx"/>
<Add path = "ebResource. axd"/> <! -- Solve javascript errors -->
</ExcludedPaths>
</HttpCompress>

Hope to help you

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.