You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use this library in a brand new MVC 4 project (Internet template) on .Net 4.5 and using VS 2012. I followed the directions and added all items necessary. I copied and fixed up the controllers, views, viewmodels, and Repository items from the sample project into this new project. Nothing security related would work. I couldn't log in.
I traced into the AppHarbor.Web.Security.CookieAuthenticationModule and at the OnAuthenticateRequest method, there would be no '.APSXAUTH' cookie. All of the other cookies I added would appear but not that one, and so authentication never worked. I changed the name of the authentication cookie in the web.config, and then that cookie no longer appeared in the OnAuthenticateRequest method. It was as if something was consuming the cookie before it got to the module.
I tried various ways of getting around the issue and in the end found that the issue is something within the MVC 4 Internet Template. I am assuming that there is another step that has to occur, such as removing the SimpleMembershipProvider. I did not figure out what needed to change. Using the "Basic" template with MVC 4 and .net 4.5 and this library worked just fine.
This is not a bug in the library, but maybe some more guidance can be listed regarding using this authentication method and the Internet template for MVC4. Several hours wasted tracking this down, so hopefully someone with more experience with how MVC4, SimpleMembershipProvider, etc. can write the other steps that need to be taken if using this with the new "Internet" template.
The text was updated successfully, but these errors were encountered:
I experienced the same issue @jgilm was seeing with getting the '.APSXAUTH' cookie to show up in the MVC4 Internet Template. I removed the SimpleMembershipProvider component and it works. I think it has something to do with WebMatrix references although I am not entirely sure what it is either.
If you not using any WebMatrix security features in assembly WebMatrix.WebData, just remove the reference. or
Add key to appSettings:
As for the second option, not sure what are the implications on WebMatrix security because i don't use it, so it's up to you to test it.
I tried to use this library in a brand new MVC 4 project (Internet template) on .Net 4.5 and using VS 2012. I followed the directions and added all items necessary. I copied and fixed up the controllers, views, viewmodels, and Repository items from the sample project into this new project. Nothing security related would work. I couldn't log in.
I traced into the AppHarbor.Web.Security.CookieAuthenticationModule and at the OnAuthenticateRequest method, there would be no '.APSXAUTH' cookie. All of the other cookies I added would appear but not that one, and so authentication never worked. I changed the name of the authentication cookie in the web.config, and then that cookie no longer appeared in the OnAuthenticateRequest method. It was as if something was consuming the cookie before it got to the module.
I tried various ways of getting around the issue and in the end found that the issue is something within the MVC 4 Internet Template. I am assuming that there is another step that has to occur, such as removing the SimpleMembershipProvider. I did not figure out what needed to change. Using the "Basic" template with MVC 4 and .net 4.5 and this library worked just fine.
This is not a bug in the library, but maybe some more guidance can be listed regarding using this authentication method and the Internet template for MVC4. Several hours wasted tracking this down, so hopefully someone with more experience with how MVC4, SimpleMembershipProvider, etc. can write the other steps that need to be taken if using this with the new "Internet" template.
The text was updated successfully, but these errors were encountered: