开发者

Is it possible to run ASP.NET in IIS 7.5 without creating Virtual Directories or Applications?

开发者 https://www.devze.com 2023-02-17 05:47 出处:网络
I have a Continuous Integration server with dozens of ASP.NET applications hosted on IIS. Everytime I want to deploy a new application, I have to create a new Website or virtual Directory and configur

I have a Continuous Integration server with dozens of ASP.NET applications hosted on IIS. Everytime I want to deploy a new application, I have to create a new Website or virtual Directory and configure it as an application in IIS.

I would really love to have only one website listening in a specific port (say, 80) serving 开发者_如何学运维multiple ASP.NET sites according to wildcard host headers.

For instance:

*.dev.mydomain.int -> my server's ip address (eg: 192.168.1.32)

IIS web site reads the host header and try to find a local folder with the same name. Ex: when a request uses the host header "helloworld.dev.mydomain.int" IIS tries to open a preconfigured folder appending the host header site name (e.g: D:\dev\helloworld)

IIS serves the contents of the folder as an ASP.NET application, using preset configurations (Application Pool, ASP.NET version, and so on).

My goal here is not to create a web site or virtual directory for each and every project in our CI server. I know I can create them programmatically, but I'd prefer a more dynamic solution.

Thanks in advance


You can use MSBuild tasks to create Virtual Directories / Web sites automatically.

http://fczaja.blogspot.com/2009/02/automatic-deployment-of-webapp-on-iis.html

I had it working on a large application with many branches (we had an environment for each branch) and I didn't have to open IIS settings at all. Just pure hands-off process.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号