Publish a website in VS 2008 express edition

Posted on 2008-11-11
Last Modified: 2013-11-27

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?

Question by:armbsu
    LVL 6

    Expert Comment

    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.

    Author Comment


    I am still looking for answers.  

    Expert Comment

    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)
    NETWORK SERVICE (IISv6 and up)

    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

    Accepted Solution

    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.

    Author Closing Comment


    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK ( for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
    A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now