Bug #44654 Unable to initialize provider. Missing or incorrect schema.
Submitted: 5 May 0:47 Modified: 11 Jun 11:49
Reporter: Thiago Sayao
Status: No Feedback
Category:Connector/Net Severity:S2 (Serious)
Version:6.0.3 OS:Microsoft Windows
Assigned to: Tonci Grgin Target Version:

[5 May 0:47] Thiago Sayao
Description:
When the site runs for a couple of days (3-4) without restarting IIS, this error
appears:

System.Configuration.ConfigurationErrorsException: Unable to initialize provider. 
Missing or incorrect schema. (e:\home\sayao\web\web.config line 167)
   at System.Web.Security.Roles.Initialize()
   at System.Web.Security.RoleManagerModule.OnEnter(Object source, EventArgs eventArgs)
   at
System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)

Simply resetting the application pool or changing web.config fixes it, until the next
couple of days. I don't know if it changes anything, but i have the option to cache roles
on cookies on.

Here is my config:

		<roleManager enabled="true" defaultProvider="MySQLRoleProvider"
cacheRolesInCookie="true">
			<providers>
				<clear/>
				<add name="MySQLRoleProvider" type="MySql.Web.Security.MySQLRoleProvider, MySql.Web,
Version=6.0.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"
connectionStringName="Connection" applicationName="DotNetBurner"/>
			</providers>
		</roleManager>

How to repeat:
Use the role provider.
Run a site for a couple of days.
[5 May 12:02] Tonci Grgin
Hi Thiago and thanks for your report.

Unfortunately, it contains no info I could use to pin the problem down... "Use heavy
site" is meaningless, or better, means different for everybody.

Can you please describe your problem better, especially the environment? From what I
gather, this could very well happen due to some caching/timeout in IIS.
[5 May 23:46] Thiago Sayao
I will try to explain it better:

The error says it's unable to initialize the provider and that the schema is either
missing or incorrect. But this errors appears when the site runs for a few days (about 3
or 4 days). This means that the schema is correct and it is not missing. I can make this
"assumption" because it works for some days and then suddenly stop working. Also, if i
simply restart the application pool, without changing anything it works again. So, i
think there is probably something work, specially because it works and then don't.

The environment is:
Windows 2008 Server Enterprise Edition
IIS 7 with integrated mode
Asp.net 3.5 SP1
The site runs on asp.net mvc

Thanks
[6 May 16:45] Tonci Grgin
Thiago, I'd say you hit this or that limit in IIS as c/NET is not changing dynamically...
"simply restart the application pool", AppPool is under IIS.
[6 May 23:48] Thiago Sayao
If connector/Net supports IIS7 it should know if IIS changes anything and take care of it.

Also, i have downgraded c/NET to 5.2.6 and it's running fine for 3 days. Anything
changed? Maybe it's not checking that the role cookie can expire (just guessing here).
[7 May 10:56] Tonci Grgin
> If connector/Net supports IIS7 it should know if IIS changes anything and take care of
it.

No it should not. It is your task to configure FW and server for what you need.

> Also, i have downgraded c/NET to 5.2.6 and it's running fine for 3 days. Anything
changed?

Of course it did. But you said new connector also works for 3-4 days. Any news? Old
connector working for more than 4 days?

> Maybe it's not checking that the role cookie can expire (just guessing here).

Maybe, really can't tell. This is fishy and, due to Bug#44414, I can't even begin to
test, even if I knew where to start... Will notify c/NET team of this.
[11 May 11:49] Tonci Grgin
Thiago, so?
[12 Jun 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".