Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Adding a Membership Provider to the list of trusted providers

1,801 views
Skip to first unread message

Ian Dendle

unread,
Apr 29, 2009, 6:26:35 AM4/29/09
to
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

aclcarter

unread,
Apr 30, 2009, 4:27:06 PM4/30/09
to
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

aclcarter

unread,
Apr 30, 2009, 4:44:58 PM4/30/09
to
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

0 new messages