I have an out-of-the-box Visual Studio 2013 SPA using WebApi. I added Twitter authentication to Startup.Auth.cs and all of it works just fine when I publish to the root of an IIS web site or when I debug in VS with localhost.
What I can't figure out is how to publish the project to a subfolder like this:
In other words, http://localhost/api
The site itself works. It is the ReturnUrl from Twitter that always redirects to http://localhost/# It includes the correct access_token but in this format:
http://localhost/#access_token=fzgSLjF4W0QAHlhsNFZI...
If I manually type in "api/" before #access_token it opens the default Index page and is authenticated via Twitter. I have tweaked every setting on the Twitter side, javascript, and .cs. I just can't find a solution other than Publish to a root web site. I would like to publish to a subfolder application.
Suggestions?
See this answer
Use the Visual Studio "Web Deploy" publish method.
Set "Site name" to
localhost/api
instead of localhost
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With