473,378 Members | 1,518 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
6 1500
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" <pa*********@crazyjohns.com.au> wrote in message
news:eu**************@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.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #2
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(expirat ion)); // 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
jo*********@gmx.net
Nov 18 '05 #3
Yes, you can define particular files, not only directories using <location>
element

look here for more info :

http://msdn.microsoft.com/library/de...ionelement.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" <pa*********@crazyjohns.com.au> wrote in message
news:eu**************@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.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #4
Hi Konrad,
How are you doing ?
Hope all well.
Lets be intouch!
Patrick
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #5
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.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #6
You could do a redirect in javascript after so many minutes...

http://tinyurl.com/6b8tu

HTH,
Greg

"naijacoder naijacoder" <na********@toughguy.net> wrote in message
news:%2****************@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.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: José Joye | last post by:
Hello, I have an assembly that is used by a VB6 application. This application can be a normal exe or an ActiveX (called through CCW). My assembly needs to get extra info from a config file. In...
1
by: Chris | last post by:
I have seen the posts on various places on the internet about .NET framework mismatch issues and I don't think that is my problem. ; ) When I execute the following C++.NET code: String...
7
by: hplloyd | last post by:
i have a windows app which has an app.config file in the solution. The config file holds information such as connection string details. When I create a setup project and include the primary...
5
by: AAguiar | last post by:
I have an asp.net project where the code behind the aspx page calls a c# class which makes calls to a managed static C++ class. The C# class works fine when the asp net worker process starts, when...
25
by: n3crius | last post by:
hi, i just got a web host with asp.net , seemed really cool. aspx with the c# or vb IN the actual main page run fine, but when i use codebehind and make another source file ( a .cs) to go with...
2
by: Luke Dalessandro | last post by:
I have an application with the following layout /root/ /root/Default.aspx /root/web.config /root/child/ /root/child/web.config web.config has a custom configuration section "testSection"...
1
by: savajx1 | last post by:
I am using the new "web deployment addin" in VS 2005 to output my web site. The web site is correctly output (assemblies generated in the \bin subdirectory). The web site on my developement...
3
by: Richard Lewis Haggard | last post by:
I have a test application that is calling an assembly that reads some strings out of a config file. Normally, this assembly supports a web application and the information can be read just fine....
13
by: Khodr | last post by:
Hello, I am using VS.NET 2003 and vb. I build my application MyApp and it generates MyApp.exe.config. So now MyApp.exe reads parameters from MyApp.exe.config. Great and no problem! I need to...
12
by: dbuchanan | last post by:
Hello, (Is this the proper newsgroup?) === Background === I am building a solution with two projects. One project is my data access layer which contains my DataSet as an xsd file. The XSD...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.