DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
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:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us