[英]How to Disable the ASP.NET v4.0 Extensionless URL feature on Windows Azure
i've a website on azure with Framework 4.5. 我有一个使用Framework 4.5在azure上的网站。 I specified a defaultdocument that is also the destinationpage of the login page, in fact when i request the url http://xx.azurewebsites.net it redirects on the login page, all this because i want that the user first authenticate himself.
我指定了一个默认文档,它也是登录页面的目标页面,实际上,当我请求URL http://xx.azurewebsites.net时,它会重定向到登录页面,所有这些都是因为我希望用户首先进行身份验证。
After login, browser redirects to the right page but the url is showing http://xx.azurewebsites.net again and this causes logout control to not logout the user because when the button is pressed, the page refresh itself and doesn't do the logout. 登录后,浏览器将重定向到正确的页面,但URL再次显示http://xx.azurewebsites.net ,这将导致注销控件无法注销用户,因为当按下按钮时,页面会自动刷新并且不会执行此操作注销。
I found on the web the cause that is Extensionless URL feature of ASP.NET 4.0 and i found how to disable it but it doesn't work. 我在网上发现了ASP.NET 4.0的无扩展URL功能的原因,并且我发现了如何禁用它的功能,但它不起作用。 What i found is this code to insert in web.config file of the website:
我发现的是将此代码插入网站的web.config文件中:
<handlers>
<remove name="ExtensionlessUrl-Integrated-4.0"/>
<remove name=" ExtensionlessUrl-ISAPI-4.0_32bit "/>
<remove name=" ExtensionlessUrl-ISAPI-4.0_64bit "/>
Any ideas??? 有任何想法吗???
It should be ExtensionlessUrlHandler-Integrated-4.0 - you're missing 'Handler' (as is MS's own KB article). 它应该是ExtensionlessUrlHandler-Integrated-4.0-您缺少“处理程序”(这是MS自己的KB文章)。 The other two lines don't actually seem to be necessary.
其他两行实际上似乎并不是必需的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.