I have published an ASPNET MVC3 application to a service hosting. I use standard Account controller and I’ve seen that, during app execution – after a DB save – it loses account and the user is continuously redirected to the Login page.
This does not happen on my devel machine.
Do you know which problem is it?
Edit
I’ve put today my ASPNET MVC3 app on WinHosting. The app uses native Forms Authentication used in MVC. I have an AdminController that can be accessed only by authenticated users. when the user goes to Admin/xyz the system correctly redirects him to the login page to authenticate him.
The problem is that when the user is authenticated and waits 10-15 seconds, when he clicks on a link, he is always redirected to the login form even if he is authenticated.
I thought it was a session problem and I asked WinHosting to use SQLServer sessions but I see that the SQL tables (AspStateTemp*) that should handle sessions data are always empty.
Here is the node I added in web.config:
<sessionState mode="SQLServer" allowCustomSqlDatabase = "true"
sqlConnectionString="data Source=tcp:DB_server;database=DB_name;user id=DB_user;password=DB_passwd"
cookieless="false"
timeout="600" />
This solved my problem: http://forum.winhost.com/showthread.php?p=18258#post18258