Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > VS.NET 2002/2003
|
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 21st, 2004, 08:52 AM
Registered User
 
Join Date: Mar 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Can't create ASP.Net web application due to port c

Hi all,

I'm trying to create normal ASP.Net web application locally using Visual Studio.Net 2003, this work fine as long as I have only the Default Web Site -which have the default port 80- under my IIS root directory, but once I create other web sites under the IIS root using the same port number of the Default Web Site, then Visual Studio will no longer able to create ASP.Net web application and it give the following Web Access Failed dialog:

**************************************
The default Web access mode for this project is set to file share, but the project at http://localhost/Test can not be opened with path c:\inetpub\wwwroot. The error returned was:

Unable to create Web project "Test", the file path c:\inetpub\wwwroot doesn't correspond to the URL http://localhost/Test. The two need to map to the same server location. HTTP Error 404: Object not found.
**************************************

Note: In the error dialog it show, It suggest to retry using a different file share path, I have to create "Test" folder under inetpub\wwwroot manually so VS can create the project files under it.

I want to create ASP.Net web application and still keep my current local wed sites with the same port number of Default Web Site, and that's all without any error dialog window.

Any help??
 
Old June 21st, 2004, 09:27 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

You can't have two web sites on the same port number.

Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
 
Old June 21st, 2004, 09:35 AM
Registered User
 
Join Date: Mar 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

How I can't have two web sites on the same port number?

My PC is developement unit and not live web server, all web projects work fine and I can access them without any problem, but after assign the host name for every site with the local IP address in the Microsoft Hosts file.

Quote:
quote:Originally posted by Hal Levy
 You can't have two web sites on the same port number.

Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
 
Old June 21st, 2004, 09:48 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

You can't because that's how microsoft wrote the program. Two web sites can not be on the same port and IP number- unless you use VIRTUAL sites that will redirect based on the Domain Name.

That the machine is in development doesn't change that fact.



Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
 
Old June 21st, 2004, 04:07 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Fero,

If you are using host headers to identify the different seb sites on port 80, you might be able to tell Visual Studio to connect to the web server with that host header address. I have never tried that.

If that doesn't work, then you should be able to resolve the problem this way:

For each web site, create an additional entry in your "Advanced Multiple Web Site Configuration" dialog box. You will already have one for the website with a host header on port 80. Create another one with a unique port number, but no host header. Then in visual studio, when you want to connect to/create a web project, you can tell it to connect to "http://localhost:xxxxx".
 
Old June 21st, 2004, 04:52 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

If you're using hostheaders, don't forget to change your network settings as well.

For example, if you have a hostheader for Development and one for Production, there is a fair chance that your network does not know the IP addresses for these names. If that's the case, modify your TCP/IP network settings for the machine with VS.NET on it. Add entries like the following to your lmhosts file:

192.168.1.10 Development
192.168.1.10 Production

This will direct both host headers to the machine with the address 192.168.1.10. This allows you to ping those machines with these headers, but more importantly, it allows you to create new projects in VS.NET at http://Development and http://Production.

HtH,

Imar

---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Asp.net 2.0 E-book or above? I need it, due to fin arbab ASP.NET 2.0 Basics 1 September 16th, 2008 08:35 AM
ASP.NET Web Application swifty_programmer ASP.NET 2.0 Professional 14 July 20th, 2007 08:05 AM
Unable to create ASP.NET application Sharp End ASP.NET 1.0 and 1.1 Basics 4 April 5th, 2007 06:43 PM
Open/create asp.net web application apavlidis VB.NET 2002/2003 Basics 1 July 19th, 2006 10:12 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.