开发者

Access webpage on lan or remote location running on VisualStudio (2008)

I am deving a webpage. For testing purposes i want to access the webpage via my VM开发者_运维问答 and possibly ask a friend to mess with it remotely. The app is running in visual studios 2008. I put set my router DMZ to my IP address and i tried connecting via VM and remotely. No luck. How do i config visual studios to listen outside of the machine?


The visual studio web server is hardcoded to not allow access remotely. You need to use a proxy server running on your local system on another port to allow access to it, or publish the site in another webserver that DOES allow remote connections, like IIS.

Eg: VisualStudio serving the site on http://localhost:23456, set up a reverse proxy on port 82, which goes to localhost:23456, and then when you connect to http://[your computers ip]:82 (http://192.168.0.102:82 for example), you'll get the site running in visual studio.

Note one downside to the proxy method is if someone else is accessing the site, and you have breakpoints set, they will be triggering them remotely and interfering with your use of the site (I believe this is why it's disabled remotely). Better to publish via IIS to avoid this problem.


I'm not sure on the answer to this, and this might sound a bit obvious so don't mark me down for it as I'm just trying to be helpful, but are you using the port the development web server is running on in the url? e.g. http://1.2.3.4:5678

Edit

The answer to this question provides a work around you may be able to use.


I'm going to assume you have a version of Windows that allows you to use IIS.

But why not create a virtual directory in IIS, point it to your website and then give your friend that link.

So locally you'd access it like this: http://localhost/mysite

Your friend would access it like this (assuming your router configured correctly and using port 2222 redirecting to local port 80): http://your.I.P.here:2222/mysite

Then you should be good to go.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