The message filter indicated that the application is busy

G

Guest

Hi,
I'm trying to write an ASP.NET page using VS.NET 2003, Office 2003, Win 2000
but I keep gettin this error:
"The message filter indicated that the application is busy" this is the code.
=====================================================
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim oWordApplication As Word.Application
Dim oDoc As Word.Document
Dim strTemp As String
oWordApplication = New Word.Application
oDoc = oWordApplication.Documents.Add
oDoc.Activate()
oWordApplication.Selection.TypeText("Hi This My First Test Document")
oWordApplication.Selection.TypeParagraph()
oWordApplication.Selection.TypeText("Please resd the following lines carefully!")
oWordApplication.Selection.TypeParagraph()
oWordApplication.Selection.TypeText("Continue reading on the next page...")
oWordApplication.Selection.TypeParagraph()
oDoc.SaveAs("E:\Inetpub\wwwroot\SampleWebApp\WebQA\MyFirstDoc1.doc")
oDoc.Close()
oWordApplication.Quit()
Label2.Text = " Word Doc is saved..."
End Sub
=====================================================
This error only occurs on the second time click on line oDoc.Activate() line, I also tried all of the followings but still the same problem.
A- I noticed after the error the Winword.exe process still running on the task manager and I cannot kill it.
B- I also tired a simpler version of the code create a oWordApp object and oWordApp.Quit() the same issue I think ASP cannot quit the process.
C- I tried the same code on a Windows Form and it worked.
D- I tried to increase the TerminateTime = infinite on Machine.Config file of the .NET framework configuration but still the same issue.
E- I assigned Admin rights to ASPNET user but the same Issue.
F- I also noticed a file Normal.dot created after the error on my system drive (E:\Normal.dot) which I cannot delete it says "File in use"
Conclusion: My ASP.NET application cannot terminate the Word process!
Can anyone give me some other suggestions?

Thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top