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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

System.Runtime.InteropServices.COMException

Status
Not open for further replies.

emblewembl

Programmer
May 16, 2002
171
GB
I've developed a web app on my laptop using C# to open a photoshop file, modify it and export a gif. This all works fine. I have just copied the whole solution on to a brand new PC and when i try and run it I get this error:

Code:
Server execution failed 
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.Runtime.InteropServices.COMException: Server execution failed 

Source Error: 


Line 116:         //prepare photoshop 
Line 117:         //select document to open 
Line 118:         ps.ApplicationClass app = new ps.ApplicationClass(); 
Line 119:          
Line 120:         ps.Document doc = app.Open("C://Inetpub//[URL unfurl="true"]wwwroot//jockeySilks//file.psd",[/URL] null); 
  
Source File: c:\inetpub\[URL unfurl="true"]wwwroot\jockeysilks\backend\silk.cs[/URL]    Line: 118

The code used to open photoshop is:
Code:
ps.ApplicationClass app = new ps.ApplicationClass();
			
ps.Document doc = app.Open("C://Inetpub//[URL unfurl="true"]wwwroot//jockeySilks//dataIn//file.psd",[/URL] null);
app.ActiveDocument = doc;

If I open task manager while it's trying to process the page I can see that the photoshop.exe process is running under the internet guest account, whereas on my lap top it is running under my user name. Might this be the problem? Any other ideas???

I can run photoshop using basically the same code from Javascript so it muct be a .net problem, and when i created the solution on the new PC i removed the 2 photoshop dll references and re-added them, then recompiled the project.

Help this is so frustrating!

i love chocolate
 
The ASPNET user account is very restricted for security reasons -- you'll need to either run under an account that has more permissions, or grant additional persmissions to the ASPNET account.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Thanks chiph - can you explain how I do either of those?!
Thanks.

i love chocolate
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top