codeMonkey
codeMonkey

Reputation: 4845

IIS Express - Inappropriate Hot Reload / Refresh / Postback

I am running IIS Express and experiencing an inappropriate postback when:

I'm not pressing "enter", and I'm not trying to postback to the server, but for some reason, the debugger is so sensitive that any interaction at all with the browser's URL field triggers a refresh/postback/reload.

What is that? Is there a way to turn that off?

Upvotes: 0

Views: 197

Answers (1)

Albert D. Kallal
Albert D. Kallal

Reputation: 49204

A guess on my part would be that you have debugging turned on for the browser.

This option:

enter image description here

So, try and see if script debugging is enabled. (Disable it).

The other option?

Disable live preview. This in vs2022 is now turned on by default, and allows edits in the browser, and uses the chrome engine for rendering when you using webforms designer.

So, tools->options->Web Forms designer. And this: enter image description here

Both of above are a guess on my part, but worth a try. (So, don't use live preview, but choose Legacy Web Forms designer).

I would consider trying a different browser. Obviously on my developer computer I have several browsers like all developer’s do. So, you could try say one of your other browsers, such as these choices.

enter image description here

And another quick test?

Try changing your project to release, and see if that behaviour exists.

e.g., this:

enter image description here

So, either you have some malware in your browser, or you attached the browser session as a live debug session during debugging your code.

Upvotes: 1

Related Questions