[Bug] Analysis of problems caused by VS2013 brower link and Aspnetpager

Source: Internet
Author: User

Overview

When you browse the page on Ie11, you suddenly find that there is a bug in the page that uses Aspnetpager.

Development environment: WIN8.1+VS2013+IE11.

Item Description: This issue appears in the content page and the master page is applied.

Solution Solutions

A number of solutions were found, and finally the vs2013

Remove the tick and browse again, and you'll find it's normal, though it's powerful, but it's not always needed. I hope to be of some help to you.

Since the problem is out, then you have to ask a why?

First you need to know what is Browser Link?

The function of this Browser link is to use a script file to rack up a communication bridge before the process and Visual Studio IDE, and after enabling Browser link, Visual Studio injects a IHttpModule module into the Web site object, and then register a script above each page.

The Browser Link feature is implemented using SignalR technology.

Having said so much, what exactly is the Browser Link function used for?

Now the Broswer Link function is simple, which is to refresh the page in the Visual Studio IDE if the Visual Studio IDE can refresh the page that is already open in the browser.

There is such a scenario: if you are developing a page, this page needs to be compatible with IE, GOOGLE, FIREFOX and Mobile browser, it is possible that you will be able to use these processes at the same time to open your page, if you find that there is a problem, back to the VS IDE to modify, after the changes can be in the Visual S Tudio the IDE point "refresh Linked Browsers" to refresh all browsers to see the effect.

Now this "Browser link" only has such a refresh function, but the Browser link function can write extension functions, you can customize some of the features you need.

Browser Link is the channel between connecting VS and the browser. With this feature, the Web program can pass data with vs interaction. This feature is enabled by default in VS2013. When browser Link is turned on, the Web application registers a httpmodule to the ASP. NET life cycle, the HttpModule function is to inject a <script> script into each output page, The purpose of this script is to be responsible for the communication between the VS IDE and the Web page.

So what happens when you enable Brower link?

First Look at Aspnetpager

Script generated by Browerlink

When browser Link is turned on, the Web application will register a httpmodule to the ASP's lifetime, and this httpmodule function is to inject a <script> script into each output page. , this script is responsible for the communication between the VS IDE and the Web page.

Is it because browerlink affects the Aspnetpager control life cycle to cause this bug?

after disabling Browerlink

It can be browsed normally, and the Aspnetpager control can be used normally.

By contrast, you can see that when you turn on Browerlink, you have more script and __eventvalidation input.

__eventvalidation effect

__eventvalidation is just used to verify that the event is sent from a legitimate page, just a digital signature, so it is generally short. The hidden field with the "id" attribute "__eventvalidation" is the new security measure for ASP. NET 2.0. This feature can block unauthorized requests that are sent from the browser side by potentially malicious users.
To ensure that each postback and callback event comes from the desired user interface element, ASP. The NET runtime adds an additional layer of validation to the event. The server side submits the requested content by examining the form, matching it to the information in the "__eventvalidation" hidden field of the "id" attribute. Verify that no additional input fields are added to the browser side based on the matching results (there may be a maliciously-added field for the user on the browser side), and that the value is selected in the list known to the server. Asp. The NET runtime creates an event validation field during the build, which is the most unlikely time to get that information. Like view state, event validation fields contain hash values to prevent browser-side tampering. Description: The "id" property for "__eventvalidation" hides the field generally at the bottom of the form, and if the form is not resolved at the end of the browser, the user submits the data that could cause validation to fail.
Summary

Open and close brower link differences in the front-end source can see a script block, a hidden, guessing in __eventvalidation blocked from the browser to send an unauthorized request, and "input#ctl00$ Contentplaceholder1$pager_input "is considered to be inconsistent with the grammatical requirements, causing the problem. This does not know is browerlink reason, or aspnetpaer reason, the level is limited, can only analyze Tao here, if you have a better saying, trouble to share a bit.

[Bug] Analysis of problems caused by VS2013 brower link and Aspnetpager

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.