The type initializer for 'System.Data.Entity.Internal.AppConfig' threw an exception

901 views
Skip to first unread message

Sahithya h.e

unread,
Dec 12, 2013, 1:22:29 AM12/12/13
to sav...@googlegroups.com
I have recently updated EntityFramework in my Wcf Application from v5 to v6.  After publishing  the service , service works fine for few hours. Later all services throws an exception like below, I tried all the solutions that are suggested , please any one can help me,

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">
a:InternalServiceFault</faultcode><faultstring xml:lang="en-US">The type initializer for 'System.Data.Entity.Internal.AppConfig' threw an exception.</faultstring><detail>
<ExceptionDetail xmlns="http://schemas.datacontract.org/2004/07/System.ServiceModel" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><HelpLink i:nil="true"/><InnerException>
<HelpLink i:nil="true"/><InnerException><HelpLink i:nil="true"/><InnerException i:nil="true"/><Message>Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral,
 PublicKeyToken=b77a5d561934e089' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)</Message>
<StackTrace>   at System.Configuration.TypeUtil.GetTypeWithReflectionPermission(IInternalConfigHost host, String typeString, Boolean throwOnError)&#xD;
   at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.Init(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord)&#xD;
   at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.InitWithRestrictedPermissions(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord)&#xD;
   at System.Configuration.RuntimeConfigurationRecord.CreateSectionFactory(FactoryRecord factoryRecord)&#xD;
   at System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean&amp; isRootDeclaredHere)</StackTrace><Type>System.IO.FileLoadException</Type></InnerException>
<Message>An error occurred creating the configuration section handler for entityFramework: Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5d561934e089' or one of its dependencies.
 The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) (C:\inetpub\wwwroot\apps.sysinformation.net\HelpDesk\web.config line 5)</Message><StackTrace>   at System.Configuration.
BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean&amp; isRootDeclaredHere)&#xD;
   at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object&amp; result, Object&amp; resultRuntimeObject)&#xD;
   at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)&#xD;
   at System.Data.Entity.Internal.AppConfig..ctor()&#xD;
   at System.Data.Entity.Internal.AppConfig..cctor()</StackTrace><Type>System.Configuration.ConfigurationErrorsException</Type></InnerException><Message>The type initializer for 'System.Data.Entity.Internal.AppConfig' threw an exception.</Message>
<StackTrace>   at System.Data.Entity.DbContext..ctor(String nameOrConnectionString)&#xD;
   at service1..ctor(Boolean proxyCreationEnabled)&#xD;
   at service1.ValidateUserIT()&#xD;
   at service1.GetTickets_ForDashBoard()&#xD;
   at SyncInvokeGetTickets_ForDashBoard(Object , Object[] , Object[] )&#xD;
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]&amp; outputs)&#xD;
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp; rpc)&#xD;
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp; rpc)&#xD;
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc&amp; rpc)&#xD;
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</StackTrace><Type>System.TypeInitializationException</Type></ExceptionDetail></detail></s:Fault></s:Body></s:Envelope>
Reply all
Reply to author
Forward
0 new messages