Click here to Skip to main content
15,996,250 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Recently I have made a website on VS2012 with C# and after hosting it on IIS7 in Windows 7(32bit); unable to view website while browsing it “localhost refused to connect”.
For this I have applied following processes:
1. Check IIS->www services->Application Development Features-> Enable ASP.NET, ISAPI Exten and Filters
2. Publish my website as “File System” publish method successfully.
3. Cmd prompt cd %windir%\Microsoft.NET\Framework\V4.0.30319 press enter and then
asp_netregiis.exe –I –enable
4. Open IIS Manager as Admin, Right Click on Sites ->Add Website->Enter Site Name, Physical path, IP Address of My PC and change port to 10 (Since My PC connected through LAN)
On Click “Connect as…” I set Username & Password of my PC
5. In Application Pool of my website Set .NET framework to 4.0
6. Now I added Default document
I also tried these tricks
• Giving a host name as www.mysite.com and add it on C->Windows->System32->drivers->etc->hosts (open it in notepad) then write
127.0.0.1 www.mysite.com & save it.
• Also tried to host my website inside inetpub->wwwroot
• Impersonate in web.config, <identity impersonate="true" /> inside <System.web>
• Authentication in IIS of my site set Anonymous authentication Enable & Impersonation Enable
Pl help me.

What I have tried:

I have tried with different options but not succeed yet.
Posted
Updated 15-Jun-17 22:43pm
v3
Comments
Richard Deeming 15-Jun-17 11:17am    
If you've set the port to 10 instead of 80, you'll need to specify that port number in the URL: http://localhost:10/

You'll also need to check that the port is available, and not being used by another process.
Richard Deeming 15-Jun-17 11:18am    
You'll probably also need to remove the specific IP address, and use "all unassigned". I suspect a connection to localhost is going to come in on the loopback IP address, which won't match the binding.
raiamit2527 16-Jun-17 2:10am    
I tried these tricks but problem still persist and the Error is "localhost is currently unable to handle this request."

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900