Accessing localhost from another PC and getting Unable to lunch IIS express web server Error - asp.net

I want to access to my localhost from another computer on the network ! I used my pc's IP and created a inbound rule for my port on windows firewall.
This is my localhost address: localhost:2523/StartUpPage.aspx I use my host system's IP 192.168.0.101 so when I use 192.168.0.101:2523/StartUpPage.aspx
I solved The HTTP 400 bad request hostname Error using this link
and I solved The 503 error on remote machine using this link
However now I can access the project on both local and remote system only for few seconds and then get the Unable to lunch IIS express web server Error popup from Visual studio!
Note: I'm running my local host on Visual studio 2012 using IIS Express!
How can I solve this problem?
Thanks in Advance!

Your IIS Express web server is configured to access from localhost by default.
You can change configuration or you can use VS Development server.
To use VS development server:
1. select "Use Visual Studio Development Server" from "Website" menu.
2. from properties of your website project, configure to use static port
3. you can use port forwarder to forward default http port to your server's port

Related

disk2vhd of working IIS7 Web Server - cannot connect from internet

Did a disk2vhd of our online production Windows Server 2008R2 server that runs an IIS7 Web Server that serves up our business application:
Launched the VHDX in a Hyper-V VM on a new Windows Server 2016 server.
Gave the VM its own public IP address.
Repointed one of our unused domain names in DNS to point to the VM's public IP address.
In the VM - edited the IIS7 site's bindings - removed the old bindings - and added the bindings for the new domain name.
Port 80 is open to the VM on our Cisco firewall.
The VM's Windows Firewall is turned OFF.
We can ping/RDP/SSH/etc. the VM with no issues!
The problem is that we cannot connect to the IIS web server at all - we get "Refused Connection" [ERR_CONNECTION_REFUSED] errors - (NOT 404 errors).
localhost... We cannot connect to the IIS Server in the VM via localhost (gives a 404 error) - but since we cannot connect via localhost in the production server either, I don't think that matters (also gives a 404 error).
Running out of ideas... help?
[...edit... IIS site binding information for this new server VM]
Remember, this VM is a copy of our real server - so...
I deleted all of the previous domain specific bindings for the IIS site.
I kept the standard bindings (but changed localhost private IP address):
type: host name: port: binding info.:
--- --- --- ---
http localhost 80 10.10.10.99
net.tcp 808:*
net.pipe *
net.msmq localhost
msmq.formatname localhost
And I added the entries for binding this copy of the IIS site to the new domain name - (not worried about https yet):
http domain.com 80 *
http www.domain.com 80 *
[...edit... Hyper-V network]
In Hyper-v manager we created a new "External" virtual switch.
We added a "Network Adapter" to the VM, but never got anywhere... so we changed to a "Legacy Network Adapter" and tried everything again... and still no IIS connection.
And, as I said... all other network services that we need to use against our server (RDP, etc.) work... that makes me believe it's only IIS that is the problem.
CBruce
Found it...
Our consultant was trying to test with localhost after we first loaded the VM - (he didn't know at that time that the production server did not work with localhost).
He forgot that he had changed the HTTP IP listener from 0.0.0.0 to 127.0.0.1 while testing. Therefore, a connection attempt was never getting to the IIS Server - it was being blocked at the interface.

SignalR on port 80/443

I try to make a push service that runs on port 80 (or 443). These are the only ports that has inbound rules on firewall (for now).
My server is windows server 2008 r2 and has IIS installed on it.
The question is whether can I run my SignalR app with owin (self host) on port 80 ? Will it be confllicted with the IIS ? Or is it possible to run my signalr on top of IIS and thus my IT won't change firewall configuration? or, another possibility is to install another vm that has no IIS installed on it and then I can use port 80 freely?
Thanks
You can definitely host SignalR application in IIS. It should be enough to just poblish finished application to website in IIS. SignalR wil then be located under this website.
Following this tutorial should be enough to get you started: http://www.asp.net/signalr/overview/getting-started/tutorial-getting-started-with-signalr

How to access ASP.NET app from another pc on the same network?

I'm running a ASP.NET on my pc and I would like to access to that app from another pc on the same network. I've tried to reach the app writing the URI of my pc on the network followed by the port number as below:
"192.168.X.X:49223/"
But it shows me an 400 error saying that it's an invalid hostname...
Is there something to do with my windows firewall or in IIS to allow access from another PC ?
Thanks for your help.
You may need to an exception in Windows Firewall.
Control Panel > Windows Firewall > Advanced Settings > Inbound/Outbound rules.
Add a new rule to both, specifying your port number and a generic name to identify its purpose.
Install IIS server on your machine, then deploy your application on that IIS server.
Refer this for Deployment assistance
To run the application on IIS instead of ASP.Net dev server you need to
Right click on solution in VS
Click on Start Options..
In Server section, Select "Use Custom Server" and then provide the URL of the application you have added earlier on IIS
Then you can easily access your website from any other machine on the same network.
Is it hosted in iis, or are you running it through Visual Studio. The funny port number (49223) tells me it's the latter.
When you run a VS project, the dev server is designd to only allow local conconnections. If you connect from a network it gets blocked by design. Their is no config around it.
What I do as a hack is run a reverse proxy like Nginx. It's a free download. Run it on your dev machine. You can tell it to listen on a port (eg 88) and then redirect tge traffic to port 49223. Give your mate the same url as before but replace the port with 88
Nb make sure your port 88 is open as per codemans answer
An example of the nginx config would be https://gist.github.com/ekinertac/5524389
This then tricks VS into thinking it came from your local machine.

unaccessible IP address using IIS 7

Recenly a network card was intalled on the server so that I can have a new IP address for my application.
Whend deploying the application on the server using IIS (using the "add site" feature) and then test the site , the site works perfectly fine from withtin the server
but when I try to access it from outside the server I get the message saying that the site is not reachable
any reason why this is happening ?
Sounds like a firewall issue. First make sure the windows firewall isn't blocking IIS. Also make sure your IT team has setup that IP address as an external server.
A few other questions about your server
1) What type of services are you hosting and is it on the standard ports? (Exhaustive list of ports on Wikipedia)
2) What version of IIS are you using?
3) Do you have a firewall/load balancer/etc between your server and the web?

IIS Express (WebMatrix) open for outside connections

I've already enabled firewall rules for IIS Express (HTTP Traffic In) and IIS Express (HTTPS Traffic In) on ports 80 and 2012 (this one is used in WebMatrix), but I can't connect to the server from my LAN. WebMatrix is running on a virtual Windows 7 machine.
Is this a limit of IIS Express?> Yes - you can redistribute IIS Express with your applications. There are no connection limits.
ScottGu's blog
It is possible though it takes some effort, there's a great blog post on this here and Vaidy talks about IIS Developer Express on the CodeCast podcast here.
Is it listening on local ports only, i.e. do you see 127.0.0.1:80 not 0.0.0.0:80 on netstat -an?
I haven't played with IIS Express yet so I don't know what the default is or how to configure this.
I was trying your same configuration and was unsuccessful in opening the Windows 7 firewall to just IIS Express. I was successful by opening the port I was using (80) to any application rather than restricting to just one application. My guess is that IIS Express goes through a service (HTTP.SYS?) and that needs to be allowed but I have not yet researched that.

Resources