我有一个 MVC4 应用程序,并已发布文件托管在 IIS8.5 上。我的 cshtml 页面上有一个链接
<a href='/home/ContactGrabber'>Import Contacts</a>
这里的 home 是控制器,而 ContactGrabber 是控制器的一个动作。当我单击此链接时,它显示 404 错误,因为 url 正在显示
http://localhost/home/ContactGrabber
它应该是
http://localhost/cruuntest/home/ContactGrabber
但是当我在没有托管在 IIS 上的情况下运行我的开发代码时。它工作正常。
有人可以帮我吗?