Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2008

Tip: Looking for answers? Try searching our database.

'is not a valid virtual path' - host header help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
simon - 04 Mar 2008 18:48 GMT
hello.
i'm trying to setup a website on my local server
when compiling it VS 2005 i get the error
"is not a valid virtual path"

from what i've read on the net, this is due to the fact that the site
is using IP:Port, which is no longer supported in VS 2005.  I have to
use the IP:Port setup 192.168.2.102:8080 as my ISP blocks port 80

this is just a dev site, but i would like to access it externally,
hence the port 8080.  I've read that a few people got around this
issue by using host headers.  but i have yet to find an example of
how.  anything listed out on the internet refer to only using port 80.
was hoping someone could help me with my setup of how to setup my site
to user IP:8080 and point to port 80 as well via host headers so that
the site can be built/compiled in VS 2005.  
I assume i then have to make a DNS entry, host file entry or WINS
entry so that the site is accessible via the host header name.  any
help with that would be appreciated greatly as well

my server is Win2003 w/ IIS6.  and .net 2.0

thanks for any help
Jon Skeet [C# MVP] - 04 Mar 2008 19:19 GMT
> hello.
> i'm trying to setup a website on my local server
[quoted text clipped - 17 lines]
>
> my server is Win2003 w/ IIS6.  and .net 2.0

I don't really see what this has to do with VS2005 - surely it's just a
matter of telling IIS to run on port 8080 instead of port 80.

Signature

Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet   Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk

simon - 04 Mar 2008 22:18 GMT
>> hello.
>> i'm trying to setup a website on my local server
[quoted text clipped - 20 lines]
>I don't really see what this has to do with VS2005 - surely it's just a
>matter of telling IIS to run on port 8080 instead of port 80.

apparently you could have a website in a project that used a specific
port number in VS 2003,  but that capability was taken away (or it is
a bug) in VS 2005.  if you try to build the site, you will get the
error "...is not a valid virtual path" - because the port number is
part of the path, as opposed to using the default port 80 where you
don't need to add the port.

so IIS is working fine for me running on port 8080, but VS can't do a
build of the site because of the port being part of the path.  

any help would truly be appreciated!
thanks
Jon Skeet [C# MVP] - 04 Mar 2008 22:32 GMT
> >I don't really see what this has to do with VS2005 - surely it's just a
> >matter of telling IIS to run on port 8080 instead of port 80.
[quoted text clipped - 8 lines]
> so IIS is working fine for me running on port 8080, but VS can't do a
> build of the site because of the port being part of the path.  

Perhaps you're using web projects in a different way to me. In VS2005,
I just build them "in place" and then point IIS at the directory as a
virtual directory. The port doesn't need to be in the path at all.

Signature

Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet   Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk

simon - 05 Mar 2008 02:00 GMT
if you have a solution opened to test with, right click the solution
and say "add external website".  that website i have a port on (8080).
that is where i run into problems.  adding the website to the
solution.  even if i started a new solution and had the source on the
server, i'd still need to use the port to get to it and then when i
try to do a build, i get the error message.... not a valid path.

suggestions are appreciated as always.  thanks!!

>> >I don't really see what this has to do with VS2005 - surely it's just a
>> >matter of telling IIS to run on port 8080 instead of port 80.
[quoted text clipped - 12 lines]
>I just build them "in place" and then point IIS at the directory as a
>virtual directory. The port doesn't need to be in the path at all.
Jon Skeet [C# MVP] - 05 Mar 2008 07:43 GMT
> if you have a solution opened to test with, right click the solution
> and say "add external website".  that website i have a port on (8080).
[quoted text clipped - 4 lines]
>
> suggestions are appreciated as always.  thanks!!

Ah, so you're not talking about an ASP.NET application? That's normally
what I've been editing in VS2005.

Signature

Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet   Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk

simon - 05 Mar 2008 14:03 GMT
right, it is an asp.net website, it is a known problem with VS2005
that didn't exist in 2003.  and there is a "workaround" which is
configuring host headers and such, i just don't know what to set in
the host header section to do this.  thanks again..

>> if you have a solution opened to test with, right click the solution
>> and say "add external website".  that website i have a port on (8080).
[quoted text clipped - 5 lines]
>Ah, so you're not talking about an ASP.NET application? That's normally
>what I've been editing in VS2005.
Jon Skeet [C# MVP] - 05 Mar 2008 14:26 GMT
> right, it is an asp.net website, it is a known problem with VS2005
> that didn't exist in 2003.  and there is a "workaround" which is
> configuring host headers and such, i just don't know what to set in
> the host header section to do this.  thanks again..

If it's an ASP.NET site, why do you need to add it as an "external
website"? Why can't you just add it as a normal project?

Ah, the penny's dropping - do you not have access to the site as a -
local file system? I've only ever developed on my local box, which
makes life rather simpler...

Signature

Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet   Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk

simon - 05 Mar 2008 18:28 GMT
exactly, the server is on my local network, but not a "mapped" drive,
so it is not a local resource, hence the external website.

>If it's an ASP.NET site, why do you need to add it as an "external
>website"? Why can't you just add it as a normal project?
>
>Ah, the penny's dropping - do you not have access to the site as a -
>local file system? I've only ever developed on my local box, which
>makes life rather simpler...
Jon Skeet [C# MVP] - 05 Mar 2008 18:33 GMT
> exactly, the server is on my local network, but not a "mapped" drive,
> so it is not a local resource, hence the external website.

Any reason *not* to develop it on a local box (with source control, of
course)? Sounds like it would make your life a lot simpler.

Signature

Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet   Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk

simon - 05 Mar 2008 22:19 GMT
there are a few reasons i have to do it this way, to combersome to get
into all the details.  trust me, if i didn't have to, i would be the
first to give up on this quest
:)

>Any reason *not* to develop it on a local box (with source control, of
>course)? Sounds like it would make your life a lot simpler.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.