System.IO.FileNotFoundException: The specified module could not be

G

Guest

I have a remoting application that was developed on a Windows XP SP2 machine
with VS2005 SP1. I finally got everything deployed using Wix 3.0, and it
works great. Problem is, when I install the msi on a W23 server SP2, I get
the following error:

System.Runtime.Remoting.RemotingException: Remoting configuration failed
with the exception 'System.Reflection.TargetInvocationException: Exception
has been thrown by the target of an invocation. --->
System.IO.FileNotFoundException: The specified module could not be found.
(Exception from HRESULT: 0x8007007E)
at
Ems.Cloud.Common.Security.SecurityClientChannelSinkProvider..ctor(IDictionary
properties, ICollection providerData)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeConstructor(Object[] args,
SignatureStruct& signature, IntPtr declaringType)
at System.RuntimeMethodHandle.InvokeConstructor(Object[] args,
SignatureStruct signature, RuntimeTypeHandle declaringType)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder
binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr,
Binder binder, Object[] args, CultureInfo culture, Object[]
activationAttributes)
at
System.Runtime.Remoting.RemotingConfigHandler.CreateChannelSinkProvider(SinkProviderEntry entry, Boolean bServer)
at
System.Runtime.Remoting.RemotingConfigHandler.CreateClientChannelSinkProviderChain(ArrayList entries)
at
System.Runtime.Remoting.RemotingConfigHandler.CreateChannelFromConfigEntry(ChannelEntry entry)
at
System.Runtime.Remoting.RemotingConfigHandler.ConfigureChannels(RemotingXmlConfigFileData configData, Boolean ensureSecurity)
at
System.Runtime.Remoting.RemotingConfigHandler.ConfigureRemoting(RemotingXmlConfigFileData configData, Boolean ensureSecurity)'.
at
System.Runtime.Remoting.RemotingConfigHandler.ConfigureRemoting(RemotingXmlConfigFileData configData, Boolean ensureSecurity)
at System.Runtime.Remoting.RemotingConfigHandler.DoConfiguration(String
filename, Boolean ensureSecurity)
at System.Runtime.Remoting.RemotingConfiguration.Configure(String
filename, Boolean ensureSecurity)
at Ems.Cloud.LoggingServer.RegisterRemoteObjects()
at Ems.Cloud.RemotingServer.DoStart()

