简体   繁体   English

如何在Windows Azure上禁用ASP.NET v4.0无扩展URL功能

[英]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.

相关问题 ASP.NET v4无扩展URL功能在IIS 6.0上不起作用 - ASP.NET v4 Extensionless URL feature does not work on IIS 6.0 IIS6上ASP.NET 4.0中的无扩展名URL - Extensionless URL in ASP.NET 4.0 on IIS6 如何在asp.net(v4.0)中创建cron作业以每30分钟运行一次方法 - how to create cron job in asp.net(v4.0) to run method every 30mins 如何在ASP.Net和IIS6中处理无扩展URL - How to deal with extensionless Url in ASP.Net and IIS6 升级到IIS应用程序池ASP.NET V4.0有什么可能的影响? - What are the possible effects of upgrading to IIS Application Pool ASP.NET V4.0? 用户“IIS APPPOOL\ASP.NET v4.0”登录失败 - Login failed for user 'IIS APPPOOL\ASP.NET v4.0' 授予用户IIS APPPOOL \\ ASP.NET v4.0的权限不足以执行此操作。 (rsAccessDenied) - The permissions granted to user IIS APPPOOL\ASP.NET v4.0 are insufficient for performing this operation. (rsAccessDenied) VS2008上的“无法在对象浏览器中查看此项目”-ASP.NET C#v4.0 - “This project cannot be viewed in object browser” on VS2008 - ASP.NET C# v4.0 如何在ASP.NET 4.0 Webforms中动态制作SEO友好的无扩展名URL - How to make SEO friendly extensionless urls dynamically in ASP.NET 4.0 webforms Windows Azure网站上的asp.net 4.0 Web应用程序的URL路由 - Url Routing for asp.net 4.0 Web Application on Windows Azure Website
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM