web.config inheritance pain!

S

Smokey Grindle

I have a virtual website or what ever it's really called in IIS6 under my
root intranet site both use ASP.NET 2.0... my intrante site has a roles
provider in it, which is set as the default provider for that site. When I
try to go to the virtual site now though under http://intranet/othersite
(which is really our Sourcegear vault server site) the othersite loads up
with an error that says

Configuration Error
An error occurred during the processing of a configuration file required to
service this request. Please review the specific error details below and
modify your configuration file appropriately.
Could not load type 'IntranetRoleProvider'.
Source File: </b> C:\Inetpub\wwwIntranet\web.config<b> &nbsp;&nbsp; Line:
</b> 86
<br><br>

<hr width=100% size=1 color=silver>

<b>Version Information:</b>&nbsp;Microsoft .NET Framework
Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

[HttpException]: Could not load type 'IntranetRoleProvider'.
at System.Web.Compilation.BuildManager.GetType(String typeName, Boolean
throwOnError, Boolean ignoreCase)
at System.Web.Configuration.ConfigUtil.GetType(String typeName, String
propertyName, ConfigurationElement configElement, XmlNode node, Boolean
checkAptcaBit, Boolean ignoreCase)
[ConfigurationErrorsException]: Could not load type 'IntranetRoleProvider'.
(C:\Inetpub\wwwIntranet\web.config line 86)
at System.Web.Security.Roles.Initialize()
at System.Web.Security.Roles.get_CacheRolesInCookie()
at System.Web.Security.RoleManagerModule.OnLeave(Object source, EventArgs
eventArgs)
at
System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)
-->
--.

which did not show up until we started using a role provider on the parent
site! how do I prevent this sub virtual site from inheriting the parent site
web.config's role provider? I even have this in there now and it doesnt help
at all

<siteMap enabled="false"></siteMap>

<roleManager enabled="false"></roleManager>



that's in the sub site trying to disable the two new items... but doesnt
seem to help... what should I do? thanks!
 
S

Sherif El-Metainy

You can clear the providers from the parent site in the "othersite"
web.config file.

<system.web>
<roleManager>
<providers>
<clear /> <!-- this line clears the providers from parent site
and from machine.config -->
<add name="othersiteprovider" type="othersideprovidertype"
attrib1="value1" attrib2="value2" />
</providers>
</roleManager>
</system.web>

Best regards,
Sherif El-Meteny
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,781
Messages
2,569,619
Members
45,310
Latest member
FaustoMont

Latest Threads

Top