I have the following code:
$.ajax({
type: 'GET',
url: 'http://localhost:51914/PlayerPortal/User/Test',
}).done(function (data) {
self.user(data.userName);
// Cache the access token in session storage.
sessionStorage.setItem(tokenKey, data.access_token);
}).fail(showError);
When I CTRL+click on the url above, the call works.
But when I run it through the webpage, I get
status: 0
statusText: error
How do I debug this? What could be wrong.
Sorry, I am very new to this.
What I have tried:
I have tried everything I can.
I can create a Web API 2 combined with MVC 5 in one solution, but I want separate solutions for each. I come from a WPF/WCF background.
I want a standalone Web API 2 solution and call it from a standalone MVC 5 solution.
Simple, right?