IIS Express – 不适当的热重载 / 刷新 / 回发

huangapple go评论85阅读模式
英文:

IIS Express - Inappropriate Hot Reload / Refresh / Postback

问题

我正在运行IIS Express,并在以下情况下遇到了不适当的回发:

  • 当我仅将光标放在浏览器的URL字段中时;以及
  • 当我开始编辑URL(例如更改一个字符)。

我没有按“回车”,也没有试图回发到服务器,但由于某种原因,调试器非常敏感,与浏览器的URL字段的任何互动都会触发刷新/回发/重新加载。

是什么原因?有办法关闭这个功能吗?

英文:

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

  • I merely place my cursor in the URL field in the browser; and
  • I start to edit the URL (like changing one character).

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?

答案1

得分: 1

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.

IIS Express – 不适当的热重载 / 刷新 / 回发

And another quick test?

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

e.g., this:

IIS Express – 不适当的热重载 / 刷新 / 回发

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

英文:

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

This option:

IIS Express – 不适当的热重载 / 刷新 / 回发

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:
IIS Express – 不适当的热重载 / 刷新 / 回发

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.

IIS Express – 不适当的热重载 / 刷新 / 回发

And another quick test?

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

e.g., this:

IIS Express – 不适当的热重载 / 刷新 / 回发

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

huangapple
  • 本文由 发表于 2023年8月5日 03:35:55
  • 转载请务必保留本文链接:https://go.coder-hub.com/76838734.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定