RE: Adding a Membership Provider to the list of trusted providers

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Never mind, solved my problem - might be the same for you. I found the answer
here (http://forums.iis.net/t/1147661.aspx) - my app' web.config provider
definition did not have the fully assembly qualified type name specified in
the <add> element of <membership/providers>. By including the assembly name,
version, culture, and token, to match that in the administration.config
entry, all started working.

Cheers,

Andy

"aclcarter" wrote:

I've hit exactly the same problem today also.

As near as I can tell, the runtime isn't even looking in the GAC for my
assembly (if I allow untrusted providers, and put the assembly in the same
directory as the site application it goes with, then all works, but if I
delete it from the site app' dir, leaving it just in the GAC, IIS complains
that it cannot locate the type).

I'd be interested to hear if anyone has a solution?!

Cheers,

Andy

"Ian Dendle" wrote:

Hello All,

I'm struggling to add my membership provider as a trusted provider, so that
i can see the .NET users within IIS 7. This membership provider has been
working fine under IIS 6, so the assembly itself is known to be working.

We have an SPC certificate from verisign, which i am using to sign the
assembly that I have created within Visual Studio 2008. I have created an
installer to install the file in the GAC. I can verify that the file exists
in the GAC by browsing to c:\windows\assembly. I have taken note of its
version and public key, its assembly name and the namespace the membership
providers class resides in. Using these details, i have updated
C:\Windows\System32\inetsrv\config\administration.config to add my assemblies
as trusted:


<trustedProviders allowUntrustedProviders="false">
<add type="System.Web.Security.SqlMembershipProvider,
System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" />
<add type="System.Web.Security.SqlRoleProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add type="System.Web.Security.WindowsTokenRoleProvider,
System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" />
<add type="ServiceCentreUserManagement.ServiceCentreMembershipProvider,
ServiceCentreUserManagement, Version=1.0.0.1, Culture=neutral,
PublicKeyToken=d1c680739f4fa194" />
<add type="ServiceCentreUserManagement.ServiceCentreRoleProvider,
ServiceCentreUserManagement, Version=1.0.0.1, Culture=neutral,
PublicKeyToken=d1c680739f4fa194" />
</trustedProviders>

However, IIS 7 still regards this assembly as untrusted, showing me the
error below whenever i try and access it within IIS Manager:

---------------------------
.NET Users
---------------------------
This feature cannot be used because the default provider type could not be
determined to check whether it is a trusted provider.



You can use this feature only when the default provider is a trusted
provider. If you are a server administrator, you can make a provider a
trusted provider by adding the provider type to the trusted providers list in
the Administration.config file. The provider has to be strongly typed and
added to the GAC (Global Assembly Cache).


---------------------------
OK
---------------------------

I can get it to work by setting allowUntrustedProviders="true" but this
obviously reduces security.

Could anyone please help me shed some light on what I may be doing wrong?

Kind Regards,
Ian

.



Relevant Pages

  • RE: Adding a Membership Provider to the list of trusted providers
    ... As near as I can tell, the runtime isn't even looking in the GAC for my ... I'm struggling to add my membership provider as a trusted provider, ... determined to check whether it is a trusted provider. ...
    (microsoft.public.inetserver.iis)
  • Re: Custom Membership Provider FullTrust Problem
    ... Dominick Baier ... How do I make the provider public? ... by publishing with Strong Named Assemblies ticked? ... full trust - but not in partial trust ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Custom Membership Provider FullTrust Problem
    ... I'll start off by making sure the provider is public and see if that ... ok - a little ambitious to start with partial trust;) ... compilation is different - but easy - pages/controls are compiled by demand ... Something I've yet to get my head around with .net 2 is how assemblies ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Custom Membership Provider FullTrust Problem
    ... Dominick Baier ... I'll start off by making sure the provider is public and see if that ... ok - a little ambitious to start with partial trust;) ... by publishing with Strong Named Assemblies ticked? ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: IIS locks DLLs after deploying web site.
    ... click on web service extensions ... IIS, ... restart IIS and update the Assembly in the bin folder in order to force ... Assemblies in the bin folder without any problem, ...
    (microsoft.public.dotnet.general)