Unable to use windows live api on local

Hi

I have a problem using the Windows Live API

I am using asp.net, cannot use callback on local

The signin link only works if I provide a live URL, but I cannot use the local host.

Please, help

+4
source share
3 answers

It might help someone else -

Add the following entry to the hosts file (located in [%system drive%]\Windows\System32\drivers\etc )

 127.0.0.1 www.example.com #[Please replace example domain with your actual one] 

The expected Windows server expects your return URL to have http: //, but chrome won't add it, and IE will add it, I figured it out after I lost time.

This will guide you through api testing on your local machine.

+7
source

Go and configure the dynamic dns name and name for your computer and run your tests this way.

For example, you can configure the DynDns.com name for your dynamic ip, and then configure the router with that name to automatically assign it (or do it manually from the pages), and then you can use that name instead of localhost. Remember to open the port for your router so that the other side can make requests.

Also on /windows/system32/drivers/etc/host you can also configure the same name to see your local host and run your tests and callbacks.

+1
source

Your problem is that the callback address should be the same as the address you used to register.

(Regarding your callback) from the documentation:

Part of the domain name of the URL (for example, www.contoso.com) should be the same as the one you specified when creating your application with Live Connect. The URL should use URL escape codes such as% 20 for spaces,% 3A for colons, and% 2F for slashes.

So, based on what you said, you are using localhost (which you cannot). As @Aristos suggested, add an entry in /windows/system32/drivers/etc/host to the domain you registered (for example, www.contoso.com).

Use www.contoso.com instead of localhost for testing.

0
source

Source: https://habr.com/ru/post/1347012/


All Articles