473,402 Members | 2,072 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

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...

Jun 27 '08 #1
19 1851
"Michael Tissington" <mt*********@newsgroup.nospamwrote in message
news:%2****************@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
Jun 27 '08 #2
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" <mt*********@newsgroup.nospamwrote in message news:%2****************@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...

Jun 27 '08 #3
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" <no***********@nowhere.comwrote in message news:%2****************@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" <mt*********@newsgroup.nospamwrote in message news:%2****************@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...


Jun 27 '08 #4
Thanks for the idea about ~/ ... however this only works for server
components, and I can not use it for things like href ...

Jun 27 '08 #5
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 ???

Jun 27 '08 #6
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" <mt*********@newsgroup.nospamwrote in message news:eJ**************@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 ???

Jun 27 '08 #7
Juan,

I tried what you suggested and it did not help - exactly the same issue!
Jun 27 '08 #8
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" <mt*********@newsgroup.nospamwrote in message news:%2****************@TK2MSFTNGP06.phx.gbl...
Juan,

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

Jun 27 '08 #9
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

Jun 27 '08 #10
Very strange - this is what I have things set to :(
Jun 27 '08 #11
Stranger still ... I can put anything (http://foo/) in the start url and it
seems to be ignored ...

Jun 27 '08 #12
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" <mt*********@newsgroup.nospamwrote in message news:uU****************@TK2MSFTNGP04.phx.gbl...
Very strange - this is what I have things set to :(

Jun 27 '08 #13
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.

Jun 27 '08 #14
OK, I totally uninstalled VS 2008, and then reinstalled it and now it works
correctly.

Thanks for your help.

Jun 27 '08 #15
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...

Jun 27 '08 #16
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:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "Michael Tissington" <mt*********@newsgroup.nospam>
In-Reply-To: <OD**************@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.

Jun 27 '08 #17
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" <mt*********@newsgroup.nospamwrote in message news:eX**************@TK2MSFTNGP02.phx.gbl...
OK, I totally uninstalled VS 2008, and then reinstalled it and now it works correctly.

Thanks for your help.

Jun 27 '08 #18
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]" <pb*******@yahoo.NoSpamMaam.comwrote in message
news:2B**********************************@microsof t.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...


Jun 27 '08 #19
Hey guys,

you dont need to do any of that... its very simple.
Just highlight the project name at the top of the solutions explorer.
You should see the properties box highlight underneath the solutions
explorer.. if not you need to add this toolbar under tools.

Just change the 'Virtual path' to '/' and run debug and bobs your uncle!
Dont use 'Start URL' under startup options as someone said above... this
will only confuse matters.

*** Sent via Developersdex http://www.developersdex.com ***
Jun 27 '08 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, i created a basic web app in vs2008 and deployed it to my localhost. when i tried to browse the site, i get the iis message "page cannot be displayed." any iideas? thanks, rodchar
8
by: Joe Withawk | last post by:
I have a solution consisting of a c# project as win application and a c++ project as classlibrary. Both are .net 2.0 The classlibrary handles some loading of quicktime movies, but that should not...
1
by: CMoya | last post by:
It seems whenever I create new Web Site projects in VS2008, there is only a Debug configuration available, not Release. Is this a bug or by design? Upgraded Web Sites (from 2005) show both. So do...
3
by: =?Utf-8?B?cmF1bGF2aQ==?= | last post by:
Vista sp1 C# Hi: after I opened a vs2005 IDE... my breakpoints when debugging in vs2008 dont work any more, any ideas? the test finished but It does not stop. Thanks
16
by: Harry Simpson | last post by:
I've been away from ASPNET - I open up a new Web app in VS2008 and go into properties and select to use IIS instead of the personal web server. Then I run in debug mode and it says I have to set...
8
by: Frank Hauptlorenz | last post by:
Hello out there, I changed an existing and good working webservice from an wsHttpBinding to an NetTcpBinding. This is working (after trying some time) and has real a better performance! But...
0
by: Alejandro Gaio | last post by:
Hello All, I have a problem that appeared with the NEW VERSION of the vb.net compiler (VS 2008). To resume things, I have a project (call it "DocumentAdministrator") with several forms, and two...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.