I want to open a new instance of word in my aspx page.
I try to open, execute a macro and download to the client.
First I use this code:
Dim objWordApp As Word.Application
Dim objWordDoc As Word.Document
'Create a new instance of Word
objWordApp = New Word.Application()
'Open the document containing the macro
objWordDoc = _
objWordApp.Documents.Open("C:\Inetpub\
'Run the macro
objWordDoc.macro1 ("Hello!", 23)
But i have an security error.
Here is the details on debug windows
Exception Details: System.UnauthorizedAccessException: ??? ??????????? ? ????????.
The ASP.NET process is not authorized to access the requested resource. For security reasons the default ASP.NET process identity is '{machinename}\ASPNET', which has limited privileges. Consider granting access rights to the resource to the ASP.NET process identity.
To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the "{machinename}\ASPNET" user. Highlight the ASP.NET account, and check the Write box in the Allow column.
Source Error:
Line 15: Dim objWordDoc As Word.Document
Line 16: 'Create a new instance of Word
Line 17: objWordApp = New Word.Application()
Line 18: 'Response.Redirect("Ypagvgh_g.doc")
Line 19:
But the ASPNET user has the administrator role
Can everybody help me?
I try to open, execute a macro and download to the client.
First I use this code:
Dim objWordApp As Word.Application
Dim objWordDoc As Word.Document
'Create a new instance of Word
objWordApp = New Word.Application()
'Open the document containing the macro
objWordDoc = _
objWordApp.Documents.Open("C:\Inetpub\
'Run the macro
objWordDoc.macro1 ("Hello!", 23)
But i have an security error.
Here is the details on debug windows
Exception Details: System.UnauthorizedAccessException: ??? ??????????? ? ????????.
The ASP.NET process is not authorized to access the requested resource. For security reasons the default ASP.NET process identity is '{machinename}\ASPNET', which has limited privileges. Consider granting access rights to the resource to the ASP.NET process identity.
To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the "{machinename}\ASPNET" user. Highlight the ASP.NET account, and check the Write box in the Allow column.
Source Error:
Line 15: Dim objWordDoc As Word.Document
Line 16: 'Create a new instance of Word
Line 17: objWordApp = New Word.Application()
Line 18: 'Response.Redirect("Ypagvgh_g.doc")
Line 19:
But the ASPNET user has the administrator role
Can everybody help me?