469,890 Members | 1,476 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,890 developers. It's quick & easy.

office automation securiy error

Hi. While trying to create a a word document in one of my asp.net pages I
keep getting an ASP.NET permission error. first I thought it was been caused
while trying to save the document, and I added permissions for the ASP.NET
account to my folders. after that I realized that the error was being
launche at the very first line of my function:

Word.ApplicationClass WordApp = new Word.ApplicationClass();

any ideas on how to solve this?
Thanks a lot,
Alejandro.


Nov 19 '05 #1
3 1480
For those who need the answer visit this link:
http://www.codeproject.com/aspnet/wo...372#xx999372xx

"Alejandro Penate-Diaz" <al********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi. While trying to create a a word document in one of my asp.net pages I
keep getting an ASP.NET permission error. first I thought it was been
caused while trying to save the document, and I added permissions for the
ASP.NET account to my folders. after that I realized that the error was
being launche at the very first line of my function:

Word.ApplicationClass WordApp = new Word.ApplicationClass();

any ideas on how to solve this?
Thanks a lot,
Alejandro.

Nov 19 '05 #2
Not to be a nark or anything, but I think the licensing for office prohibits
this sort of usage on a webserver. Or, rather, you're supposed to have a
license for office for each user using your web application. At least this
is my understanding. I'd check the EULA.

BTW, this should be unrelated to the permission problem ;)

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi. While trying to create a a word document in one of my asp.net
pages I keep getting an ASP.NET permission error. first I thought it
was been caused while trying to save the document, and I added
permissions for the ASP.NET account to my folders. after that I
realized that the error was being launche at the very first line of my
function:

Word.ApplicationClass WordApp = new Word.ApplicationClass();

any ideas on how to solve this?
Thanks a lot,
Alejandro.


Nov 19 '05 #3
It's probably a security issue.
The ASPNET user account does have permission to run office by default.
You can use impersonation to have ASP.NET run under a different user account
that does have the necessary permission.

For example, you can add a line similar to this to your web.config file:
<identity impersonate="true" userName="domain\MyUserName">
password="password"/>

Here's more info on impersonation:
http://msdn.microsoft.com/library/de...ersonation.asp

Here's more info on generating office documents, including the wrong ways
(like office automation) and the right ways:
http://SteveOrr.net/articles/ExcelExport.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

"Alejandro Penate-Diaz" <al********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi. While trying to create a a word document in one of my asp.net pages I
keep getting an ASP.NET permission error. first I thought it was been
caused while trying to save the document, and I added permissions for the
ASP.NET account to my folders. after that I realized that the error was
being launche at the very first line of my function:

Word.ApplicationClass WordApp = new Word.ApplicationClass();

any ideas on how to solve this?
Thanks a lot,
Alejandro.

Nov 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Alex Maghen | last post: by
reply views Thread by Steven Thomas | last post: by
reply views Thread by Marco Singer | last post: by
2 posts views Thread by William LaMartin | last post: by
6 posts views Thread by Luke Vogel | last post: by
1 post views Thread by Alberto | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.