locked
Activation Context generation failed; XML Syntax error RRS feed

  • Question

  • Hi,

    We have developped a VB.Net service that picks up XML messages and delivers them to a message queue on a remote server. Until now this process worked like a charm. We tested it for instance on a Windows 7 64 bit system and all went well

    However, when we install the application on a new W2008 server we run into problems. The installation of the service goes well, but starting the service fails:

         Activation context generation failed for "C:\....\WebshopTransportService.exe".

         Error in manifest or policy file "C:\....\WebshopTransportService.exe.Config" on line 1.

         Invalid Xml syntax.

    The config file we use is a valid XML file:

    <?xml version="1.0" encoding="Windows-1252"?>
    <configuration>
      <appSettings>
        <add key="Service.Name" value="WTS" />
        <add key="Service.CanHandle.PowerEvents" value="FALSE" />
        <add key="msmqOrders.Path" value="FormatName:DIRECT=HTTP://some ip address/msmq/Private$/some queue name" />
        <add key="MessageStore.Path" value=\\some share />
        <add key="timer.interval" value="5000" />
        <add key="strMessage" value="Navision MSMQ-BA" />
        <add key="FileFilter" value="*.XML" />
        <add key="CreateBackup" value="TRUE" />
        <add key="UseOriginalFileName" value="FALSE" />
        <add key="XML.Encoding" value="ISO-8859-1" />
        <add key="DaysBackup" value="30" />
        <add key="TimeToReachQueue" value="10" />
      </appSettings>
    </configuration>

    Running the sxstrace.exe tool yields the following info:

    =================
    Begin Activation Context Generation.
    Input Parameter:
     Flags = 0
     ProcessorArchitecture = AMD64
     CultureFallBacks = en-US;en
     ManifestPath = C:\....\WebshopTransportService.exe
     AssemblyDirectory = C:\....\
     Application Config File = C:\....\WebshopTransportService.exe.Config
    -----------------
    INFO: Parsing Application Config File C:\....\WebshopTransportService.exe.Config.
     ERROR: Line 1: XML Syntax error.
    ERROR: Activation Context generation failed.
    End Activation Context Generation.

    =================

     The system specs are:

    OS:   WS2008 R2 Enterprise (64 bit)

    MSXML 4.0 SP2 installed

    Application is targeted towards version 2.xx of the .Net framework.

     

    Does anyone has a clue how we can resolve this problem?

    Thank you in advance,

    Regards Roeland verbeek

     

    Extra info:

    We used the Dependency Walker to check for any errors. This is what we get:

    Error: The Side-by-Side configuration information for "c:\users\frans\documents\visual studio 2010\projects\webshoptransportservice\wts\bin\release\WEBSHOPTRANSPORTSERVICE.EXE" contains errors. The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail (14001).

    Error: Modules with different CPU types were found. (This is true, since we targeted the application to Any CPU and Dependecy Walker shows our service to be the only x86 module).

    Warning: At least one delay-load dependency module was not found.

    Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.

    AND

    IESHIMS.DLL cannot find the specified file. This is odd, since two versions are avalaible on the server, both x86 and x64. If we target our applicaion to x64 CPU, Dependency Walkrr fails to load our service all together.

    Wednesday, April 28, 2010 9:10 AM

Answers

  • This issue has been resolved. Serveral things seemed to go wrong and unfortunately we can't tell which thing did the job.

    The command we used to install the service executed installutil in the Framework folder. When we adressed the Framework64 folder, the service could be started without Side by Side errors.

    In the .Net project we had first deleted all unused references (like the Linq), thereby getting rid of different target platforms.

    The XML did indeed contain an error. We could pin point this error after the service had finally been started succesfully, just by writing some extra statements that wrote to the windows event log.

    Thanks for attention!

    Tuesday, May 4, 2010 1:38 PM

All replies

  • Maybe a long shot, but the first suggestion I thought of was to open the XML file in a hex editor and make sure the bytes are what you expect them to be.
    Wednesday, April 28, 2010 11:29 AM
  • This issue has been resolved. Serveral things seemed to go wrong and unfortunately we can't tell which thing did the job.

    The command we used to install the service executed installutil in the Framework folder. When we adressed the Framework64 folder, the service could be started without Side by Side errors.

    In the .Net project we had first deleted all unused references (like the Linq), thereby getting rid of different target platforms.

    The XML did indeed contain an error. We could pin point this error after the service had finally been started succesfully, just by writing some extra statements that wrote to the windows event log.

    Thanks for attention!

    Tuesday, May 4, 2010 1:38 PM
  •  

    Hi,

     

    Thank you for visiting the Microsoft forum. This forum focuses on Perfmon and diagnostic tools. I am moving your question to the moderator forum ("Where is the forum for..?"). The owner of the forum will direct you to a right forum.

     

    Thanks.

    Bruce Adamczak

    Friday, May 7, 2010 2:50 PM