I am new to ASP.Net. I have Visual Studio.Net 2003 Professional running on Windows XP Professional. When I try to create a new Web Application in Visual Studio, I get an error message saying that a connection cannot be established with the server, "localhost" on my computer. However, when I was going to write this thread, I went to create a new project while I was online on the Internet, in order to get the exact message, and Visual Studio created the project successfully. I tried doing this with only Internet Explorer running, but not actually online, and that did not work. I cannot work and have to be on the Internet, since I am using a dial-up connection and would have no way of remaining online without being timed out. I haven't seen anything in any of the books about having to actually be logged onto the Internet while working on an ASP.Net project. What can I do to correct this problem?


Do you have IIS installed? Is the World Wide Web service? What does your event log look like? Try doing a repair install on VS.NET....

IIS and ASP.Net are both installed. When I look on the IIS console, the default web server is shown as running. I put a test aspx page on the localhost server and have run it from Internet Explorer. It displays todays date and looks like it is working properly. So, it looks like the localhost server is running properly, but Visual Studio keeps getting a message saying it isn't. I just reinstalled Visual Studio and get the same result. I only discovered that Visual Studio works when I am logged on to internet by mistake.


Have you enabled fronpage extensions? What's your hosts file look like?

As I said, I am really new to this, so I am not sure that I uderstand your questions. I right clicked on the Default Web Site icon and selected Properties. I selected the Server Extensions tab, which I believe shows the settings for the FrontPage Server Extensions. It shows the following settings:

The Enable Authoring box is checked

The Version Control is set at None
The Performance is set at Use custom settings
The Client Scripting is set at JavaScript

The box labeled Don't Inherit Security Settings is not checked

Does this answer the first question about FrontPage Server Extensions being enable?

I need more information about what host file you are refering to inorder to answer the second question.

Thank you for your help. I can't seem to find any answers in the books I have looked at.

I just determined that I can work on a ASP.Net Web application without having to be logged on to the internet the whole time. I still need to be logged on to open an existing project, or create a new one, but I can then log off of the internet. After I logged off, I was able to add some text and an ASP.Net command to get the date and time to the form, and then run the application on the local server. So, the problem seems to only exist when creating a new web application or opening an existing one.

Sounds like there is a weird DNS/Hosts file issue going on. In the command prompt, try pinging localhost. What IP does that return?

When creating a new project, try using as the prefix to the project name (instead of the default http://localhost/).

This is the output from the ping of localhost:

C:\Documents and Settings\Art>ping localhost

Pinging home-vh89xy4va3 [] with 32 bytes of data:

Reply from bytes=32 time<1ms TTL=128
Reply from bytes=32 time<1ms TTL=128
Reply from bytes=32 time<1ms TTL=128
Reply from bytes=32 time<1ms TTL=128

Ping statistics for
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

I tried to open a new project using instead of localhost and got the same error message.

I am using Juno to connect to the Internet. Could the connection between the Juno software and Internet Explorer be causing the problem?

Is there some reason that Visual Studio would be trying to connect to some Internet site when it creates a new project or opens an existing one?

I didn't read all of your posts so I don't know if this will help or not, but I know I had to do all of these things before I could get anything to work.

Set up page extensions, the executable paths for each, and the verbs in iis
Extensions: .asax, .ascx, .ashx, .asmx, .aspx, .axd, .config, .cs, .csproj, .licx, .rem, .resources, .resx, .vb, .vbproj, .vsdisco, .webinfo
Executable Path: C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dll

Also try: Start - Run - and paste this in C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis -r

After I did all of this I could actually see my work.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.