英文:
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.
And another quick test?
Try changing your project to release, and see if that behaviour exists.
e.g., this:
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:
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:
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.
And another quick test?
Try changing your project to release, and see if that behaviour exists.
e.g., this:
So, either you have some malware in your browser, or you attached the browser session as a live debug session during debugging your code.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论