I have a really strange issue that I only see when deploying my app to
Azure. A full stack trace is at the bottom. I'm deploying it with full
trust using the latest OS.

System.Data.ProviderIncompatibleException: The provider did not return a
ProviderManifest instance. --->
System.Runtime.Serialization.SerializationException: Type is not resolved
for member
'Castle.MicroKernel.Lifestyle.Scoped.CallContextLifetimeScope+SerializationReference,Castle.Windsor,
Version=3.2.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc'.

This particular instance of this exception is being caused by attempting to
run an EF query. However, I've seen the same inner exception pop up with a
couple of different libraries in addition to EF, including Razor Engine and
some other common ones.

In the past, I was able to fix it for those other libraries simply by
adding skeleton configuration for them to app.config. For example, I fixed
this with Razor Engine by adding an empty <razorEngine> along with the
configSection. This is sort of where I start losing the plot.

Can anyone help me figure out what's going on here? Rather than just
tracking down the config I'm missing in this case, I'd like to understand
what's actually happening.

In the case of EF, the exception is thrown when a query runs, so other than
the fact that Castle's used by some other infrastructure in the app, it's
not even directly involved.

Here's the full stack trace of the above exception.The line which throws it
in my own app is a simple LINQ query.

I appreciate any help!

System.Data.ProviderIncompatibleException: The provider did not return a
ProviderManifest instance. --->
System.Runtime.Serialization.SerializationException: Type is not resolved
for member
'Castle.MicroKernel.Lifestyle.Scoped.CallContextLifetimeScope+SerializationReference,Castle.Windsor,
Version=3.2.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc'.
   at System.AppDomain.get_Evidence()
   at System.AppDomain.get_Evidence()
   at System.Configuration.ClientConfigPaths.GetEvidenceInfo(AppDomain
appDomain, String exePath, String& typeName)
   at System.Configuration.ClientConfigPaths.GetTypeAndHashSuffix(AppDomain
appDomain, String exePath)
   at System.Configuration.ClientConfigPaths..ctor(String exePath, Boolean
includeUserConfig)
   at System.Configuration.ClientConfigPaths.GetPaths(String exePath,
Boolean includeUserConfig)
   at
System.Configuration.ClientConfigurationHost.RequireCompleteInit(IInternalConfigRecord
record)
   at
System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String
configKey, Boolean getLkg, Boolean checkPermission, Boolean
getRuntimeObject, Boolean requestIsHere, Object& result, Object&
resultRuntimeObject)
   at System.Configuration.BaseConfigurationRecord.GetSection(String
configKey)
   at System.Configuration.ConfigurationManager.GetSection(String
sectionName)
   at System.Xml.XmlConfiguration.XmlReaderSection.CreateDefaultResolver()
   at System.Xml.Schema.XmlSchema.Read(XmlReader reader,
ValidationEventHandler validationEventHandler)
   at
System.Data.EntityModel.SchemaObjectModel.Schema.SomSchemaSetHelper.AddXmlSchemaToSet(XmlSchemaSet
schemaSet, XmlSchemaResource schemaResource, HashSet`1 schemasAlreadyAdded)
   at
System.Data.EntityModel.SchemaObjectModel.Schema.SomSchemaSetHelper.ComputeSchemaSet(SchemaDataModelOption
dataModel)
   at System.Data.Common.Utils.Memoizer`2.Result.GetValue()
   at System.Data.Common.Utils.Memoizer`2.Evaluate(TArg arg)
   at
System.Data.EntityModel.SchemaObjectModel.Schema.SomSchemaSetHelper.GetSchemaSet(SchemaDataModelOption
dataModel)
   at System.Data.EntityModel.SchemaObjectModel.Schema.Parse(XmlReader
sourceReader, String sourceLocation)
   at
System.Data.EntityModel.SchemaObjectModel.SchemaManager.ParseAndValidate(IEnumerable`1
xmlReaders, IEnumerable`1 sourceFilePaths, SchemaDataModelOption dataModel,
AttributeValueNotification providerNotification, AttributeValueNotification
providerManifestTokenNotification, ProviderManifestNeeded
providerManifestNeeded, IList`1& schemaCollection)
   at
System.Data.EntityModel.SchemaObjectModel.SchemaManager.LoadProviderManifest(XmlReader
xmlReader, String location, Boolean checkForSystemNamespace, Schema& schema)
   at System.Data.Common.DbXmlEnabledProviderManifest.Load(XmlReader reader)
   at
System.Data.SqlClient.SqlProviderServices.GetDbProviderManifest(String
versionHint)
   at System.Data.Common.DbProviderServices.GetProviderManifest(String
manifestToken)
   --- End of inner exception stack trace ---
   at System.Data.Common.DbProviderServices.GetProviderManifest(String
manifestToken)
   at System.Data.Entity.DbModelBuilder.Build(DbConnection
providerConnection)
   at
System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext
internalContext)
   at System.Data.Entity.Internal.RetryLazy`2.GetValue(TInput input)
   at System.Data.Entity.Internal.LazyInternalContext.InitializeContext()
   at
System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type
entityType)
   at System.Data.Entity.Internal.Linq.InternalSet`1.Initialize()
   at System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext()
   at
System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider()
   at System.Linq.Queryable.Where[TSource](IQueryable`1 source,
Expression`1 predicate)

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/castle-project-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to