You are viewing limited content. For full access, please sign in.

Question

Question

IIS application pool and the SDK runtime installer.

SDK
asked on March 3, 2014

I've got a customer who is having issues with the SDK on 3 out 5 machines he's installed the SDK 9 runtime installer on.

 

He says the main issue is when they try to compile and run in IIS's application pool the first time someone tries to interact with the custom application it errors out. He says "Our application cannot reference compile" but he has no issues on any PC or server where they installed the full SDK. 

 

I'm working on getting a more detailed description and the error messages. The LF references they are using:

 

  • ClientAutomation 
  • Interop.DocumentProcessor90
  • Interop.LFSO90Lib
  • Laserfiche.DocumentServices
  • Laserfiche.I18n
  • Laserfiche.RepositoryAccess

 

I'm not as well versed as I would like with the SDK - where should I start? 

 

0 0

Replies

replied on March 3, 2014

Can you get some more information from the client? It sounds like they are having an issue where an assembly or its dependencies can't be loaded at runtime, but I can't be sure from the description you've provided. Can you find out:

  1. If it is a compile-time or run-time error
  2. If it is compile-time, what the exact error is
  3. If it is run-time, the type, message, and error code (if any) for the Exception

That should be enough to get started in tracking down the issue.

0 0
replied on March 3, 2014

These components require the visual C++ runtime. For 9.0, .net 2 and COM assemblies require the Visual C++ 2008 runtime and .net 4 versions require the Visual C++ 2010 runtime.Those are installed by the full installation but not included in the runtime installation. Check out the section on 'Distributing Your COM/.NET Applications' in the SDK documentation.

0 0
replied on March 3, 2014

Here's one of the error messages:

 

Event code: 3008 
Event message: A configuration error has occurred. 
Event time: 2/24/2014 3:48:24 PM 
Event time (UTC): 2/24/2014 8:48:24 PM 
Event ID: a6344ea27ab54ee3a62ca168e3b65fe9 
Event sequence: 1 
Event occurrence: 1 
Event detail code: 0 
 
Application information: 
    Application domain: ******** 
    Trust level: Full 
    Application Virtual Path: / 
    Application Path: E:\**********
    Machine name: ********* 
 
Process information: 
    Process ID: 1156 
    Process name: w3wp.exe 
    Account name: ********** 
 
Exception information: 
    Exception type: ConfigurationErrorsException 
    Exception message: Could not load file or assembly 'Laserfiche.I18n' or one of its dependencies. An attempt was made to load a program with an incorrect format.
   at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)
   at System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory()
   at System.Web.Configuration.AssemblyInfo.get_AssemblyInternal()
   at System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig)
   at System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath)
   at System.Web.Compilation.BuildManager.ExecutePreAppStart()
   at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)

Could not load file or assembly 'Laserfiche.I18n' or one of its dependencies. An attempt was made to load a program with an incorrect format.
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.Load(String assemblyString)
   at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)


 
Request information: 
    Request URL: http://******** 
    Request path: /LogOn/Account 
    User host address: ********* 
    User:  
    Is authenticated: False 
    Authentication Type:  
    Thread account name: *********
 
Thread information: 
    Thread ID: 5 
    Thread account name: ******** 
    Is impersonating: False 
    Stack trace:    at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)
   at System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory()
   at System.Web.Configuration.AssemblyInfo.get_AssemblyInternal()
   at System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig)
   at System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath)
   at System.Web.Compilation.BuildManager.ExecutePreAppStart()
   at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)

 
Custom event details: 

 

0 0
replied on March 3, 2014

This kind of error looks like the application is targeting a CPU architecture that is different from the one targeted by the SDK installation. Confirm with the customer that if the application is running as 32-bit (I believe for web applications this is controlled in the AppPool settings, but I could be mistaken) that the 32-bit SDK is installed, or that it is running as 64-bit and the SDK install is 64 bit? This kind of error can occur even if the application is built targeting 'Any CPU' - you need to check what architecture it is actually running under.

1 0
replied on March 3, 2014 Show version history

"An attempt was made to load a program with an incorrect format" refers to an attempt to load a 32-bit assembly into a 64-bit process or vice versa.  For the web, the process architecture is controlled by the application pool.  Make sure it is set appropriately and that the matching SDK has been installed.  Visual Studio compilation sometimes copies assemblies into the bin directory that shouldn't be there, this can cause the problem what you are seeing.  You can try setting the reference to not copy, but that isn't totally reliable in my experience.  The SDK assemblies are all installed into the GAC and they should not in general be present in the bin directory.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.