Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COM/DCOM w/ASP.NET

Status
Not open for further replies.

Akusei

Programmer
Jul 15, 2003
90
US
I have a question and it is probably pretty stupid, but here it goes.

I have developed an ASP.NET web application, all it does is open a word document using DCOM, find and replace a few values, print the file and then close and not save the changes. This works when I test it from my local machine, but not when I deploy it to the server.

I have configured DCOM to use impersonation, and configured a user to launch the application (the user is an administrator). The IWAM user is set to allow impersonation and the web application's web.config file has <identity impersonation="true"/> in it.

When I look at the processes on the server and the folder the file is in, I see the WINWORD.EXE process start and take up a little CPU time (a very short time) then quites. I notice that the ~temp.doc file is not created inside the template's folder (it was created on my local machine). This tells me that word is started, but it cannot open the document for some reason.

All the permissions on the folder should be good. I even tested Everyone - Full Control and this still did not work. I also have Everyone - Full Control in the DCOM launch and access permissions. PLEASE HELP. What do I need to do?
 
Does anyone have a clue as to why this is happening?
 
Akusei,
From my experience impersonation doesn't always work. The reasons could be that the ASP.NET service doesn't have the nec. rights to execute the job. While your user has rights to the temp folder and all the other folders the ASP.NET service doesn't. Just as test, and I mean just that in test mode (due to the tremendous security risk) change the ASP.NET user's rights to the highest (Admin etc...). Then try to run your example. If it works than you know that its a rights issue (and in my case it was).
Now for how to solve the rights issue. What I ended up doing was to give rights (read & write) of that particular temp folder and the exe folder to the ASP.NET service. This could become tedious in the case of many different jobs. I heard that with asp.net 2.0 they took care of this problem.
Let me know how you ended up solving this issue.
Klaz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top