I am trying to write an ASP.NET page that takes the values submit from one form, inserts them into a Word .DOT template, and then emails the template to an email address.
My first problem is I cant seem to get the webserver to load word:
---
Line 20: private void Page_Load(object sender, System.EventArgs e) {
Line 21: Word.Application App = new Word.Application();
Line 22: }
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.UnauthorizedAccessException: Access is denied.
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.
---
I have added the ASPNET account to the administrators group, and I have IIS running locally on my laptop for development purposes, so Office is definately installed.
Can anyone shed some light on this problem?
Also any other help/tutorials on doing what I am trying to do would be appreciated.
My first problem is I cant seem to get the webserver to load word:
---
Line 20: private void Page_Load(object sender, System.EventArgs e) {
Line 21: Word.Application App = new Word.Application();
Line 22: }
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.UnauthorizedAccessException: Access is denied.
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.
---
I have added the ASPNET account to the administrators group, and I have IIS running locally on my laptop for development purposes, so Office is definately installed.
Can anyone shed some light on this problem?
Also any other help/tutorials on doing what I am trying to do would be appreciated.