没有 MTS 对象上下文 (异常来自 HRESULT:0x8004E004)
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Runtime.InteropServices.COMException: 没有 MTS 对象上下文 (异常来自 HRESULT:0x8004E004)源错误:
行 206: finally
行 207: {
行 208: ServiceDomain.Leave();
行 209: }
行 210:
堆栈跟踪:
[COMException (0x8004e004): 没有 MTS 对象上下文 (异常来自 HRESULT:0x8004E004)]
System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) +0
System.EnterpriseServices.ServiceDomain.Leave() +142
system_blog_templete_admin_temp_upload.Button1_Click(Object sender, EventArgs e) in e:\wwwroot\noble\Admin\admin_templete\temp_upload.aspx.cs:208
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
源码太多 :
主要是使用了下面的代码后就出现了上面的错误
[align=center]using System.EnterpriseServices;//引用命名空间 try{ ServiceConfig config = new ServiceConfig();
config.Transaction = TransactionOption.Required;
ServiceDomain.Enter(config);//运用事务
//方法的实现
////////////////////
ContextUtil.SetComplete();//事务提交,所有操作全部执行}catch{
ContextUtil.SetAbort();//事务会滚,所有操作失效
}finally{
ServiceDomain.Leave();[/align]
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Runtime.InteropServices.COMException: 没有 MTS 对象上下文 (异常来自 HRESULT:0x8004E004)源错误:
行 206: finally
行 207: {
行 208: ServiceDomain.Leave();
行 209: }
行 210:
堆栈跟踪:
[COMException (0x8004e004): 没有 MTS 对象上下文 (异常来自 HRESULT:0x8004E004)]
System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) +0
System.EnterpriseServices.ServiceDomain.Leave() +142
system_blog_templete_admin_temp_upload.Button1_Click(Object sender, EventArgs e) in e:\wwwroot\noble\Admin\admin_templete\temp_upload.aspx.cs:208
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
源码太多 :
主要是使用了下面的代码后就出现了上面的错误
[align=center]using System.EnterpriseServices;//引用命名空间 try{ ServiceConfig config = new ServiceConfig();
config.Transaction = TransactionOption.Required;
ServiceDomain.Enter(config);//运用事务
//方法的实现
////////////////////
ContextUtil.SetComplete();//事务提交,所有操作全部执行}catch{
ContextUtil.SetAbort();//事务会滚,所有操作失效
}finally{
ServiceDomain.Leave();[/align]
解决方案 »
- IIS6.0发布asp.net网站无法匿名访问
- gridview 数据无刷新更新数据,要求不使用UpdatePanel,数据的更新来自弹出层里面的一条数据
- !!!***我是不是应该用静态页? 静态页怎么生成?***!!!
- 您好,向您请教有关ASP.NET网页开发问题
- PostBackUrl传不了值???页面传!
- 这种对话框弹出提示谁见过?
- 求 SQL SERVER 2005 bate3 下载地址
- asp.net网页登录记住用户名
- repeater控件里的赋值问题?请大家帮忙谢谢.
- 使用System.Web.Mail.SMTPMail 不知道如何配置IIS的SMTP
- 关于歌曲盗链!
- 验证控件和TextChanged事件冲突,请教解决方法
缺少【Transaction="Required"】----蒋海滨