Saturday, March 31, 2012

web config file problem

Hello eveyone,
I have a web config like this below:-
<location path="finance.aspx">
<system.web>
<authorization>
<allow users="?"/>
<deny users="?"
roles="Security_Group"/>
</authorization>
<identity impersonate="true"/>
</system.web>
</location>
I have a page finance.aspx which is on the location path above can i
construct it like that or i can only DEFINE FOLDERS ONLY.
For example i would like only certain security groups to be
authenticated to that page if they aren't in the Security group they
shoud be redirected and denied.
My other Question is regarding:-
<sessionState timeout="5"/>
i set timeout to 5 but it isn't working how does this work I WANT MY
PAGE TO EXPIRE after "5" minutes.
How can i do that?
Any ideas are welcome.
Thanks
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!To allow access for a specific role like Security_Group:
<allow roles="Security_Group"/>
To deny access to all users:
<deny users="*"/>
To deny access to anonymous users:
<deny users="?"/>
Your web.config file could look like:
<authorization>
<allow roles="Security_Group"/>
<deny users="*"/>
</authorization>
data mining and .net team
http://www.visual-basic-data-mining.net/forum
"naija naija" <patrick.ige@.crazyjohns.com.au> wrote in message
news:eu6tJoXlEHA.3648@.TK2MSFTNGP09.phx.gbl...
> Hello eveyone,
> I have a web config like this below:-
> <location path="finance.aspx">
> <system.web>
> <authorization>
> <allow users="?"/>
> <deny users="?"
> roles="Security_Group"/>
> </authorization>
> <identity impersonate="true"/>
> </system.web>
> </location>
> I have a page finance.aspx which is on the location path above can i
> construct it like that or i can only DEFINE FOLDERS ONLY.
> For example i would like only certain security groups to be
> authenticated to that page if they aren't in the Security group they
> shoud be redirected and denied.
> My other Question is regarding:-
> <sessionState timeout="5"/>
> i set timeout to 5 but it isn't working how does this work I WANT MY
> PAGE TO EXPIRE after "5" minutes.
> How can i do that?
> Any ideas are welcome.
> Thanks
>
>
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!
naija naija wrote:
> Hello eveyone,
> I have a web config like this below:-
> <location path="finance.aspx">
> <system.web>
> <authorization>
> <allow users="?"/>
> <deny users="?"
That doesn't make sense. <deny /> has no effect in this case.

> roles="Security_Group"/>
> </authorization>
> <identity impersonate="true"/>
> </system.web>
> </location>
> I have a page finance.aspx which is on the location path above can i
> construct it like that or i can only DEFINE FOLDERS ONLY.
> For example i would like only certain security groups to be
> authenticated to that page if they aren't in the Security group they
> shoud be redirected and denied.
Yes, you can use <location /> to restrict access to specific pages.

> My other Question is regarding:-
> <sessionState timeout="5"/>
> i set timeout to 5 but it isn't working how does this work I WANT MY
> PAGE TO EXPIRE after "5" minutes.
> How can i do that?
Page expirations and session timeouts are two completly different things.
Page expiration is a caching option.
TimeSpan expiration = new TimeSpan(0, 5, 0);
Response.Cache.SetMaxAge(expiration); // for HTTP 1.1 clients
Response.Cache.SetExpires(DateTime.Now.Add(expiration)); // for HTTP 1.0
clients
/* If you have Response.CacheControl set to "public", apply this one as
well:
Response.Cache.SetProxyMaxAge(expiration);
*/
Cheers,
Joerg Jooss
joerg.jooss@.gmx.net
Yes, you can define particular files, not only directories using <location>
element
look here for more info :
http://msdn.microsoft.com/library/d...tionelement.asp
as for the second question .. hmm .. its strange ... maybe try to use
standard <sessionState> entry created by VS.NET ... :
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;user id=sa;password="
cookieless="false"
timeout="5"
/>
HTH
btw, long time since last mail .. :) .. how are you doing .. ? .. let me
hear from you .. :)
Konrad
"naija naija" <patrick.ige@.crazyjohns.com.au> wrote in message
news:eu6tJoXlEHA.3648@.TK2MSFTNGP09.phx.gbl...
> Hello eveyone,
> I have a web config like this below:-
> <location path="finance.aspx">
> <system.web>
> <authorization>
> <allow users="?"/>
> <deny users="?"
> roles="Security_Group"/>
> </authorization>
> <identity impersonate="true"/>
> </system.web>
> </location>
> I have a page finance.aspx which is on the location path above can i
> construct it like that or i can only DEFINE FOLDERS ONLY.
> For example i would like only certain security groups to be
> authenticated to that page if they aren't in the Security group they
> shoud be redirected and denied.
> My other Question is regarding:-
> <sessionState timeout="5"/>
> i set timeout to 5 but it isn't working how does this work I WANT MY
> PAGE TO EXPIRE after "5" minutes.
> How can i do that?
> Any ideas are welcome.
> Thanks
>
>
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!
Hi Konrad,
How are you doing ?
Hope all well.
Lets be intouch!
Patrick
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!
what i need i think its a session timeouts.
Which i'm using like:-
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data
source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>
I want my page to be active for like 20mins and after that redirected to
a page to inform the users that the session is over .
Thanks
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!
You could do a redirect in javascript after so many minutes...
http://tinyurl.com/6b8tu
HTH,
Greg
"naijacoder naijacoder" <naijacoder@.toughguy.net> wrote in message
news:%23r5Em2hlEHA.1244@.TK2MSFTNGP15.phx.gbl...
> what i need i think its a session timeouts.
> Which i'm using like:-
> <sessionState
> mode="InProc"
> stateConnectionString="tcpip=127.0.0.1:42424"
> sqlConnectionString="data
> source=127.0.0.1;Trusted_Connection=yes"
> cookieless="false"
> timeout="20"
> />
> I want my page to be active for like 20mins and after that redirected to
> a page to inform the users that the session is over .
> Thanks
>
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!

0 comments:

Post a Comment