我有某些值mapped
在web.config
文件中用于URL Mapping
. 当我浏览文件时,它可以工作localhost
。但是,当我在生产上部署此应用程序时IIS
,它不会工作。显示错误:“ 404: The resource cannot be found.
”不知道为什么?
任何想法?
Web.config 标记:
<urlMappings enabled="true">
<add url="~/Pune" mappedUrl="~/City.aspx?ID=1"/>
</urlMappings>
在 .aspx 文件中:
<a href="Pune">Pune City</a>
搜索后,我得到了一些线索,它一定是:
<urlMappings enabled="true">
<add url="~/Pune" mappedUrl="http://mycustomdomain.com/City.aspx?ID=1"/>
</urlMappings>
但是,不幸的是,这也行不通..!
还有什么……我们需要在文件中进行设置IIS
吗web.config
?