You must choose a publish location that is different from the source Web application error message when trying to publish a web project with Visual Studio 2005

by michaellotter 1/20/2008 11:18:00 PM

When living in the InfoPath and SharePoint world I sometimes don't really get to know how to use some tools that great until I get a stray project that forces me to do things that I normally wouldn't do on a day to day basis.  Recently I've had two projects like that and fortunately for me I've learned a bunch of new stuff that probably most developers learned years ago when the tools were first released.  This post is about me finally figuring out how to switch back from Visual Studio 2005 "IIS Web Server" debug mode to "Visual Studio Development Server" mode.  In Visual Studio 2005 web projects have this properties tab called "Web" and on it you can specify either to run debug from "Visual Studio Development Server" or "IIS Web server" and both of these options have their pros and cons but I'm not going to get into that because that is another blog post if you ask me.  Below is an image of the properties tab Web.

Usually when I'm starting out on a new project I've always found myself always using the "Visual Studio Development Server" for debugging but once I start publishing my sites to IIS then I usually switch to "IIS Web Server" but one of the biggest problems that I've had was not being able to switch back to "Visual Studio Development Server" mode and successfully publish my code to the desired IIS website.  Whenever I would switch back and try to publish my code to the IIS website I would get this error.

This error has haunted me for about 2 or 3 projects and I finally got tired of it and started to do some searching to find a fix but was unable to.  So I started messing around with the settings on the Web properties tab and noticed that the "Project Url" and "Override application root URL" textboxes were getting pre-populated and in most cases I was changing the values to point to the IIS website I published to.

Once I noticed that these values were not being cleared out when I would click on the "Use Visual Studio Development Server" radio button then I decided to clear them out manually and then try publishing again.  When I tried the publishing everything worked and the error went away.  So when you switch back and wan't to use the publish feature but you can't because of the error message, just make sure everything is cleared out and looks like this image below.

I'm sure everyone in the world knows this but since this was my first I figured I would blog it.  Hope everybody had a great weekend.

Cheers

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Microsoft Visual Studio 2005

Related posts

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

11/20/2008 2:21:36 PM

Powered by BlogEngine.NET 1.3.0.0
Theme by Mads Kristensen

About the author

Name of author Author name
Something about me and what I do.

E-mail me Send mail

Calendar

<<  November 2008  >>
MoTuWeThFrSaSu
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

View posts in large calendar

Recent comments

Tags

Don't show

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2008

    Sign in