RohitWagh
RohitWagh

Reputation: 2097

use local machine IP address to test website on local machine

Hi i am developing a website and want to test it on local machine

the flow is like this:

A -- my website

B -- third-party website

From A a request is sent to B with a url eg: http://mywebsite/abc.aspx which is a url on which B reports success or error.

so i need to define the url to report to

for this i need to give a absolute url or path.

thats why i cannot test it on local machine and have to upload it and test it.

but this doesn't allows me to track down errors and debug it.(through break points.) so i am trying to get the local machine address like "http://123.456.7.8/abc.aspx"

but doesn't seems to work. my pc is running on windows xp and is connected to router and my pc is in a network and i think that's why gets a dynamic IP.

have also tried public ip address but no luck.

any work around or help for this.

Upvotes: 0

Views: 3354

Answers (4)

Asif Mukhida
Asif Mukhida

Reputation: 142

try hosting your website on IIS and then give fix IP to your system and try to access it with your IP. Another thing is get your global IP (you can check it from Whatismyip.com ) and set it in your binding in IIS for getting request to it from across the internet.

Upvotes: 0

Grhm
Grhm

Reputation: 6834

I believe you're trying to get an external website to contact your local PC. Your local PC is behind a router and getting a private IP from your local router.

You'll need to supply the external website with an address that has the external IP of your router and configure your router to forward incoming requests to yuor PC. i.e. to forward port 80 on the router to port 80 on your XP machine.

Thus when the external website, tries the contact http://1.2.3.4/abc.aspx it will talk to your router, that will then pass ("forward") the request onto your PC at e.g. http://192.168.0.1/abc.aspx.

Upvotes: 1

Lex Li
Lex Li

Reputation: 63173

You can set up a local DNS server or simply utilize hosts file, to cheat your web browsers. For example, register test.com to your machine's IP address, and then you can use http://test.com to access IIS default web site (or your web site on IIS if you configure it for the default URL).

http://en.wikipedia.org/wiki/Hosts_%28file%29

This is a typical approach to test out web application locally.

Upvotes: 0

arshwarsi
arshwarsi

Reputation: 182

I believe You can try to use your Machine name.

Upvotes: 0

Related Questions