1

I have done a Web Application project in Visual Studio 2008, In Solution Explorer I click on publish Website.

The published website is stored in the Location C:\Users...\Documents\Visual Studio 2008\Projects\Online Registeration.

Now what should i do to access that application...?

I was totally confused, can i copy the Online Registeration project in to WWWROOT folder or anything else...

Could anybody tell me....

1 Answers1

0

You need to host this website on a web server like IIS.

Open IIS manager on your machine by typing inetmgr command in Run window

IIS 7 or above: Right click the server node on the left --> Add Web Site. You need to set Physical path to where this site is published, probably inside wwwroot folder, because this folder has got all the permissions to run the website.

IIS6: Server Node --> Web Sites --> New --> Website

Set appropriate header in Host name and you'll be ready to access the site using this host header.

There is an automatic way to publish whenever you build the site in visual studio 2008, follow this answer

Community
  • 1
  • 1
Nexus23
  • 6,195
  • 9
  • 50
  • 67
  • 1
    It's working now. I had done the process what you said but i had a doubt that why should i publish the website...? I directly open IIS Right Click -> Default Website, click on -> Virtual Directory, given Alias name and Path of the project(Path is in D-Drive but not in OS level drive), Now also it's working. How can we see the Difference....? – user2618074 Dec 11 '13 at 05:51
  • Glad you resolved the issue :). You have done it correctly as well. In fact both set of steps have hosted the site under IIS process rather development web server which comes with Visual studio. Usually, during development we host the site from within visual studio either going into website properties and then "Web" section or the way you have done it. Once development is completed, we publish the site. – Nexus23 Dec 11 '13 at 09:18
  • Here i Observed one thing that after i published the website .cs files are missing in the published folder but the code is working. Why it is hiding the .cs files...? – user2618074 Dec 11 '13 at 11:20
  • When we publish a website or a web application, visual studio compiles code (any .cs or .vb files) into .exe or dlls. Here is a short comprehensive description of this process: http://msdn.microsoft.com/en-us/library/20yh9f1b%28v=vs.100%29.aspx – Nexus23 Dec 11 '13 at 11:30