Reputation: 1166
HI,
I have issue in using Windows live API
Iam using asp.net, am not able to use the callback url on local
The signin link is working only if i provide live url, but i cant able to use local host.
Please help
Upvotes: 4
Views: 1382
Reputation: 16195
It may help someone else also -
Please add following entry in hosts file (located at [%system drive%]\Windows\System32\drivers\etc
)
127.0.0.1 www.example.com
#[Please replace example domain with your actual one]
Windows live server expects your return url to have http:// in it but chrome does not add it and IE do add it, I realized this after wasting sometime.
This should get you through testing api on your local machine.
Upvotes: 7
Reputation: 7169
Your problem is that the callback address needs to be the same as the address you used to sign up with.
(In relation to your callback), from the documentation:
The domain name portion of the URL (for example, www.contoso.com) must be the same as the one that you specified when you created your application with Live Connect. The URL must use URL escape codes, such as %20 for spaces, %3A for colons, and %2F for forward slashes.
So, based on what you have said, you are using localhost (which you can't). As @Aristos suggested, add an entry to /windows/system32/drivers/etc/host
to the domain you have registered (eg www.contoso.com).
Use www.contoso.com instead of localhost to test.
Upvotes: 0
Reputation: 66641
Go and setup a dynamic dns and a name for your computer and make your tests this way.
For example you can setup on DynDns.com a name for your dynamic ip, and then setup your router with that name to automatic assign it (or do it manual from the pages), and then you can use this name, and not the localhost. Do not forget to open the port to your router so the other side can make requests.
Also on /windows/system32/drivers/etc/host
you can also setup the same name to see your local host and make your tests and callbacks.
Upvotes: 1