• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2047
  • Last Modified:

Publish a website in VS 2008 express edition


I am a newbie here so please exuse me for any stupid question.  I am trying to publish a website using VS 2008 express edition. I right click on the project name in solution explorer and it says Successded and then when I type localhost in the address bar, nothing happens.  I also noticed that I have 2 versions of IIS, one is IIS and other one is IIS7.  How do I do it?

1 Solution
Using VS 2008 Standard, I just publish to a folder and copy the contents to the home directory of the IIS site. You also have to make sure you're using the correct version of .NET on the web site.

You also have to make sure you've got the correct files in there. If it's looking for index.htm and you've got default.aspx in there, you won't see your page.
armbsuAuthor Commented:

I am still looking for answers.  
You have two options you can publish/compile the web application or just place code in the web root of the iis (the second one is only recommended for testing purposes).

Publish procedure:
In visual studio with the project open go to the menu Build>Publish <your web application>.
If this option is not available in the express edition then do the following:
aspnet_compiler -v /MyIISWebApplication MyTargetPath

The aspnet_compiler is in the framework folder.

Anyways you can drop either your source code or the compiled project in the 'c:\inetpub\wwwroot'
Select you folder in the IIS > right click > properties > In the properties dialog hit create.

Once the application has been created you can test it.

Make sure that the folder has the appropriate permissions for the following users:
IUSR_<Machine Name> (internet guest account, not sure if its necesary for IISv6 and up, but you can do this test yourself)

Also you can create a virtual directory in the IIS and point it towards your folder instead of moving around the application, your call. Word of advice emulate the production environment as much as you can if your going to use a precompiled application then do that, and if your going to use a virtual directory then do that.

Hope this helps
  1. Launch Visual Web Developer Express.
  2. Select Tools, External Tools to display the External Tools dialog. In the Title box, enter Publish &Website(non-updatable).
  3. Click the browse button next to the Command box and browse to aspnet_compiler.exe located in c:\Windows\Microsoft.NET\Framework\v2.0.50727.
  4. Click Open to add the command line for aspnet_compiler.exe.

    Now that you've got the correct command line for the aspnet_compiler.exe, it's time to add the arguments that will correctly pre-compile your application. This is where you'll see the true power of the External Tools dialog.

  1. Type -p " in the Arguments box. (That's an opening double-quote after the p.)
  2. Click the right-facing arrow next to the Arguments box and select Project Directory.
  3. Add a trailing double-quote to the Arguments box.
  4. Press the spacebar to add a space at the end of the existing arguments.
  5. Type -v / " after the space you just entered.
  6. Click the right-facing arrow next to the Arguments box and select Project Directory.
  7. Type \..\CompiledApp" after the existing arguments.

    At this point, the Arguments box should contain the following:

  8. -p "$(ProjectDir)" -v / "$(ProjectDir)\..\CompiledApp"
  9. Type -u.
-p "$(ProjectDir)" -v / "$(ProjectDir)\..\CompiledApp" -u
Have a great day.
armbsuAuthor Commented:

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now