|
|
|
start date: Fri, 17 Aug 2007 08:31:27 -0700,
posted on: microsoft.public.dotnet.framework.aspnet
back
| Thread Index |
|
1
unknown
|
|
2
seigo
|
|
3
unknown
|
Using SQL 2005 Appicatioin Roles with ASP.NET 2.0.
Hi everybody!
I can not understand how to use SQL2005 Appicatioin Roles (AR) with
ASP.NET 2.0? The tricky thing here is that you have to set up your
connection string to use integrated authentication (otherwise you lost
auditing ability of Application Role). OK. After you set up AR in SQL
Server how the application knows about AR? Where do you set up it?
Thanks, CuteDeveloper
Date:Fri, 17 Aug 2007 08:31:27 -0700
Author:
|
Re: Using SQL 2005 Appicatioin Roles with ASP.NET 2.0.
On Aug 17, 6:31 pm, CuteDevelo...@gmail.com wrote:
> Hi everybody!
>
> I can not understand how to use SQL2005 Appicatioin Roles (AR) with
> ASP.NET 2.0? The tricky thing here is that you have to set up your
> connection string to use integrated authentication (otherwise you lost
> auditing ability of Application Role). OK. After you set up AR in SQL
> Server how the application knows about AR? Where do you set up it?
>
> Thanks, CuteDeveloper
Hi CuteDeveloper,
ASP.NET creates database and uses RoleProvider to access this
database. That's why you cannot use AR without any database.
Application knows about AR by settings in web.config file. To use
roles in your application you should add the following in web.config:
<roleManager defaultProvider="OdbcRoleProvider"
enabled="true"
cacheRolesInCookie="true"
cookieName=".ASPROLES"
cookieTimeout="30"
cookiePath="/"
cookieRequireSSL="false"
cookieSlidingExpiration="true"
cookieProtection="All" >
<providers>
<clear />
<add
name="OdbcRoleProvider"
type="Samples.AspNet.Roles.OdbcRoleProvider"
connectionStringName="OdbcServices"
applicationName="SampleApplication"
writeExceptionsToEventLog="false" />
</providers>
</roleManager>
More about Roles implementation read msdn articles -
http://msdn2.microsoft.com/en-us/library/8fw7xh74.aspx
Regards,
Alexander Kleshchevnikov
MCP
www.klalex.com
Date:Fri, 17 Aug 2007 08:40:04 -0700
Author:
|
Re: Using SQL 2005 Appicatioin Roles with ASP.NET 2.0.
On Aug 17, 11:40 am, seigo wrote:
> On Aug 17, 6:31 pm, CuteDevelo...@gmail.com wrote:
>
> > Hi everybody!
>
> > I can not understand how to use SQL2005 Appicatioin Roles (AR) with
> > ASP.NET 2.0? The tricky thing here is that you have to set up your
> > connection string to use integrated authentication (otherwise you lost
> > auditing ability of Application Role). OK. After you set up AR in SQL
> > Server how the application knows about AR? Where do you set up it?
>
> > Thanks, CuteDeveloper
>
> Hi CuteDeveloper,
>
> ASP.NET creates database and uses RoleProvider to access this
> database. That's why you cannot use AR without any database.
> Application knows about AR by settings in web.config file. To use
> roles in your application you should add the following in web.config:
>
> <roleManager defaultProvider="OdbcRoleProvider"
> enabled="true"
> cacheRolesInCookie="true"
> cookieName=".ASPROLES"
> cookieTimeout="30"
> cookiePath="/"
> cookieRequireSSL="false"
> cookieSlidingExpiration="true"
> cookieProtection="All" >
> <providers>
> <clear />
> <add
> name="OdbcRoleProvider"
> type="Samples.AspNet.Roles.OdbcRoleProvider"
> connectionStringName="OdbcServices"
> applicationName="SampleApplication"
> writeExceptionsToEventLog="false" />
> </providers>
> </roleManager>
>
> More about Roles implementation read msdn articles -http://msdn2.microsoft.com/en-us/library/8fw7xh74.aspx
>
> Regards,
> Alexander Kleshchevnikov
> MCPwww.klalex.com
Thank you for a quick response, Alex!
You gave me the right direction and I found a nice explanation here:
http://odetocode.com/Articles/427.aspx
Regards,
Eugene
..
Date:Fri, 17 Aug 2007 09:47:31 -0700
Author:
|
|
|