App won't run on new PC!

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

moongirl

App won't run on new PC!

Post by moongirl »

Hi, I've got my C# application working fine on my lap top with a trial version of Photoshop CS2. I have just got a new PC and have set up my application on visual studio.net, copied existing files over, and re-referenced the photoshop dll's. The new machine has Photoshop CS NOT CS2 but I didn't think it would be a problem. Anyway as soon as I try and run my app I get the following error:

Code: Select allServer 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//wwwroot//jockeySilks//file.psd", null);
 
Source File: c:\inetpub\wwwroot\jockeysilks\backend\silk.cs    Line: 118



I have tried opening photoshop manually and the runing my app but I get thge same error. Does anyone have any ideas???!
moongirl

App won't run on new PC!

Post by moongirl »

I have just tried opening a PS file from a javascript and it works fine, which kind of suggests the problem is to do with .net. I am so confused!
Andrew

App won't run on new PC!

Post by Andrew »

CS and CS2 are very different from each other script-wise so I imagine that is the problem however one of the others around here will help you properly since I only use JS in CS.

Andrew
MickM

App won't run on new PC!

Post by MickM »

I don't have any great suggestings I'm afraid but I don't think this is a CS versus CS2 problem, particularly given the error message which suggests it might be a COM problem. If it is a PS error, you will often get a general Photoshop error with a PS error number. Seeing as you have recompiled the app with the CS object library, it is difficult to figure what might be wrong. You sure that this is done correctly?

You are walking a pretty lonely path using C# instead of VB.NET because there are so few people using C# for PS scripting. Aside from the shortage of advice, you also have to translate the ScriptListener code and any other example code into C#. The only person on this forum who uses C# is nmmike and he hasn't been around for a while.
moongirl

App won't run on new PC!

Post by moongirl »

Thanks MickM, but I am surprised by what you say about how few people are using C# to convert the scriptListener - once I got going I found it relatively easy to change the scriptListenerJS.log into C#.
MickM

App won't run on new PC!

Post by MickM »

I just meant that there are not a lot of people using C# judging from the number of posts I've ever seen in the Adobe forum. Most people use JS, some use VB, some AppleScript and a very small minority use C#. For experienced coders, translation is probably not a big problem but it's always an extra step.
Andrew

App won't run on new PC!

Post by Andrew »

You could try emailing nzmike and asking his advice, his profile (with email - use the email not the pm as he has not been around here for a while) is here:

bb/profile.php?mode=viewprofile&u=7 ... rofile&u=7

Andrew
moongirl

App won't run on new PC!

Post by moongirl »

Thanks everyone, I'll let you know how I get on!