0

I have a project developed in .net, and the URL for that is http://localhost:2688/WebSite2/Default.aspx and it is working fine when i run it,How can i access it from another PC?

I have tried http://IP_HERE:2688/WebSite2/Default.aspx but it does not work ..

Shaun
  • 2,313
  • 7
  • 36
  • 43

4 Answers4

2

The port 2688 isn't standard http, so I assume you're using a development server (IIS Express or VS Development server)? If so, you could look that

  1. the firewall of your Windows system allows external access to that port
  2. the server listens on all IPs (you can check this using the netstat command)

Edit:

If netstat -an lists a line like

TCP    0.0.0.0:2688    <hostname>:0    LISTENING

it's listening on all IPs (127.0.0.1 and the ips your PC has. If instead of 0.0.0.0 there is a specific ip such as 127.0.0.1, the server just listens on that specific port / ip combination

Edit 2:

Cassini cannot be accessed from another PC ( http://weblogs.asp.net/ryangaraygay/archive/2008/04/19/asp-net-development-server-cannot-be-accessed-using-non-localhost-url.aspx ) So you would have to switch to IIS Express or IIS

Sascha
  • 10,231
  • 4
  • 41
  • 65
  • yeah i am using VS Development server I have Firewall set to Off on both PCs... dont know about netstat – Shaun May 02 '12 at 05:31
  • Look here: http://weblogs.asp.net/ryangaraygay/archive/2008/04/19/asp-net-development-server-cannot-be-accessed-using-non-localhost-url.aspx Cassini binds to localhost. – Sascha May 02 '12 at 05:34
  • 1
    Deploy your web app files in IIS and then try to access it from another PC like this (without square brackets]: [http:///WebSite2/Default.aspx]. Just running it within the VS Dev environment will not work. – Prashant May 02 '12 at 05:59
  • ok, I have done all this and it is accessible but a new problem has arisen. `Parser Error Message: Unrecognized attribute 'type'. ` – Shaun May 02 '12 at 07:07
  • `Line 16: ` – Shaun May 02 '12 at 07:08
  • 1
    Please make sure, that the application pool in IIS runs with .NET 3.5. The site http://codeproject.wordpress.com/2008/01/17/configuration-error-systemwebconfigurationsystemwebextensionssectiongroup/ has a small instruction on how to change this. – Sascha May 02 '12 at 07:18
1

Inferring by the url with port 2688 that you are using visual studio development web server. You are not allowed to access it from other pc with visual studio development web server. You will find a discussion about this over here

Adil
  • 146,340
  • 25
  • 209
  • 204
1

Why are you using VS development server to access the URL from remote machine ?? I think its better if you publish it to your local IIS and then use it from there. Visual Studio development server is not meant for this purpose. But if still want to use it check the discussion on this thread Remote machines cannot connect to Visual Studio web server

Community
  • 1
  • 1
Habib
  • 219,104
  • 29
  • 407
  • 436
1

If you're using the dev server or IIS Express, you're not going to be able to do what you're trying to do. See answers here and here. That being said, this chap purports to have done what you're trying to do (with IIS Express), as has this guy.

You might consider just running a local instance of IIS and using it the way its intended to be used. Seems like it would be much easier than the alternative.

Community
  • 1
  • 1
Daniel Szabo
  • 7,181
  • 6
  • 48
  • 65