“/”应用程序中的服务器错误。

必须为此操作打开连接

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.InvalidOperationException: 必须为此操作打开连接

源错误:


行 4:      Layout = "~/Views/Shared/_LayoutIndex.cshtml";
行 5:      //获取答疑附件
行 6:      var attachment = YJPRTC.DAL.Pub.getAttachment("T_WEBANSWER", Model.WEBANSWER_ID);
行 7:      YJPRTC.Models.SYS_MEMBER user = HttpContext.Current.Session["UserInfo"] == null ? null : (YJPRTC.Models.SYS_MEMBER)HttpContext.Current.Session["UserInfo"];
行 8:  }

源文件: f:\Web\YJPR\Views\Details\WebAnswerDetail.cshtml    行: 6

堆栈跟踪:


[InvalidOperationException: 必须为此操作打开连接]
   Oracle.DataAccess.Client.OracleCommand.CheckConStatus() +943
   Oracle.DataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior) +446
   Oracle.DataAccess.Client.OracleCommand.ExecuteDbDataReader(CommandBehavior behavior) +42
   System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior) +10
   System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior) +427

[EntityCommandExecutionException: 执行命令定义时出错。有关详细信息,请参阅内部异常。]
   System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior) +497
   System.Data.Objects.Internal.ObjectQueryExecutionPlan.Execute(ObjectContext context, ObjectParameterCollection parameterValues) +729
   System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) +131
   System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator() +36
   System.Data.Entity.Internal.Linq.InternalQuery`1.GetEnumerator() +40
   System.Data.Entity.Infrastructure.DbQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator() +40
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +369
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +58
   YJPRTC.DAL.EntityRepository`1.Get(Expression`1 filter, Func`2 orderBy, String includeProperties) +534
   YJPRTC.DAL.Pub.getAttachment(String tableName, String recoredId) +717
   ASP._Page_Views_Details_WebAnswerDetail_cshtml.Execute() in f:\Web\YJPR\Views\Details\WebAnswerDetail.cshtml:6
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +198
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +89
   System.Web.WebPages.StartPage.RunPage() +17
   System.Web.WebPages.StartPage.ExecutePageHierarchy() +64
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +78
   System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +222
   System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +107
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +291
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13
   System.Web.Mvc.<>c__DisplayClass1c.b__19() +23
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +245
   System.Web.Mvc.<>c__DisplayClass1e.b__1b() +22
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +176
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +311
   System.Web.Mvc.Controller.ExecuteCore() +105
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +88
   System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10
   System.Web.Mvc.<>c__DisplayClassb.b__5() +34
   System.Web.Mvc.Async.<>c__DisplayClass1.b__0() +19
   System.Web.Mvc.Async.<>c__DisplayClass8`1.b__7(IAsyncResult _) +10
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
   System.Web.Mvc.<>c__DisplayClasse.b__d() +31
   System.Web.Mvc.SecurityUtil.b__0(Action f) +7
   System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +23
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +59
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9690172
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.0.30319.34009
澳门银河国际赌场
Baidu
sogou