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.For those who need the answer visit this link:
http://www.codeproject.com/aspnet/w...9372#xx999372xx
"Alejandro Penate-Diaz" <alexware69@.hotmail.com> wrote in message
news:%239TUIGSOFHA.1476@.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.
>
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.
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/d...personation.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" <alexware69@.hotmail.com> wrote in message
news:%239TUIGSOFHA.1476@.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.
>
0 comments:
Post a Comment