I configured a website to run locally on IIS for use on my machine. My desktop application has something use with this locally running website for some operations.
There are the steps I followed to configure the website
Use IIS Manager to configure a web application pointed at a directory. (C:\somefolder):
Start > Internet Information Services (IIS) Manager.
Expand the left-hand tree view and right-click on "Default Web Site".
Select "Add Application".
Set the "Alias" to "sampleweb"
Click the "Select" button and choose the "ASP.NET 4.0" application pool.
Set the "Physical path" to the directory - C:\somefolder.
Click "OK".Use IIS Manager to configure a virtual directory pointed at another directory (C:\somefiles).
Start > Internet Information Services (IIS) Manager.
Expand the left-hand tree view and right-click on "Default Web Site".
Select "Add Virtual Directory".
Set the "Alias" to "somefiles".
Set the "Physical path" to the directory - C:\somefiles.
Click "OK".
So, when I distribute the application, I want to be able to set up a local server on the user's machine, and perform the above stesp in IIS.
I have been able to do the setting up of local server part, but I am confused with on how to perform the above stesp programmatically on the user's machine to get the website running.
Any suggestions? I'm on Windows 7
64 bit
IIS7