VS2008 - Localhost debug ...

Recently upgraded to VS 2008 and trying to debug a web application.

When I start the application the url is something like

http://localhost:nnn/project_name/default.aspx

This is new and causes my web to fail because of the project_name embedded
in the url.

How do I get the url to be like

http://localhost:nnnn/default.aspx ?

Thanks...
Michael Tissington [ So, 20 April 2008 01:44 ] [ ID #1946160 ]

Re: VS2008 - Localhost debug ...

"Michael Tissington" <mtissington [at] newsgroup.nospam> wrote in message
news:%233tdPdnoIHA.3652 [at] TK2MSFTNGP03.phx.gbl...
> Recently upgraded to VS 2008 and trying to debug a web application.
>
> When I start the application the url is something like
>
> http://localhost:nnn/project_name/default.aspx
>
> This is new and causes my web to fail because of the project_name embedded
> in the url.
>
> How do I get the url to be like
>
> http://localhost:nnnn/default.aspx ?
>


I don't know of a way to make the development web server serve a project as
its root.

I would tend to seek ways to make the app work in both scenarios by making
use of ~/ prefixed urls where an absolute path in to the application is
needed and using relative URLs where reasonable.

Alternatively you can use IIS for debugging you just need to attach to the
appropriate process to debug managed code.


--
Anthony Jones - MVP ASP/ASP.NET
Anthony Jones [ So, 20 April 2008 10:13 ] [ ID #1946169 ]

Re: VS2008 - Localhost debug ...

re:
!> How do I get the url to be like
!> http://localhost:nnnn/default.aspx ?

Hi, Michael.

In your Website's project's Solution Explorer, highlight the Project's name,
right-click it and select "Property Pages" from the dropdown menu.

Then, selct the "Start URL" radio button, and write : http://localhost/ in the texbox.
OK out of that dialog...and right-click default.aspx, and then "View in browser".

The URL should have the format you want : http://localhost:nnnn/default.aspx




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
======================================
"Michael Tissington" <mtissington [at] newsgroup.nospam> wrote in message news:%233tdPdnoIHA.3652 [at] TK2MSFTNGP03.phx.gbl...
> Recently upgraded to VS 2008 and trying to debug a web application.
>
> When I start the application the url is something like
>
> http://localhost:nnn/project_name/default.aspx
>
> This is new and causes my web to fail because of the project_name embedded in the url.
>
> How do I get the url to be like
>
> http://localhost:nnnn/default.aspx ?
>
> Thanks...
nomailreplies [ So, 20 April 2008 15:37 ] [ ID #1946180 ]

Re: VS2008 - Localhost debug ...

re:
!> select "Property Pages" from the dropdown menu.
!> Then, select the "Start URL" radio button

There should have been an intermediate step :

Select "Start Options" in the left menu, if the Property Pages don't default to it.

*Then* you can select the "Start URL" radio button.

Sorry if I wan't clear enough.
In any case, that's all you need to do.



Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
======================================
"Juan T. Llibre" <nomailreplies [at] nowhere.com> wrote in message news:%2373whuuoIHA.3860 [at] TK2MSFTNGP02.phx.gbl...
> re:
> !> How do I get the url to be like
> !> http://localhost:nnnn/default.aspx ?
>
> Hi, Michael.
>
> In your Website's project's Solution Explorer, highlight the Project's name,
> right-click it and select "Property Pages" from the dropdown menu.
>
> Then, selct the "Start URL" radio button, and write : http://localhost/ in the texbox.
> OK out of that dialog...and right-click default.aspx, and then "View in browser".
>
> The URL should have the format you want : http://localhost:nnnn/default.aspx
>
>
>
>
> Juan T. Llibre, asp.net MVP
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en espaņol : http://asp.net.do/foros/
> ======================================
> "Michael Tissington" <mtissington [at] newsgroup.nospam> wrote in message news:%233tdPdnoIHA.3652 [at] TK2MSFTNGP03.phx.gbl...
>> Recently upgraded to VS 2008 and trying to debug a web application.
>>
>> When I start the application the url is something like
>>
>> http://localhost:nnn/project_name/default.aspx
>>
>> This is new and causes my web to fail because of the project_name embedded in the url.
>>
>> How do I get the url to be like
>>
>> http://localhost:nnnn/default.aspx ?
>>
>> Thanks...
>
>
nomailreplies [ So, 20 April 2008 16:42 ] [ ID #1946183 ]

Re: VS2008 - Localhost debug ...

Thanks for the idea about ~/ ... however this only works for server
components, and I can not use it for things like href ...
Michael Tissington [ So, 20 April 2008 19:03 ] [ ID #1946193 ]

Re: VS2008 - Localhost debug ...

Thanks for the idea about ~/ unfortunately this only works for server
components ...

This has only become a problem in VS 2008, in VS2005 it worked correctly
.....

I can't imagine why they changed this ???
Michael Tissington [ So, 20 April 2008 19:27 ] [ ID #1946194 ]

Re: VS2008 - Localhost debug ...

re:
!> I can't imagine why they changed this ???

Nothing's changed.
Follow the instructions I posted, and you'll have the exact behavior you want to have.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
======================================
"Michael Tissington" <mtissington [at] newsgroup.nospam> wrote in message news:eJnGDvwoIHA.2160 [at] TK2MSFTNGP06.phx.gbl...
> Thanks for the idea about ~/ unfortunately this only works for server components ...
>
> This has only become a problem in VS 2008, in VS2005 it worked correctly ....
>
> I can't imagine why they changed this ???
nomailreplies [ So, 20 April 2008 19:42 ] [ ID #1946195 ]

Re: VS2008 - Localhost debug ...

Juan,

I tried what you suggested and it did not help - exactly the same issue!
Michael Tissington [ So, 20 April 2008 20:36 ] [ ID #1946196 ]

Re: VS2008 - Localhost debug ...

re:
!> I tried what you suggested and it did not help - exactly the same issue!

Then the problem is not the URL in question.
The instructins I gave you *do* work to get a base URL.

What is the error message displayed ?




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
======================================
"Michael Tissington" <mtissington [at] newsgroup.nospam> wrote in message news:%231RdrVxoIHA.6096 [at] TK2MSFTNGP06.phx.gbl...
> Juan,
>
> I tried what you suggested and it did not help - exactly the same issue!
nomailreplies [ So, 20 April 2008 20:51 ] [ ID #1946197 ]

Re: VS2008 - Localhost debug ...

No error is displayed, I get exactly the same results, to see if it was
something in my website I have even tried creating a brand new website and
after setting the startup options as you suggested I still get the
following.

http://localhost:nnn/<project>/default.aspx
Michael Tissington [ So, 20 April 2008 22:05 ] [ ID #1946199 ]

Re: VS2008 - Localhost debug ...

Very strange - this is what I have things set to :(
Michael Tissington [ So, 20 April 2008 23:36 ] [ ID #1946201 ]

Re: VS2008 - Localhost debug ...

Stranger still ... I can put anything (http://foo/) in the start url and it
seems to be ignored ...
Michael Tissington [ Mo, 21 April 2008 00:17 ] [ ID #1946527 ]

Re: VS2008 - Localhost debug ...

Both "localhost" and "YourMachineName", in the "Start URL",
should provide base URLs using localhost.

Do you have a "localhost" entry in your HOSTS file, pointing to 127.0.0.1 ?

The HOSTS file is found in :

Drive:\WINDOWS\system32\drivers\etc

If you've never used it, you may only have a HOSTS.SAM file.

Load it in Notepad, save it as hosts ( no txt extension ) and add this line to it :

127.0.0.1 localhost

Then, try again.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
======================================
"Michael Tissington" <mtissington [at] newsgroup.nospam> wrote in message news:uU%23VO6yoIHA.2208 [at] TK2MSFTNGP04.phx.gbl...
> Very strange - this is what I have things set to :(
nomailreplies [ Mo, 21 April 2008 01:11 ] [ ID #1946531 ]

Re: VS2008 - Localhost debug ...

Thanks for you help with this ...

Yes I already had a HOSTS file with the correct entry for localhost ...
If I open IE and enter http://localhost I get the default page for IIS 7.
Michael Tissington [ Mo, 21 April 2008 01:20 ] [ ID #1946532 ]

Re: VS2008 - Localhost debug ...

OK, I totally uninstalled VS 2008, and then reinstalled it and now it works
correctly.

Thanks for your help.
Michael Tissington [ Mo, 21 April 2008 01:39 ] [ ID #1946533 ]

RE: VS2008 - Localhost debug ...

The simplest - and most reliable -- solution is to *NOT* use the built-in
development server, and instead use IIS. In the property sheet for "Web"
select IIS and click the button to create a an application root for your
solution. The resultant url would then be

http://localhost/myappname/default.aspx

-- Peter
To be a success, arm yourself with the tools you need and learn how to use
them.

Site: http://www.eggheadcafe.com
http://petesbloggerama.blogspot.com
http://ittyurl.net


"Michael Tissington" wrote:

> Recently upgraded to VS 2008 and trying to debug a web application.
>
> When I start the application the url is something like
>
> http://localhost:nnn/project_name/default.aspx
>
> This is new and causes my web to fail because of the project_name embedded
> in the url.
>
> How do I get the url to be like
>
> http://localhost:nnnn/default.aspx ?
>
> Thanks...
>
>
pbromberg [ Mo, 21 April 2008 02:30 ] [ ID #1946537 ]

Re: VS2008 - Localhost debug ...

Hi Michael,

It seems you've got what you want. Just some further clarity on this:

If you're using Visual Studio test server for ASP.NET web site project in
VS 2008, you can customize the port number and virtual path used by the
test server. Just follow the below steps:

**select your project(website) node in solution explorer

** in the property window you can find the "port number" and "virutal path"
properties. You can customize to the value you want.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg [at] microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/de fault.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
>From: "Michael Tissington" <mtissington [at] newsgroup.nospam>
>In-Reply-To: <ODpNovzoIHA.4616 [at] TK2MSFTNGP05.phx.gbl>
>Subject: Re: VS2008 - Localhost debug ...
>Date: Sun, 20 Apr 2008 16:39:54 -0700

>
>OK, I totally uninstalled VS 2008, and then reinstalled it and now it
works
>correctly.
>
>Thanks for your help.
>
>
stcheng [ Mo, 21 April 2008 07:09 ] [ ID #1946554 ]

Re: VS2008 - Localhost debug ...

re:
!> reinstalled it and now it works correctly.

Whew !

Glad you got rid of the problem.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
======================================
"Michael Tissington" <mtissington [at] newsgroup.nospam> wrote in message news:eXwgW$zoIHA.3860 [at] TK2MSFTNGP02.phx.gbl...
> OK, I totally uninstalled VS 2008, and then reinstalled it and now it works correctly.
>
> Thanks for your help.
nomailreplies [ Mo, 21 April 2008 12:22 ] [ ID #1946582 ]

Re: VS2008 - Localhost debug ...

re:
!> The resultant url would then be
!> http://localhost/myappname/default.aspx

Peter,

I think his main focus was on getting rid of the directory name
because his application would run as a root app on his server
and he wanted to debug the app, in development, as a root-based URL.

i.e., while debugging, he wanted a URL like this :

http://localhost/default.aspx





Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
======================================
"Peter Bromberg [C# MVP]" <pbromberg [at] yahoo.NoSpamMaam.com> wrote in message
news:2B214208-0B32-41AB-A8C9-9B0990A142BD [at] microsoft.com...
> The simplest - and most reliable -- solution is to *NOT* use the built-in
> development server, and instead use IIS. In the property sheet for "Web"
> select IIS and click the button to create a an application root for your
> solution. The resultant url would then be
>
> http://localhost/myappname/default.aspx
>
> -- Peter
> To be a success, arm yourself with the tools you need and learn how to use
> them.
>
> Site: http://www.eggheadcafe.com
> http://petesbloggerama.blogspot.com
> http://ittyurl.net
>
>
> "Michael Tissington" wrote:
>
>> Recently upgraded to VS 2008 and trying to debug a web application.
>>
>> When I start the application the url is something like
>>
>> http://localhost:nnn/project_name/default.aspx
>>
>> This is new and causes my web to fail because of the project_name embedded
>> in the url.
>>
>> How do I get the url to be like
>>
>> http://localhost:nnnn/default.aspx ?
>>
>> Thanks...
>>
>>
nomailreplies [ Mo, 21 April 2008 12:25 ] [ ID #1946583 ]
Microsoft » microsoft.public.dotnet.framework.aspnet » VS2008 - Localhost debug ...

Vorheriges Thema: VB .Net - Upload Files - Enctype=multipart/form-data
Nächstes Thema: Detect Client-side Keyboard Layout