Re: Supporting multiple custom RoleProvider versions



Hello Chris,

As for the the "roleManager" providers, ASP.NET 2.0 does support multiple
providers configured in appilcation web.config file. And you can point to
the RoleProvider type in both GAC or application's private bin dir. And
for private bin assembly, since they're not strong-named, you can simply
supply the main assembly name(do not need version, culture and public key
token info...). For assembly in GAC, you need to supply all the four parts
(assembly name, version, culture, pubic key token ) for it. For example:


====================
<roleManager defaultProvider="NewAspNetSqlRoleProvider">
<providers>
<add name="NewAspNetSqlRoleProvider"
connectionStringName="LocalSqlServer"
applicationName="MyApplication"
type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

<add name="customprovider" .....................
type="MyProviders.CustomRoleProvider,
myproviders" />

</providers>
</roleManager>

====================

Also, if you're not sure about the exact synatx of the
assemblyQualifiedname of your provider type(in GAC) ,you can use the
following code to print it out:
===================
protected void Page_Load(object sender, EventArgs e)
{
Response.Write("<br/>FullTypeName: " +
typeof(SqlRoleProvider).AssemblyQualifiedName);
}
=====================

In addition, if the problem is that the runtime failed to load the correct
assembly, you can use the framework tool(Assembly binding viewer) to trace
the load process of any assembly loading failure.

#Assembly Binding Log Viewer (Fuslogvw.exe)
http://msdn2.microsoft.com/en-us/library/e74a18c4.aspx

Please feel free to let me know if the above helps or if you meet any
further problems on this.


Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.

.



Relevant Pages

  • Re: enum visibility across assemblies
    ... typeName) method: ... See AssemblyQualifiedName. ... Microsoft Online Community Support ... nature are best handled working with a dedicated Microsoft Support Engineer ...
    (microsoft.public.dotnet.framework.clr)
  • RE: ASP.net Web application admin... security
    ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Assigning users to application
    ... roles or applications. ... of your questions about ASP.NET membership, roles and providers. ... Microsoft Online Support ... nature are best handled working with a dedicated Microsoft Support Engineer ...
    (microsoft.public.vsnet.general)
  • I encounter the same error, but my data does not have the benefit of record tags.
    ... Microsoft Online Community Support ... You can send feedback directly to my manager at: ... where an initial response from the community or a Microsoft Support ... I am having trouble creating one input flat file. ...
    (microsoft.public.biztalk.general)
  • RE: ResetPassword Requiring passwordAnswer
    ... you found that the "ResetPassword" ... (without RequireQuestionAndAnswer) ... you can even first clear all the old providers. ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.framework.aspnet)