1

I have 2 ASP.NET MVC web applications setup under the same domain. One is just a standard MVC website. The other is a Web API project. For now I am just setup locally.

* http://localhost/myapp
* http://localhost/api

I am using forms authentication to login in to the web application and then accessing the api application via a jQuery $.get request. Is there a way to share the forms authentication from the web app with the API app? Again these are 2 separate applications but are sharing the same root domain.

1 Answer 1

2

I found the answer. I just needed to add a matching machineKey element to the web.config file for both of my applications.

<machineKey validationKey="..."
            decryptionKey="..."
            validation="SHA1"
            decryption="AES"
            />
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.