473,468 Members | 1,314 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to create a website without virtual directory?

I use Visual Studio .NET 2005 to create a website called "website1".
When I start this website in Visual Studio, the URL is

http://localhost:49299/website1/default.aspx

How can I get rid of "/website1" in the path? I want the URL to be
http://localhost:49299/default.aspx

The reason I want to get rid of /website1 is that I want the URL to be
http://www.mycompany.com/default.aspx on production machine.

Please advise.
Thanks

May 21 '07 #1
3 1841
You don't really. The only other way to do this would be to install IIS and
not use the VS-net web server and create your site at the IIS root
(inetpub/wwwroot). This doesn't really matter though as any well-designed
app can move from a sub-directory to a root directory. Code image and urls
against the application root and you'll be fine, that way when you move to
another directory level the links and resources will always be referenced
relative to the root of the application.
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
<ni**********@lexisnexis.comwrote in message
news:11**********************@y2g2000prf.googlegro ups.com...
>I use Visual Studio .NET 2005 to create a website called "website1".
When I start this website in Visual Studio, the URL is

http://localhost:49299/website1/default.aspx

How can I get rid of "/website1" in the path? I want the URL to be
http://localhost:49299/default.aspx

The reason I want to get rid of /website1 is that I want the URL to be
http://www.mycompany.com/default.aspx on production machine.

Please advise.
Thanks

May 21 '07 #2
Follow the instructions given by Scott Guthrie in this blog post:

"How to Run a Root "/" Site with the Local Web Server using VS 2005 SP1" :
http://weblogs.asp.net/scottgu/archi...-2005-sp1.aspx

If you haven't install VS 2005 SP1...do it.
It fixes many other problems...and lets you run websites as the root with the internal web server.

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/
======================================
<ni**********@lexisnexis.comwrote in message
news:11**********************@y2g2000prf.googlegro ups.com...
>I use Visual Studio .NET 2005 to create a website called "website1".
When I start this website in Visual Studio, the URL is

http://localhost:49299/website1/default.aspx

How can I get rid of "/website1" in the path? I want the URL to be
http://localhost:49299/default.aspx

The reason I want to get rid of /website1 is that I want the URL to be
http://www.mycompany.com/default.aspx on production machine.

Please advise.
Thanks


May 21 '07 #3
Mark:
Code image and urls
against the application root and you'll be fine, that way when you move to
another directory level the links and resources will always be referenced
relative to the root of the application.
How do I do that? If I use <img src="/website1/images/xyz.gif">, it
works in Visual Studio but not on production. If I use <img src="/
images/xyz.gif">, it works on production but not on Visual Studio. I
also tried <img src="~/images/xyz.gif">, it does not work.

Same problem with css. If I use
<link href="/css/style.css" rel="stylesheet" type="text/css">, it
works on production but not on Visual Sudio.

Please advise.

Thanks

May 22 '07 #4

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

Similar topics

5
by: David Webb | last post by:
The problem started when the Working Folder for a project was somehow set to the folder of another project. I set the correct working folder in VSS and deleted the .vbproj files that had been...
0
by: No Spam | last post by:
After looking all the ways to progrrammatically create a new FTP Server & Virtual Directory, I have come to see that the code below is the cleanest. Here is my basic issue. When I run this code, I...
2
by: Mickey | last post by:
When I try to create a new web application in VS Studio .NET 2003 at a simple default location eg: http://localhost/WebApplication1 I get the following error: Visual Studio .NET cannot create or...
1
by: Jack G | last post by:
I've been trying to create a new web application project in Visual Studio 2003 running on a Windows Server 2003. I get the message Window titled Web Access Failed The default Web access mode for...
3
by: Opa | last post by:
Hi, Been stumped for many, many hours trying to create a web service project. I greatly appreciate any help. I get an error everytime I try to use the Visual Studio.NET wizard to create a...
6
by: Steve Mauldin | last post by:
I have three websites that were developed by using the same code in .net. They are all located under wwwroot on my desktop running windows 2000 pro.because Windows 2000 pro only supports a single...
10
by: TS | last post by:
i just noticed the website i created in VS 2005 is running on a different port than the default. I see that it is running on the local web server, and also that the website i created isn't in IIS....
6
by: Eric | last post by:
Hi Everyone, I have an ASP 1.1 website being hosted in a virtual directory that is a child node of an ASP 2.0 website. So I have: http://mainapp (which is a 2.0 site) And: ...
2
by: John_Doe | last post by:
Can anyone clarify what the difference between these two choices is when developing website? I have IIS installed too, so I can pick this too if there is a reason. From the point of view of...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.