1

I have my project set up with the virtual path "/MyVirtualPath", create the virtual directory in IIS 6 (W2003) and everything works fine.

Then to work better with Google Analytics I change the virtual path "/myvirtualpath" and change all redicecciones and links to lowercase. also applies the class "lowercase route urls in aspnet mvc" and works perfectly.

The problem I had to modify the virtual directory in IIS, delete virtual path "/MyVirtualPath" and I created the new "/myvirtualpath", but in all cases I use tilde "~" or where I make a "RedirecToAction" (which should take "LowercaseRoute"), continues to maintain the virtual path "/MyVirtualPath".

For example, if I see the HTML source code in the browser, see "/MyVirtualPath/Content/Site.css" instead of "/myvirtualpath/Content/Site.css. "

Thanks

4

1 回答 1

0
  1. 进行此类更改时,请确保重置 IIS(运行 iisreset)。有时会出现缓存问题。
  2. 尝试直接在您的元数据库文件中搜索“MyVirtualPath”并手动编辑它。这是一种危险且丑陋的技术,因此在这样做之前采取适当的预防措施(例如,确保服务器配置为自动备份您的元数据库并在您搞砸时重新加载它)。尽管改变大小写不太可能破坏任何东西。
于 2010-12-30T14:37:23.610 回答