Server Error in '/' Application.
This command is not available because no document is open.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: This command is not available because no document is open.

Source Error:

Line 153: ref nullobj, ref nullobj);
Line 154: applicationclass.Visible = false;
Line 155: Microsoft.Office.Interop.Word.Document document = applicationclass.ActiveDocument;
Line 156:
Line 157: //Save the word document as HTML file


Source File: e:\BEMS\BEMS.Web\Main\Bank\ucReadWord.ascx.cs Line: 155

Stack Trace:

[COMException (0x800a1098): This command is not available because no document is open.]
Microsoft.Office.Interop.Word.ApplicationClass.get _ActiveDocument() +0
ucReadWord.btnOpenDocument_Click(Object sender, EventArgs e) in e:\BEMS\BEMS.Web\Main\Bank\ucReadWord.ascx.cs:155
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565


Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927

Bình thường khi chạy trực tiếp trên vs2010 thì trang web của mình vẫn thực hiện các lệnh của thư viên using Microsoft.Office.Interop.Word; bình thường nhưng khi đẩy lên iis thì nó xuât hiện lỗi như trên mong mọi người giúp đỡ mình với, xin cảm ơn !