Programmatically create website on Remote Server IIS

Posted by Nmdjack under VB.NET on 7/3/2015 | Points: 10 | Views : 2438 | Status : [Member] | Replies : 2

Please advice me on the following requirement. Its very urgent requirement for me.

I created the Windows application to create/Update the website in Local machine IIS. how to do the same activities on Remote Server IIS?

How to get the Remote server IPAddress and determine Which .NET Framework Versions Are Installed on remote server and etc.

Forexample :

I have 5 Server (S1, S2, S3, S4 and S5).

I want to Create/Update the Website in Server S1 from My machine.

From my machine I run the application and I select the server means. I want to list the selected server information (IP Address, Installed Framework versions and etc)

Thanks in advance.


Posted by: Sheonarayan on: 7/3/2015 [Administrator] HonoraryPlatinum | Points: 25

Its a challenging work and a lot of things needs to be done in this.

1. To get the IP address, either you should have static ip address and you should be knowing beforehand or send a request to the server where you should have a .aspx or server side page and write this code Request.ServerVariables["REMOTE_ADDR"] that will return you the ip address.

2. To get the .NET framework version, you can use Environment.Version.ToString(), if not get it using this approach -

3. Creating a website on the server remotely through program needs low level access and admin permission to your application. Read this article

Hope this helps.


Sheo Narayan

Nmdjack, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nmdjack on: 7/3/2015 [Member] Starter | Points: 25

Hi Sheo,

Thanks for your reply. I got the points to get the remote server IIS information such as sitename, Application Pool, Binding Information.

I am struckup with how to create the virtual directory on remote server specified location path (D:\Website)

The above mentioned path is target path i need to create the virtual directory and extract all the files to that path.

How to do that via my application?

Nmdjack, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response