More Group Sites
Education Books
School Rankings
Jobless Net
Better Home

Help | Subscribe/Unsubscribe | Rules | Other Group Sites: Better Education | Better Education Forum
Welcome Guest! To enable all features please Login or Register.



Go to last post Go to first unread
#1 Posted : Saturday, March 25, 2017 8:35:21 AM(UTC)

Rank: Administration


Groups: AcademicCoachingSchool, admin, Administration, BookSeller, CatholicSchool, CoachingAdult, CoachingProfessional, CoachingSports, ExtraCurriculumCoaching, IndependentSchool, Moderator, MusicTeacher, PrivateSchool, PublicSchool, SelectiveSchool, tutor
Joined: 11/23/2008(UTC)
Posts: 521

Visual Studio unable to connect to configured development server

The Error:
Unable to connect to the configured development Web server.
Failed to register URL "http://localhost:49692/" for site "BetterEducation" application "/". Error description: The process cannot access the file because it is being used by another process. (0x80070020)

As we all know, restarting Visual Studio won't help. We need to use the following tools to find the owning process / application that grabbed the port. Normally after finding Process ID PID, press Ctrl+Shift+Esc to open task manager. With details view or select columns-> process id, end that process and restart iis. Then we are done.

use netstat with a - all, b - binary /executable, n - numeric format for address and port number, o - owing process ID
netstat -aob
netstat -aob | findstr '49692'
netstat -ban

netstat -aon | find ":49692"

but neither command could help find port 49692.

also couldn't find the application that grabbed the port using TCPView from Microsoft, which can be downloaded from internet.

I then closed all browsers. it didn't help either. I didn't check and end all the processes in task manager as I don't like this way.

We know restart PC, it will be OK. But this is not a solution.


So now we have to change the port. We used to set dynamic port and change the port number via project context menu properties. From Visual Studio 2013, this is no longer available. We need to edit the file %systemdrive%:\Users\<username>\Documents\IISExpress\config\applicationhost.config and change the port for the IIS Express. After changing a port, a new site (ID) is created, eg. BetterEducation(1), BetterEducation(2),...To remove the duplicated sites,
Open Visual Studio (without solution)>File>Open Web Site>Local IIS>delete the duplicated websites. Don't open website at this step. Close Visual Studio and then open solution.

Edited by user Saturday, March 25, 2017 8:55:46 AM(UTC)  | Reason: Not specified

Rss Feed  Atom Feed
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.