开发者

How can I choose which port a web application should use during deployment

开发者 https://www.devze.com 2023-01-27 19:08 出处:网络
I am using Visual Studio 2010/C#. My goal is to deploy a web application on a windows 2008 R2 server. My main challenge is \"how to choose port during the installation\".

I am using Visual Studio 2010/C#. My goal is to deploy a web application on a windows 2008 R2 server. My main challenge is "how to choose port during the installation".

I have tried the standard deployment project for web projects that are shipped with Visual Studio. However - the choice of deploying the application to use a specific port is not something that I can find easily.

Can someone tell me if it is possible to specify this using the "standard" web deployment inst开发者_运维知识库aller in VS2010, or do I have to get my hands on something else in order to do this?

(Main reason for this is that other ports are used for other applications on that server, and I would like that the 'deployer' do not have to do anything in the IIS).


You will need to implement a custom action (installation component) in order to change the port - or many other settings in Internet Information Services.

Details of how to do this are available here:

http://msdn.microsoft.com/en-us/library/aa289522(VS.71).aspx

The example in the link shows how to query the port, shouldn't be too difficult to change it to update the port.

0

精彩评论

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