Home > Net >  The user code untreated System. TypeInitializationException
The user code untreated System. TypeInitializationException

Time:09-18

The user code untreated System. TypeInitializationException
HResult=- 2146233036
Message="System. The Data. The Entity.. Internal AppConfig" of type initializers cause abnormal,
Source=EntityFramework
TypeName=System. Data. The Entity, Internal AppConfig
StackTrace:
In the System, Data Entity, Internal AppConfig. Get_DefaultInstance ()
In the System. Data. The Entity. Internal. LazyInternalConnection.. Ctor (String nameOrConnectionString)
In the System. Data. The Entity. The DbContext.. Ctor (String nameOrConnectionString)
In Friends. Models. FriendsEntities.. Ctor (position) d: \ project \ group \ MVC program source code, chapter 12, Friends, Friends, Models \ Friends Context. Cs: line number 18
In Friends. Controllers. QuestionController.. Ctor (position) d: \ project \ group \ MVC program source code, chapter 12, Friends, Friends. The Web \ Controllers \ QuestionController cs: line number 16
InnerException: System. The Configuration. ConfigurationErrorsException
HResult=- 2146232062
Message=this configuration section cannot contain the CDATA elements, or text (D: \ project \ group \ MVC program source code, chapter 12, Friends, Friends. The Web \ Web config line 11)
Source=System. The Configuration
BareMessage=this configuration section cannot contain the CDATA or text element,
Filename=D: \ project \ group \ MVC program source code, chapter 12, Friends, Friends. The Web \ Web. Config
Line 11=
StackTrace:
In the System. The Configuration. BaseConfigurationRecord. EvaluateOne (String [] keys, SectionInput input, Boolean isTrusted, FactoryRecord FactoryRecord, SectionRecord SectionRecord, Object parentResult)
In the System. The Configuration. BaseConfigurationRecord. Evaluate (FactoryRecord FactoryRecord, SectionRecord SectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& The result, Object& ResultRuntimeObject)
In the System. The Configuration. BaseConfigurationRecord. GetSectionRecursive (String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& The result, Object& ResultRuntimeObject)
In the System. The Configuration. BaseConfigurationRecord. GetSection (String configKey)
In the System. Web. HttpContext. GetSection (String sectionName)
In the System. Web. Configuration. HttpConfigurationSystem. GetSection (String sectionName)
In the System. Web. Configuration. HttpConfigurationSystem. System. The Configuration. The Internal. IInternalConfigSystem. GetSection (String configKey)
In the System. The Configuration. The ConfigurationManager. Get_ConnectionStrings ()
In the System. Data. The Entity, Internal AppConfig.. Ctor ()
In the System. Data. The Entity, Internal AppConfig.. Cctor ()
InnerException:

CodePudding user response:

Please, pass by the bosses, look, I surf the Internet to find a lot of the solution, no matter use, all, river's lake emergency
  •  Tags:  
  • C#
  • Related