Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access my asp.net MVC website on my local IIS server from my iPad (for testing)?

I'm building an app using Visual Studio 2010. I can run my asp.net website from my computer (by pressing F5). I would like to run this website on my iPad for testing purpose.

I already disabled my Firewall and Antivirus but It doesnt' help. The IP address of my Pc is 192.168.1.6

From my computer I run my website from http://localhost:8080/

From my iPad I tried: http://192.168.1.6:8080/

I doesn't work.

Any help is greatly appreciated.

Thanks.

like image 959
Bronzato Avatar asked May 15 '11 11:05

Bronzato


People also ask

How do I access my IIS Express site from another computer?

Normally when you run an application in IIS Express, it's only accessible on http://localhost:[someport]. In order to access it from another machine, it needs to be bound to your public IP address as well. Open* D:\Users[YourName]\Documents\IISExpress\config\applicationhost. config *and find your site.


2 Answers

If you are using Visual Studio 2010 then you can use the IIS Express, which is a FULL IIS that puts Cassini on its knees. Microsoft strongly suggest that we developers stop using Cassini as our web server for debugging.

IIS Express lets you not only take the full advantages of ISS such as SSL, but enable full access for any machine on your local network, acting on port 80 or any other you would like.

First: I would like to point out the MIX Video from Scott Hanselmen about this; see this video to enlarge your knowledge on IIS Express (IIS Express starts on 32:50)

Second: After you installed VS2010 SP1 and MVC 3 Tools Update (you can update both using Web Platform Installer) right-click on your project and choose "Use IIS Express", and with this (instead Cassini) you can access your debug site from any machine on your localhost.

enter image description here

Now you just need make IIS Express to run on port 80. And for that, there's nothing better than to read Scott's Blog on it. It's about running IIS Express on port 80 as well running SSL on your dev machine/site so, just grab the bits on port 80 part :)

like image 106
balexandre Avatar answered Oct 19 '22 06:10

balexandre


You are probably using the default Visual Studio Web Developer Server (Cassini) which doesn't allow one to access the site from anywhere else than the localhost.

The easiest way around this is to change from the Web Developer Server to IIS Express. Here's a good tutorial by Scott Hanselman on how to do this. The only thing you really need to do is to click the Use IIS Express-button.

Unfortunately, by default, the IIS Express doesn't allow external access but there's an easy way around this problem too. Here's question from Stack Overflow which points you to the correct solution. After following those instructions the IIS Express should server the site outside the localhost and you should be able to connect to the page using your IPad.

Update:

Here's an another blog post which shows how to edit the IIS Express to allow external access (Section 3).

like image 34
Mikael Koskinen Avatar answered Oct 19 '22 07:10

Mikael Koskinen