简体   繁体   中英

Chrome version 57.0.2987.133 blocks asp.net page from loading after post back

When I click save on my asp.net web application, version 57.0.2987.133 of chrome gives blocks the page from loading. It gives following error:

"Chrome detected unusual code on this page and blocked it to protect your personal information (for example, passwords, phone numbers, and credit cards)."

I have attached the screen shot.

Chrome Response

Here is what I am doing.

In a JavaScript function, I trigger the click event of a hidden link button

 function SubmitPage(){ document.getElementById('lnkSave').click(); } //Code Behind Event Handler protected void Save_Click(object sender, EventArgs e){ // here I save the data, after saving data I populate controls PopulateControlsData(); } private void PopulateControlsData(){ // This function populates front end // controls eg drop downs and text fields etc. } 
 <asp:LinkButton ID="lnkSave" Style="display:none;" runat="server" OnClick="Save_Click">LinkButton</asp:LinkButton> 

Earlier version of chrome was working fine. When I remove PopulateControlsData() function from my code, everything works fine. Is this a bug in Chrome version 57.0.2987.133 or is there anything wrong with my code?

Thanks!

Use

Response.AppendHeader("X-XSS-Protection","0")

to disable the X-SSS protection on the browser

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM