Asp.net development server configuration scheme cannot connect to the localhost Web server of Visual Studio

Source: Internet
Author: User

Currently, you have encountered the following problems during program debugging:
The following error occurs: the ASP. NET development server failed to start listening on port 1757. error message: an attempt to access the socket is made in a way that the access permission is not allowed.
The following error occurs: unable to connect to the localhost Web server of Visual Studio.
After finding a solution on the Internet for a long time, let's share it with you:
>>> Step 1
[Tools]-> [External tools]-> press [add] And Enter:
1) Title: Web server port: 8080
2) command: C: windowsmicrosoft. netframeworkv2.0.50727webdev. webserver. exe
3) parameter:/port: 8080/path: $ (projectdir)
4) [Use Output Window] selected

>>> Step 2
Click the "Web server port: 8080" option that appears in the "Tools" menu after Step 1 to activate the custom web server, after activation, an "Asp.net Development Server" icon appears in the lower right corner of the window.

>>> Step 3
Right-click on the website and choose Properties> launch Options> use custom server and enter the http://www.zxbc.cn/"http: // localhost: 8080/" in the base URL /"
>>> Step 4
Remember to change the running port on the IIS of the website or project to 8080: IIS -- find your project website and right-click and change the port to 8080.
======================================
When you develop an ASP. NET application, Internet Information Services (IIS) uses the built-in development server to test and run web sites.
When you test or develop an ASP. NET application, you need a web server. Most people on the Microsoft platform use IIS, including web server, FTP server, SMTP server, and other components. IIS is installed by default in Windows 2000 Server and earlier Microsoft operating systems. IIS components are not installed by default in Windows Server 2003 and Windows XP. Of course, you are free to add or delete programs. (On Windows Server 2003, you can install IIS as an application server component .)

When do I need to use ASP. NET development server?
However, you may not be allowed to use IIS in some cases:
For example, for Windows XP Home Edition (Windows XP Home Edition), IIS is not supported (of course, you cannot use some "Tips" to make it available );

Or, for security reasons, you do not want to use a computer in your home network as a web server;
If you use IIS Web server, you need to perform some additional operations to ensure the server is secure and stable, and install the latest security updates as much as possible.
Even more likely, due to company policies, you are not allowed to install certain server components, such as IIS.

If you cannot use IIS, you can select ASP. net Development Server (Asp. net Development Server) as your web server, you can use ASP. net Development Server to test your asp.. NET page. ASP. net Development Server includes visual web developer, you can use most Windows operating systems (2000), including Windows XP Home Edition, you can run (your computer will be a server) and browse (your computer will be a viewer) Asp without using other computers.. NET page. In other words, when you cannot use IIS, ASP. NET development server allows your computer to act as both a server and a client.
ASP. NET development server provides an effective way for you to test your ASP. NET page locally before publishing the page to IIS. ASP. NET development server only supports locally authenticated computers, which requires the server to support NTLM or basic authentication. [Page]
Security suggestion: The best way is to run ASP. NET development server with a restricted identity instead of a super administrator. This prevents unauthorized access to other files on the server.

For more details, see:
Http://www.zxbc.cn/http://msdn2.microsoft.com/en-us/library/58wxa9w5.aspx)

Related questions:
1. Problems with ASP. NET development Server Installation
ASP. NET development server failed to start listening on port (dynamic port) & error Unable to connect to visual stutio's localhost Web Server
Ms sql2005 was just installed yesterday. Due to the old version of vs2005, several programs and components must be replaced when installing sql2005, including. net framework2.0, because sql2005 is a Chinese version, it must be installed.. Net framework2.0language package. It can be found that the setup.exe error occurs at the time of installation. There is no way to download one online. net frameworr2.0 Chinese package, finally skipped a sql2005 installation program, successfully installed.
Started to run vs2005, but when F5 or Ctrl + F5, \ "ASP. net Development Server failed to start listening on port ***** \ ", and then jump out of the warning Box \" error Unable to connect to visual stutio's localhost Web Server \", I found a lot of information on the Internet. The main solution is:

Does the file webdev.webserver.exe exist in C: windowsmicrosoft. netframeworkv2.0.xxxxx?
Is Ie your default browser? Make sure in Internet Explorer, tools | Internet Options, Connections tab, LAN Settings, that you have 'Bypass proxy server for local addresses 'checked if you are using a proxy server.
If Windows Firewall is running check Windows Firewall settings. Turn on the option on the exceptions tab to \ "receive restrictions when firewall is running \". It's possible firewall is blocking webdev.webserver.exe
What happens when you press Ctrl + F5 instead of F5 to run the site? CTRL + F5 is 'run without debugging'
What do you see in your browser when you type the address http://www.zxbc.cn/"http: // localhost: 80 /"?
Then follow the prompts above to find a solution. But none of them are found.
Later I found that the original. Net framework2.0 version was too low. I had to reinstall. Net framework2.0 to solve the problem. I had to create a new solution. After adding the previous project, no problems will occur during running. However, this is so troublesome that no simple solution has been found.

2. ASP. NET development server development site issues
In a Chinese operating system, for example, we have such an Asp.net page default. aspx

Its functions are extremely simple. Only the following functions are available:
Program code
Protected void page_load (Object sender, eventargs E)
{
Response. Write (request. rawurl );
Response. Write (\"
\");
Response. Write (request. querystring [\ "AAA \"]);
}

 

This page is requested separately at the ASP. NET development server development site as follows:
Http://www.zxbc.cn/"http: // localhost: 8186/website2/default. aspx? AAA \ "= Haha & BB = c123
Return Value:
/Website2/default. aspx? AAA = & BB = c123 [Page]

The Chinese characters in the middle are automatically killed.
For the same program, there is no problem on IIS. Therefore, pay attention to this when making programs. There may be problems with the development environment and the running environment.
In addition, in the Chinese operating system, vs2005 by default to create an HTML page, is the ASCI code file, by default to create An ASPX page, is a UTF-8 encoded file. If a Chinese parameter value is transmitted between these two files, garbled characters may occur.

3. vs2005 development and use Firefox to access the Asp.net development server site:
Today, I tested the code displayed by the Treeview control in vs2005. When it worked in a non-IE browser, I found:
When you use Firefox to access the Asp.net development server site (that is, the development web site that comes with vs2005), you will be asked to enter the user account and password, however, no matter which account you enter, the access is denied.

Search for Google and find that someone reported the bug to Microsoft in December and answered the corresponding questions.

Solution:
For the solution, see the following link.
Bug details: Asp.net Development Server need identification with Firefox on non ie-Browser
Http://www.zxbc.cn/"http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx? Feedbackid = 582fcb60-47cd-4475-869b-130786c0814d \"

Specifically, enter "about: config" in the address bar of Firefox.
Then, enter NTLM in the filter.
At this time, we can see that there are only two items in the filter results.
One of them is: network. automatic-ntlm-auth.trusted-this
Double-click this item and enter localhost in the input value.
Enter the site name of Asp.net development server.
Close Firefox and re-access the Asp.net development server site to solve this problem.

Cause:
ASP. NET development web server performs NTLM verification for each request to confirm that the request from the same user is processed.
This is automatically completed in IE, and Firefox requires the above settings.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.