Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

C# app throws error when connecting to indesign server

Community Beginner ,
Jul 07, 2011 Jul 07, 2011

It throws this exception:

Invalid syntax (Exception from HRESULT: 0x800401E4 (MK_E_SYNTAX))
   at System.Runtime.InteropServices.Marshal.MkParseDisplayName(IBindCtx pbc, String szUserName, UInt32& pchEaten, IMoniker& ppmk)
   at System.Runtime.InteropServices.Marshal.BindToMoniker(String monikerName)

Caused by this line:

InDesignServer.Application app = (InDesignServer.Application)(System.Runtime.InteropServices.Marshal.BindToMoniker("configuration_noport"));

The server is successfully running with the no configuration parameters therefore the configuration name by default should be "configuration_noport".

Any idea why it's throwing this error? This is a C# 4.0 console application connecting to Indesign Server CS 5 (7.0).

3.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 24, 2012 Oct 24, 2012

Can anyone from Adobe please offer some more insight on this matter? I have encountered the excact same issues and not been able to find any answers or clues.
Test Steps involved:

- start a named indesign server instance in a cmd using: indesignserver -configuration testServer (and seeing that it's using 'testServer' when starting up)
- running a sample using BindtoMoniker() always works using VS and the built-in dev WebServer and connects to my named instance 'testServer' but never with IIS.
- tried to grant as much as possible to IIS pool identity, DCOM settings etc...no luck
- impersonating as Admin in code and making sure the current thread is authenticated, no luck

- all I can is to fire up new COM instances with IIS using the new:... syntax but not get the named one

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Dec 06, 2012 Dec 06, 2012
LATEST

Hi, did you tried by this way?

System.Type indAppType = System.Type.GetTypeFromProgID("InDesignServer.Application");

InDesignServer.Application objInDesignServerApp = (InDesignServer.Application)Activator.CreateInstance(indAppType, true);

for me it worked well

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines