Click here to Skip to main content
15,909,539 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
I have uploaded my asp.net c# application on my domain in big rock. when i logged in with some id its successfully logged in but after some time on accessing application it suddenly redirects on login page. its not fixed when and from where it will be redirected but suddenly it redirects. please help me....



<configuration>
	<appsettings />
	<connectionstrings>
		<add name="conn" connectionstring="Data Source=238.98.198.196;User Id=;Password=; " providername="sqloledb" />
	</connectionstrings>
	<system.web>
   
    <httpruntime executiontimeout="110" maxrequestlength="35000" requestvalidationmode="2.0" />
		<compilation debug="true" targetframework="4.0">
		</compilation>
		<!--
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
        -->
		<authentication mode="Windows" />
		<!--
            The <customerrors> section enables configuration 
            of what to do if/when an unhandled error occurs 
            during the execution of a request. Specifically, 
            it enables developers to configure html error pages 
            to be displayed in place of a error stack trace.

       <sessionstate mode="InProc" cookieless="false" timeout="30<br mode=" hold=" />sqlConnectionString=" data="" source="208.91.198.196;User" id="Archive;Password=TechCan@011;"<br" />              stateNetworkTimeout="1000"/>
<authentication mode="Forms">
      <forms loginUrl="~/Account/Login.aspx" timeout="2880" />
    </authentication>
        -->
		<pages controlrenderingcompatibilityversion="3.5" clientidmode="AutoID" />
 <customerrors mode="Off" defaultredirect="mycustompage.htm">
            <error statuscode="403" redirect="NoAccess.htm" />
            <error statuscode="404" redirect="FileNotFound.htm" />
        </customerrors>
</customerrors></authentication></system.web>
	<!-- 
        The system.webServer section is required for running ASP.NET AJAX under Internet
        Information Services 7.0.  It is not necessary for previous version of IIS.
    -->
</configuration>



this is my web.config
Posted
Updated 25-Mar-12 12:53pm
v3
Comments
Nelek 25-Mar-12 18:54pm    
Pre tags added
fenil Jain 23-Dec-13 1:38am    
Hi betu.009

Even I am facing the same issue. Have you found the solution to this problem?

check on your session time out in ur web.config

HTML
<sessionstate mode="Off|InProc|StateServer|SQLServer">
              cookieless="true|false"
              timeout="number of minutes"
              stateConnectionString="tcpip=server:port"
              sqlConnectionString="sql connection string"
              stateNetworkTimeout="number of seconds"/></sessionstate>
 
Share this answer
 
v2
Comments
betu.009 25-Mar-12 9:22am    
i have already done that you told but still it happens...i m using session on master page to check weather user logged in or not. Will it be a cause of that error?
Shahin Khorshidnia 25-Mar-12 9:24am    
+5
betu.009 25-Mar-12 9:40am    
what is +5??
Mohamed Mitwalli 25-Mar-12 13:28pm    
hi ,
you can ask your host to supply u with his web.config because sometimes they are made some changes and the one u have it in ur solution dosn't have this consideration .
betu.009 25-Mar-12 13:57pm    
actually i was using a session named username to check weather user logged in or not on every psge.. i removed it and check now it is not redirecting to login page but currently logged user's data suddenly disappears and it looks blank the whole page..what will be the reason..on my local machine it works perfactly...
By default sessions will expire after 20 minutes and the login token will be invalidated. After that any attempt to access a resource should prompt the user to login again. This appears to be what is happening. The hosting provider may have a different timeout for the session or because of server load the sessions may be reset because of memory or performance. You should consult with your hosting provider about their policies.
 
Share this answer
 
Comments
Mohamed Mitwalli 25-Mar-12 13:30pm    
hi mark ,
i agree with u but sometime host provider made changes in the web.config.
that's why i ask from him to check his web.config .
betu.009 25-Mar-12 13:56pm    
actually i was using a session named username to check weather user logged in or not on every psge.. i removed it and check now it is not redirecting to login page but currently logged user's data suddenly disappears and it looks blank the whole page..what will be the reason..on my local machine it works perfactly...
[no name] 25-Mar-12 16:30pm    
If you are using the default ASP.NET authentication and have not created your own methods then there is no reason to create a session variable, it is automatically created and maintained for you. Please research ASP.NET authentication.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900