I have an ASP.Net app that I deploy to a IIS 7.0 server in classic mode.
我有一个ASP.Net应用程序,我以经典模式部署到IIS 7.0服务器。
I use the publish feature from the Visual Studio IDE. Every time I perform a publish, the wild card mapping is removed. Anyone know how to prevent this?
我使用Visual Studio IDE中的发布功能。每次执行发布时,都会删除通配符映射。谁知道如何防止这种情况?
Thanks!
1 个解决方案
#1
The wildcard mapping is stored in the application's web.config. You could create the mapping and then copy the section from the system.webServer->handlers section into your dev web.config.
通配符映射存储在应用程序的web.config中。您可以创建映射,然后将该部分从system.webServer-> handlers部分复制到您的dev web.config中。
Or you could use a Web.Deploy project to setup the web.config exactly as it needs to be for deployments.
或者您可以使用Web.Deploy项目来完全按照部署所需的方式设置web.config。
#1
The wildcard mapping is stored in the application's web.config. You could create the mapping and then copy the section from the system.webServer->handlers section into your dev web.config.
通配符映射存储在应用程序的web.config中。您可以创建映射,然后将该部分从system.webServer-> handlers部分复制到您的dev web.config中。
Or you could use a Web.Deploy project to setup the web.config exactly as it needs to be for deployments.
或者您可以使用Web.Deploy项目来完全按照部署所需的方式设置web.config。