用戶代碼未處理 System.TypeInitializationException
HResult=-2146233036
Message=“System.Data.Entity.Internal.AppConfig”的型別初始值設定項引發例外。
Source=EntityFramework
TypeName=System.Data.Entity.Internal.AppConfig
StackTrace:
在 System.Data.Entity.Internal.AppConfig.get_DefaultInstance()
在 System.Data.Entity.Internal.LazyInternalConnection..ctor(String nameOrConnectionString)
在 System.Data.Entity.DbContext..ctor(String nameOrConnectionString)
在 Friends.Models.FriendsEntities..ctor() 位置 d:\畢設\實驗組\mvc課程原始碼\第十二章\Friends\Friends.Models\Friends.Context.cs:行號 18
在 Friends.Controllers.QuestionController..ctor() 位置 d:\畢設\實驗組\mvc課程原始碼\第十二章\Friends\Friends.Web\Controllers\QuestionController.cs:行號 16
InnerException: System.Configuration.ConfigurationErrorsException
HResult=-2146232062
Message=該配置節不能包含 CDATA 或文本元素。 (D:\畢設\實驗組\mvc課程原始碼\第十二章\Friends\Friends.Web\web.config line 11)
Source=System.Configuration
BareMessage=該配置節不能包含 CDATA 或文本元素。
Filename=D:\畢設\實驗組\mvc課程原始碼\第十二章\Friends\Friends.Web\web.config
Line=11
StackTrace:
在 System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult)
在 System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)
在 System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
在 System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
在 System.Web.HttpContext.GetSection(String sectionName)
在 System.Web.Configuration.HttpConfigurationSystem.GetSection(String sectionName)
在 System.Web.Configuration.HttpConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String configKey)
在 System.Configuration.ConfigurationManager.get_ConnectionStrings()
在 System.Data.Entity.Internal.AppConfig..ctor()
在 System.Data.Entity.Internal.AppConfig..cctor()
InnerException:

uj5u.com熱心網友回復:
拜托各位路過的大佬,幫忙看看,我上網找了好多解決辦法,統統不管用啊 。江湖救急轉載請註明出處,本文鏈接:https://www.uj5u.com/net/53926.html
標籤:C#
上一篇:ASP MVC Html.BeginForm前臺傳遞整個復雜物件至后臺問題
下一篇:c#求助
