在后台有这么一句话:
 doc.Close(ref doNotSaveChanges, ref missingValue, ref missingValue);vs运行的时候,没有错误.但是iis发布之后,就会出错未将对象引用设置到对象的实例。说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。源错误: 
行 146:            object missingValue = Type.Missing;
行 147:            object doNotSaveChanges = Microsoft.Office.Interop.Word.WdSaveOptions.wdDoNotSaveChanges;
行 148:            doc.Close(ref doNotSaveChanges, ref missingValue, ref missingValue);
行 149:            appWord.Application.Quit(ref miss, ref miss, ref miss);
行 150:            doc = null;源文件: e:\10.24\yuxuelitable\ncjttdsyqmjdrb_cx.aspx.cs    行: 148 堆栈跟踪: 
[NullReferenceException: 未将对象引用设置到对象的实例。]
   ncjttdsyqmjdrb_cx.GridView1_RowEditing(Object sender, GridViewEditEventArgs e) in e:\10.24\yuxuelitable\ncjttdsyqmjdrb_cx.aspx.cs:148
   System.Web.UI.WebControls.GridView.OnRowEditing(GridViewEditEventArgs e) +133
   System.Web.UI.WebControls.GridView.HandleEdit(Int32 rowIndex) +43
   System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +611
   System.Web.UI.WebControls.GridView.RaisePostBackEvent(String eventArgument) +207
   System.Web.UI.WebControls.GridView.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565版本信息: Microsoft .NET Framework 版本:2.0.50727.4971; ASP.NET 版本:2.0.50727.4971