Ask a Question related to ASP.NET Security, Design and Development.
-
enahar #1
how to time out the web asp.net application when not in use for 15 minutes
Hi,
How to timing out the asp.net web application when not in use for 15 minutes
although I am using the code in web.config file as below:
<authentication mode="Forms">
<forms loginUrl="Security/Login.aspx" protection="All" timeout="20" path="/"
/>
</authentication>
Thanks
enahar Guest
-
Convert minutes to Hours and Minutes
Hi There It's getting late and my brain is feeling like a Larne sausage :-) What I want to achieve is to convert a total number of minutes into... -
Time Format in datagrid (Hours, Minutes, Seconds)
I have a column in my database that stores total seconds. I want to bind this colum to my datagrid. Is there a way to have the time show as hours,... -
Time question - add 15 minutes
I have a time field in an access database and I want to be able to add 15 minutes to it. I can do this manually by taking the minute, adding 15... -
Weird spike in System time every 5:00 minutes...
Hi All, I have what I consider to be an odd behavior on some of my AIX boxes. So far, on most of the AIX servers I have that are running Sybase,... -
Calculate elapsed time in minutes
Try: DateDiff("n",,) Your code has you comparing TaskStart to TaskStart and then dividing the result (which is in minutes from the 'n'... -
PL #2
Re: how to time out the web asp.net application when not in use for 15 minutes
20 is not 15 :-)
You also need to disable slidingExpiration by setting it to false
and you need to make sure you dont set the cookie as persistant
in your forms login.
Assuming you have the .NET Framwework SDK with docs installed try this link:
ms-help://MS.NETFrameworkSDKv1.1/cpgenref/html/gngrfforms.htm
PL.
"enahar" <enahar@hotmail.com> skrev i meddelandet news:%23pQOIyKFFHA.936@TK2MSFTNGP12.phx.gbl...> Hi,
>
> How to timing out the asp.net web application when not in use for 15 minutes although I am using the code in web.config file as
> below:
>
> <authentication mode="Forms">
> <forms loginUrl="Security/Login.aspx" protection="All" timeout="20" path="/" />
>
> </authentication>
>
>
>
>
>
> Thanks
>
>
>
>
PL Guest
-
Ekta Agarwal #3
Re: how to time out the web asp.net application when not in use for 15 minutes
Hi
If I use the sliding Expiration in the code(web.config) as follows:
<authentication mode="Forms" >
<forms loginUrl="Security/Login.aspx" protection="All" slidingExpiration
="true" timeout="15" path="/" />
</authentication>
I am getting the following error message:
Parser Error Message: Unrecognized attribute 'slidingExpiration'.
Source Error:
Line 31: -->
Line 32: <authentication mode="Forms" >
Line 33: <forms loginUrl="Security/Login.aspx" protection="All"
slidingExpiration ="true" timeout="15" path="/" />
Line 34: </authentication>
Line 35:
How and where do I use the SlidingExpiration attribute.
Thanks
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Ekta Agarwal Guest
-
PL #4
Re: how to time out the web asp.net application when not in use for 15 minutes
Please have a look at this page:
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrfforms.asp[/url]
PL.
"Ekta Agarwal" <enahar@hotmail.com> skrev i meddelandet news:uerh0vUFFHA.3244@TK2MSFTNGP15.phx.gbl...> Hi
>
> If I use the sliding Expiration in the code(web.config) as follows:
>
> <authentication mode="Forms" >
>
> <forms loginUrl="Security/Login.aspx" protection="All" slidingExpiration
> ="true" timeout="15" path="/" />
>
> </authentication>
>
>
>
> I am getting the following error message:
>
>
> Parser Error Message: Unrecognized attribute 'slidingExpiration'.
>
> Source Error:
>
> Line 31: -->
> Line 32: <authentication mode="Forms" >
> Line 33: <forms loginUrl="Security/Login.aspx" protection="All"
> slidingExpiration ="true" timeout="15" path="/" />
> Line 34: </authentication>
> Line 35:
>
>
>
>
> How and where do I use the SlidingExpiration attribute.
>
> Thanks
>
>
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
PL Guest
-
Ekta Agarwal #5
Re: how to time out the web asp.net application when not in use for 15 minutes
Hi,
I am still getting the same error message after looking into the URL you
have sent..
Regards,
Server Error in '/PITSHWebUI' Application.
------------------------------------------------------------------------
--------
Configuration Error
Description: An error occurred during the processing of a configuration
file required to service this request. Please review the specific error
details below and modify your configuration file appropriately.
Parser Error Message: Unrecognized attribute 'slidingExpiration'.
Source Error:
Line 32: <authentication mode="Forms" >
Line 33: <!--<forms loginUrl="Security/Login.aspx" protection="All"
slidingExpiration="false" timeout="15" path="/" />-->
Line 34: <forms name="name" loginUrl="Security/Login.aspx"
protection="All" timeout="15" path="/" slidingExpiration="true">
Line 35: </forms>
Line 36:
Source File: c:\inetpub\wwwroot\PITSHWebUI\web.config Line: 34
------------------------------------------------------------------------
--------
Version Information: Microsoft .NET Framework Version:1.0.3705.6018;
ASP.NET Version:1.0.3705.6018
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Ekta Agarwal Guest
-
PL #6
Re: how to time out the web asp.net application when not in use for 15 minutes
I cannot see anything wrong in your code below but obviously you must have an error in spelling or casing or
something like that.
PL.
"Ekta Agarwal" <enahar@hotmail.com> skrev i meddelandet news:ODC0ocXFFHA.2540@TK2MSFTNGP09.phx.gbl...> Hi,
>
> I am still getting the same error message after looking into the URL you
> have sent..
>
> Regards,
>
PL Guest
-
Ekta Agarwal #7
Re: how to time out the web asp.net application when not in use for 15 minutes
Hi,
I have checked the spelling, casing .
Still I can't use the slidingExpiration attribute in the Forms tag .I am
getting the same error message
'' Unrecognized attribute 'slidingExpiration' ''
Can anybody help me why?
Thanks
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Ekta Agarwal Guest
-
PL #8
Re: how to time out the web asp.net application when not in use for 15 minutes
Try installing ASP.NET 1.1, you are probably running 1.0 ?
Downlaod from:
[url]http://www.asp.net/download-1.1.aspx?tabindex=0&tabid=1[/url]
Of ocurse, if you dont have control over the server this poses a problem.
PL.
"Ekta Agarwal" <enahar@hotmail.com> skrev i meddelandet news:%23NoQwr6FFHA.1836@tk2msftngp13.phx.gbl...>
> Hi,
>
> I have checked the spelling, casing .
> Still I can't use the slidingExpiration attribute in the Forms tag .I am
> getting the same error message
> '' Unrecognized attribute 'slidingExpiration' ''
> Can anybody help me why?
>
> Thanks
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
PL Guest
-
Ekta Agarwal #9
Re: how to time out the web asp.net application when not in use for 15 minutes
Hi,
Is there any other way to timing out the asp.net web application when
not in use for 15 minutes without installing asp.net 1.1
Thanks
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Ekta Agarwal Guest
-
enahar #10
Re: how to time out the web asp.net application when not in use for 15 minutes
Actually when session is timeout (20 minutes) it goes to session_end event
in glaobal.asax.cs but i don't know how to transfer from this point to login
page
Can anyone help me !
Regards
"enahar" <enahar@hotmail.com> wrote in message
news:%23pQOIyKFFHA.936@TK2MSFTNGP12.phx.gbl...> Hi,
>
> How to timing out the asp.net web application when not in use for 15
> minutes although I am using the code in web.config file as below:
>
> <authentication mode="Forms">
> <forms loginUrl="Security/Login.aspx" protection="All" timeout="20"
> path="/" />
>
> </authentication>
>
>
>
>
>
> Thanks
>
>
>
>
enahar Guest
-
Brock Allen #11
Re: how to time out the web asp.net application when not in use for 15 minutes
Session_End fires outside of a Request into your system. So since there's
no request, there's no where to transfer to. When you should do is check
upon the next request to see if your Session data is gone, and if so take
the appropriate actions.
Now, since you've mentioned a login page, why are you using Session state
to track to see if the user's logged in? You should be using Forms authentication,
as this does all the necessary work to redirect the user to a login page
if they're not currently logged in.
-Brock
DevelopMentor
[url]http://staff.develop.com/ballen[/url]
> Actually when session is timeout (20 minutes) it goes to session_end
> event
> in glaobal.asax.cs but i don't know how to transfer from this point to
> login
> page
> Can anyone help me !
> Regards
>
> "enahar" <enahar@hotmail.com> wrote in message
> news:%23pQOIyKFFHA.936@TK2MSFTNGP12.phx.gbl...
>>> Hi,
>>
>> How to timing out the asp.net web application when not in use for 15
>> minutes although I am using the code in web.config file as below:
>>
>> <authentication mode="Forms">
>> <forms loginUrl="Security/Login.aspx" protection="All" timeout="20"
>> path="/" />
>> </authentication>
>>
>> Thanks
>>
Brock Allen Guest
-
enahar #12
Re: how to time out the web asp.net application when not in use for 15 minutes
Actually what i want to convey is
when the session is time out asp.net application goes to session_end event
(the code is shown below)after rumnning the event it stays in the same page
..I want to transfer to sessionTimeOut.aspx page .But beacause Session_End
fires outside of a Request into your system I can't use Response.Redirect.
How do I redirect now?
Regards
protected void Session_End(Object sender, EventArgs e)
{
if (Session["SessionID"] != null)
{
try
{
string LogoutURL="../Public/SessionTimeOut.aspx";
ESMSecurityModule.killSession(Session["SessionID"].ToString());
Session.Clear();
Session.Abandon();
Response.Redirect(LogoutURL);
}
catch
{
}
}
}
How to timing out the asp.net web application when not in use for 15>>> minutes although I am using the code in web.config file as below:
>>>
>>> <authentication mode="Forms">
>>> <forms loginUrl="Security/Login.aspx" protection="All" timeout="20"
>>> path="/" />
>>> </authentication>
"Brock Allen" <ballen@develop.com.i_hate_spam_too> wrote in message
news:16148632465578650967312@msnews.microsoft.com. ..> Session_End fires outside of a Request into your system. So since there's
> no request, there's no where to transfer to. When you should do is check
> upon the next request to see if your Session data is gone, and if so take
> the appropriate actions.
>
> Now, since you've mentioned a login page, why are you using Session state
> to track to see if the user's logged in? You should be using Forms
> authentication, as this does all the necessary work to redirect the user
> to a login page if they're not currently logged in.
>
> -Brock
> DevelopMentor
> [url]http://staff.develop.com/ballen[/url]
>
>
>>>> Actually when session is timeout (20 minutes) it goes to session_end
>> event
>> in glaobal.asax.cs but i don't know how to transfer from this point to
>> login
>> page
>> Can anyone help me !
>> Regards
>>
>> "enahar" <enahar@hotmail.com> wrote in message
>> news:%23pQOIyKFFHA.936@TK2MSFTNGP12.phx.gbl...
>>>>> Hi,
>>>
>>> How to timing out the asp.net web application when not in use for 15
>>> minutes although I am using the code in web.config file as below:
>>>
>>> <authentication mode="Forms">
>>> <forms loginUrl="Security/Login.aspx" protection="All" timeout="20"
>>> path="/" />
>>> </authentication>
>>>
>>> Thanks
>>>
>
>
enahar Guest
-
Brock Allen #13
Re: how to time out the web asp.net application when not in use for 15 minutes
As I suggested before you either need to add a check to every page to do
the redirect or you should be using Forms Authentication to to track the
user. I really think you'll have an easier time adopting Forms authentication.
Here's an article that should get you started:
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsent7/html/vxconASPNETAuthentication.asp[/url]
-Brock
DevelopMentor
[url]http://staff.develop.com/ballen[/url]
> Actually what i want to convey is
> when the session is time out asp.net application goes to session_end
> event
> (the code is shown below)after rumnning the event it stays in the
> same page
> .I want to transfer to sessionTimeOut.aspx page .But beacause
> Session_End
> fires outside of a Request into your system I can't use
> Response.Redirect.
> How do I redirect now?
>
> Regards
>
> protected void Session_End(Object sender, EventArgs e)
>
> {
>
> if (Session["SessionID"] != null)
>
> {
>
> try
>
> {
>
> string LogoutURL="../Public/SessionTimeOut.aspx";
>
> ESMSecurityModule.killSession(Session["SessionID"].ToString());
>
> Session.Clear();
>
> Session.Abandon();
>
> Response.Redirect(LogoutURL);
>
> }
>
> catch
>
> {
>
> }
>
> }
>
> }
>
> How to timing out the asp.net web application when not in use for 15
>> "Brock Allen" <ballen@develop.com.i_hate_spam_too> wrote in message>>>> minutes although I am using the code in web.config file as below:
>>>>
>>>> <authentication mode="Forms">
>>>> <forms loginUrl="Security/Login.aspx" protection="All" timeout="20"
>>>> path="/" />
>>>> </authentication>
> news:16148632465578650967312@msnews.microsoft.com. ..
>>> Session_End fires outside of a Request into your system. So since
>> there's no request, there's no where to transfer to. When you should
>> do is check upon the next request to see if your Session data is
>> gone, and if so take the appropriate actions.
>>
>> Now, since you've mentioned a login page, why are you using Session
>> state to track to see if the user's logged in? You should be using
>> Forms authentication, as this does all the necessary work to redirect
>> the user to a login page if they're not currently logged in.
>>
>> -Brock
>> DevelopMentor
>> [url]http://staff.develop.com/ballen[/url]>>> Actually when session is timeout (20 minutes) it goes to
>>> session_end
>>> event
>>> in glaobal.asax.cs but i don't know how to transfer from this point
>>> to
>>> login
>>> page
>>> Can anyone help me !
>>> Regards
>>> "enahar" <enahar@hotmail.com> wrote in message
>>> news:%23pQOIyKFFHA.936@TK2MSFTNGP12.phx.gbl...
>>>> Hi,
>>>>
>>>> How to timing out the asp.net web application when not in use for
>>>> 15 minutes although I am using the code in web.config file as
>>>> below:
>>>>
>>>> <authentication mode="Forms">
>>>> <forms loginUrl="Security/Login.aspx" protection="All" timeout="20"
>>>> path="/" />
>>>> </authentication>
>>>> Thanks
>>>>
Brock Allen Guest
-
Pril #14
Re: how to time out the web asp.net application when not in use for 15 minutes
Try:
HttpContext.Current.Request.Response.Redirect
lp, pl
"enahar" <enahar@hotmail.com> wrote in message
news:uVfkmfnKFHA.2936@TK2MSFTNGP15.phx.gbl...event> Actually what i want to convey is
> when the session is time out asp.net application goes to session_endpage> (the code is shown below)after rumnning the event it stays in the samethere's> .I want to transfer to sessionTimeOut.aspx page .But beacause Session_End
> fires outside of a Request into your system I can't use Response.Redirect.
>
> How do I redirect now?
>
> Regards
>
>
>
>
> protected void Session_End(Object sender, EventArgs e)
>
> {
>
> if (Session["SessionID"] != null)
>
> {
>
> try
>
> {
>
> string LogoutURL="../Public/SessionTimeOut.aspx";
>
> ESMSecurityModule.killSession(Session["SessionID"].ToString());
>
> Session.Clear();
>
> Session.Abandon();
>
>
> Response.Redirect(LogoutURL);
>
> }
>
> catch
>
> {
>
> }
>
> }
>
> }
>
>
>
>
>
> How to timing out the asp.net web application when not in use for 15>> >>> minutes although I am using the code in web.config file as below:
> >>>
> >>> <authentication mode="Forms">
> >>> <forms loginUrl="Security/Login.aspx" protection="All" timeout="20"
> >>> path="/" />
> >>> </authentication>
>
>
> "Brock Allen" <ballen@develop.com.i_hate_spam_too> wrote in message
> news:16148632465578650967312@msnews.microsoft.com. ..> > Session_End fires outside of a Request into your system. So sincetake> > no request, there's no where to transfer to. When you should do is check
> > upon the next request to see if your Session data is gone, and if sostate> > the appropriate actions.
> >
> > Now, since you've mentioned a login page, why are you using Session>> > to track to see if the user's logged in? You should be using Forms
> > authentication, as this does all the necessary work to redirect the user
> > to a login page if they're not currently logged in.
> >
> > -Brock
> > DevelopMentor
> > [url]http://staff.develop.com/ballen[/url]
> >
> >
> >> >> >> Actually when session is timeout (20 minutes) it goes to session_end
> >> event
> >> in glaobal.asax.cs but i don't know how to transfer from this point to
> >> login
> >> page
> >> Can anyone help me !
> >> Regards
> >>
> >> "enahar" <enahar@hotmail.com> wrote in message
> >> news:%23pQOIyKFFHA.936@TK2MSFTNGP12.phx.gbl...
> >>
> >>> Hi,
> >>>
> >>> How to timing out the asp.net web application when not in use for 15
> >>> minutes although I am using the code in web.config file as below:
> >>>
> >>> <authentication mode="Forms">
> >>> <forms loginUrl="Security/Login.aspx" protection="All" timeout="20"
> >>> path="/" />
> >>> </authentication>
> >>>
> >>> Thanks
> >>>
> >
> >
>
Pril Guest



Reply With Quote

