I created an ASP.NET MVC project in visual studio 2015. I used the Windows Identity Foundation based template for individual accounts available in visual studio.
Then I configure it for facebook and Google.
It works perfectly when i run it from Visual Studio or IIS 7.5. I Could redirect to Google or Facebook page and I was able to register using email and I could see the records saved in the database.
However, when i deploy the app on IIS 8.5 running on windows server 2012 R2, on clicking the Facebook or google button, gives me 404 Resource Not Found Error.
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /account/externallogin
My question is do I need to do any further configuration on IIS 8.5 to get the External Authentication to work. I think the problem is IIS 8.5 is not able to recognize Startup class.
I have added nuget package Microsoft.Owin.Host.Systemweb.
I have a declaration on OWIN Startup class as
[assembly: OwinStartup(typeof(StartupDemo.TestStartup))]
I also have added
<appSettings>
<add key="owin:appStartup" value="StartupDemo.ProductionStartup" />
</appSettings>
in web.config
Also when i click register button, in IIS 7.5 i could register and login but on IIS 8.5 the registration screen simply refreshes without any message.
I verified if I could connect my SQL Server by creating a simple controller and i was able to get all Add New, Edit, Delete and View Actions working in IIS 8.5.
I think there is some requirement in IIS 8.5 to get OWIN working, any help will be much appreciated