March 24, 2009

Double-click solution file to create your web site

0 comments

Hi all,
In Visual Studio, if you have to go for any web based content you will be left with two choices - web site/web application. Here is one difference that may be helpful for your selection criteria:

  1. Create a solution file.
  2. Add a new project and select the project type as "Asp.Net Web Application".
  3. Right click on this web application and select properties - go to 'Web' tab, under server you will find the radio box 'Use Visual Studio Development Server' selected. Below that is the radio box 'Use Local IIS Web server'. Uncheck the former and select the later one.
  4. Now when you export your solution file to another machine and when you double-click the solution file, your web site is automatically created in the IIS Server of that machine.
If you select a new web site to be added to your solution file then you won't find such an option as described above. So if you have a web site added to your solution file and when you open the solution file in another machine, the default url will be something like 'http://localhost/MySite/MyPage.aspx' and this means a site located in that machine. But since you don't have any such site published in IIS yet, your visual studio will warn you about this and the project will be unavailable.