The application is deployed into C:\Program Files\Ems\Cloud. This is where
the Ems.Cloud.Server.exe, Ems.Cloud.Server.exe.config, & Ems.Cloud.Common.dll
files are stored, but the error states that Ems.Cloud.Common.dll is NotFound,
and only on Windows Server 2003... Why? I'm out of ideas. Here is my config
file...

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="protectedSettings"
type="Ems.Cloud.Configuration.ProtectedSettings, Ems.Cloud.Configuration,
Version=1.0.0.0,Culture=neutral, PublicKeyToken=bd1505632153fa83" />
</configSections>
<system.diagnostics>
<trace autoflush="true" indentsize="2">
<listeners>
<remove name="Default"/>
<add name="EventLogListener"
type="System.Diagnostics.EventLogTraceListener"
initializeData="EmsCloudDebugging" traceOutputOptions="DateTime" />
</listeners>
</trace>
<switches>
<add name="DebugMode" value="1" />
</switches>
</system.diagnostics>
<system.runtime.remoting>
<customErrors mode="off" />
<!--Application Domain provided for EMS Remote Objects, only one
application node allowed-->
<application name="EmsCloudServer">
<service>
<!--Remote-Objects provided within this Application Domain-->
<!--type="Namespace + ClassName, ProjectAssemblyName"-->
<wellknown mode="SingleCall" type="Ems.Cloud.DefaultBase,
Ems.Cloud.Logging" objectUri="LoggingClient" />
</service>
<service>
<wellknown mode="SingleCall" type="Ems.Cloud.PciData,
Ems.Cloud.PciData" objectUri="PciData" />
</service>
<channels>
<!--tcp Channel Provided for access to Remote-Objects-->
<channel ref="tcp" port="5010">
<clientProviders>
<!--When acting as a client, the formatter nodes MUST be listed
before the provider node-->
<!--The formatter must be set to 'typeFilterLevel="Full"' or
you'll get Security Exceptions when passing objects-->
<formatter ref="binary" typeFilterLevel="Full" />
<!--Custom EMS Channel Sink that provides integrated AD
Security-->
<!--securityPackage(NTLM, kerberos, negotiate)
impersonationLevel(identify, impersonate, delegate)-->
<!--authenticationLevel(call-nothing, packetIntegrity-signing,
packetPrivacy-encryption-->
<provider
type="Ems.Cloud.Common.Security.SecurityClientChannelSinkProvider,
Ems.Cloud.Common, Version=1.0.1.5, Culture=neutral,
PublicKeyToken=bd1505632153fa83" securityPackage="negotiate"
impersonationLevel="delegate" authenticationLevel="packetPrivacy"
authenticationHandler="Ems.Cloud.Common.Security.AuthenticationHandler,
Ems.Cloud.Common, Version=1.0.1.5, Culture=neutral,
PublicKeyToken=bd1505632153fa83" />
</clientProviders>
<serverProviders>
<!--Custom EMS Channel Sink that provides integrated AD
Security-->
<!--securityPackage(NTLM, kerberos, negotiate)
impersonationLevel(identify, impersonate, delegate)-->
<!--authenticationLevel(call-nothing, packetIntegrity-signing,
packetPrivacy-encryption-->
<provider
type="Ems.Cloud.Common.Security.SecurityServerChannelSinkProvider,
Ems.Cloud.Common, Version=1.0.1.5, Culture=neutral,
PublicKeyToken=bd1505632153fa83" securityPackage="negotiate"
impersonationLevel="delegate" authenticationLevel="packetPrivacy"
authenticationHandler="Ems.Cloud.Common.Security.AuthenticationHandler,
Ems.Cloud.Common, Version=1.0.1.5, Culture=neutral,
PublicKeyToken=bd1505632153fa83" />
<!--On the server-side formatter nodes MUST be listed after the
provider node-->
<!--The formatter must be set to 'typeFilterLevel="Full"' or
you'll get Security Exceptions when passing objects-->
<formatter ref="binary" typeFilterLevel="Full" />
</serverProviders>
</channel>
<!--http channel provided for Web/ASP based applications-->
<channel ref="http" port="6010">
<clientProviders>
<!--On the server-side formatter nodes MUST be listed after the
provider node-->
<formatter ref="binary" typeFilterLevel="Full" />
<formatter ref="soap" typeFilterLevel="Full" />
<!--Custom EMS Channel Sink that provides integrated AD
Security-->
<provider
type="Ems.Cloud.Common.Security.SecurityClientChannelSinkProvider,
Ems.Cloud.Common, Version=1.0.1.5, Culture=neutral,
PublicKeyToken=bd1505632153fa83" securityPackage="negotiate"
impersonationLevel="delegate" authenticationLevel="packetPrivacy"
authenticationHandler="Ems.Cloud.Common.Security.AuthenticationHandler,
Ems.Cloud.Common, Version=1.0.1.5, Culture=neutral,
PublicKeyToken=bd1505632153fa83" />
</clientProviders>
<serverProviders>
<!--Custom EMS Channel Sink that provides integrated AD
Security-->
<provider
type="Ems.Cloud.Common.Security.SecurityServerChannelSinkProvider,
Ems.Cloud.Common, Version=1.0.1.5, Culture=neutral,
PublicKeyToken=bd1505632153fa83" securityPackage="negotiate"
impersonationLevel="delegate" authenticationLevel="packetPrivacy"
authenticationHandler="Ems.Cloud.Common.Security.AuthenticationHandler,
Ems.Cloud.Common, Version=1.0.1.5, Culture=neutral,
PublicKeyToken=bd1505632153fa83" />
<!--On the server-side formatter nodes MUST be listed after the
provider node-->
<formatter ref="soap" typeFilterLevel="Full" />
<formatter ref="binary" typeFilterLevel="Full" />
</serverProviders>
</channel>
</channels>
</application>
</system.runtime.remoting>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="Interfaces;Business Logic" />
</assemblyBinding>
</runtime>
</configuration>
 
G

Guest

SOLVED: msvcr71.dll was missing from System32.

I realized that it's not that it can't find Ems.Cloud.Common, it is
Ems.Cloud.Common that can't find a file that IT needs. It happened to be
msvcr71.dll at the point where I was injecting unmanaged code into my C#
project.
 
S

Steven Cheng[MSFT]

Hello,

From your description, I got that you have a remoting application which
encounter some "FileNotFound" exception when deployed on a windows 2k3 box,
correct?

Based on the error callstack, I haven't got the exact file's name, how did
you get "Ems.Cloud.Common.dll is NotFound" is not found? Anyway, for
assembly not founding error, it is recommended to use FusLogVw.exe tool to
trace the assembly binding/locating failures:

#Assembly Binding Log Viewer (Fuslogvw.exe)
http://msdn2.microsoft.com/en-us/library/e74a18c4(VS.71).aspx

By default, it will log all the failed assembly binding/locating and you
can get how the runtime try to locate the certain assembly. In addition, I
found that in the config file, you have the following setting:

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="Interfaces;Business Logic" />
</assemblyBinding>
</runtime>

maybe the runtime will try probing those sub directory instead of the base
directory(if the strong-named assemblies are not in GAC). For testing, in
addition to using Fuslogvw.exe, you can also try putting the assembly in
GAC or those sub directory(in probing path) to see whether it helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



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

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

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


This posting is provided "AS IS" with no warranties, and confers no rights.





--------------------
From: =?Utf-8?B?c2FtMDFt?= <[email protected]>
Subject: System.IO.FileNotFoundException: The specified module could not be
Date: Mon, 22 Oct 2007 18:21:01 -0700
I have a remoting application that was developed on a Windows XP SP2 machine
with VS2005 SP1. I finally got everything deployed using Wix 3.0, and it
works great. Problem is, when I install the msi on a W23 server SP2, I get
the following error:

System.Runtime.Remoting.RemotingException: Remoting configuration failed
with the exception 'System.Reflection.TargetInvocationException: Exception
has been thrown by the target of an invocation. --->
System.IO.FileNotFoundException: The specified module could not be found.
(Exception from HRESULT: 0x8007007E)
at
Ems.Cloud.Common.Security.SecurityClientChannelSinkProvider..ctor(IDictiona ry
properties, ICollection providerData)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeConstructor(Object[] args,
SignatureStruct& signature, IntPtr declaringType)
at System.RuntimeMethodHandle.InvokeConstructor(Object[] args,
SignatureStruct signature, RuntimeTypeHandle declaringType)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder
binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr,
Binder binder, Object[] args, CultureInfo culture, Object[]
activationAttributes)
at
System.Runtime.Remoting.RemotingConfigHandler.CreateChannelSinkProvider(Sin
kProviderEntry entry, Boolean bServer)
at
System.Runtime.Remoting.RemotingConfigHandler.CreateClientChannelSinkProvid erChain(ArrayList entries)
at
System.Runtime.Remoting.RemotingConfigHandler.CreateChannelFromConfigEntry( ChannelEntry entry)
at
System.Runtime.Remoting.RemotingConfigHandler.ConfigureChannels(RemotingXml
ConfigFileData configData, Boolean ensureSecurity)
at
System.Runtime.Remoting.RemotingConfigHandler.ConfigureRemoting(RemotingXml
ConfigFileData configData, Boolean ensureSecurity)'.
at
System.Runtime.Remoting.RemotingConfigHandler.ConfigureRemoting(RemotingXml
ConfigFileData configData, Boolean ensureSecurity)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top