I am trying to instantiate a JobSubmitService object. I have added the web reference to my C# solution, and I have named it EasyLinkJobSubmit (pointing to http://ws.easylink.com/JobSubmit/2011/01?WSDL). My solution builds fine, but I get an error when I try to new up the object. Any idea what I am doing wrong?
Code:
public RequestBuilder()
{
_submitService = new EasyLinkJobSubmit.JobSubmitService();
}
Error:
System.IO.FileNotFoundException was unhandled by user code
HResult=-2147024894
Message=Could not load file or assembly 'Simplex.EasyLink.XmlSerializers' or one of its dependencies. The system cannot find the file specified.
Source=mscorlib
FileName=Simplex.EasyLink.XmlSerializers
FusionLog==== Pre-bind state information ===
LOG: User = Unknown
LOG: DisplayName = Simplex.EasyLink.XmlSerializers
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: Simplex.EasyLink.XmlSerializers | Domain ID: 3
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///F:/Projects/SHC-IT/Dev/EasyLink/Services/Simplex.FaxService/Simplex.FaxService/
LOG: Initial PrivatePath = F:\Projects\SHC-IT\Dev\EasyLink\Services\Simplex.FaxService\Simplex.FaxService\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: F:\Projects\SHC-IT\Dev\EasyLink\Services\Simplex.FaxService\Simplex.FaxService\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/simplexfaxservice/36e43b0b/97842a44/Simplex.EasyLink.XmlSerializers.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/simplexfaxservice/36e43b0b/97842a44/Simplex.EasyLink.XmlSerializers/Simplex.EasyLink.XmlSerializers.DLL.
LOG: Attempting download of new URL file:///F:/Projects/SHC-IT/Dev/EasyLink/Services/Simplex.FaxService/Simplex.FaxService/bin/Simplex.EasyLink.XmlSerializers.DLL.
LOG: Attempting download of new URL file:///F:/Projects/SHC-IT/Dev/EasyLink/Services/Simplex.FaxService/Simplex.FaxService/bin/Simplex.EasyLink.XmlSerializers/Simplex.EasyLink.XmlSerializers.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/simplexfaxservice/36e43b0b/97842a44/Simplex.EasyLink.XmlSerializers.EXE.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/simplexfaxservice/36e43b0b/97842a44/Simplex.EasyLink.XmlSerializers/Simplex.EasyLink.XmlSerializers.EXE.
LOG: Attempting download of new URL file:///F:/Projects/SHC-IT/Dev/EasyLink/Services/Simplex.FaxService/Simplex.FaxService/bin/Simplex.EasyLink.XmlSerializers.EXE.
LOG: Attempting download of new URL file:///F:/Projects/SHC-IT/Dev/EasyLink/Services/Simplex.FaxService/Simplex.FaxService/bin/Simplex.EasyLink.XmlSerializers/Simplex.EasyLink.XmlSerializers.EXE.
StackTrace:
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.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.LoadWithPartialNameInternal(AssemblyName an, Evidence securityEvidence, StackCrawlMark& stackMark)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.Win32.Fusion.ReadCache(ArrayList alAssems, String name, UInt32 nFlag)
at System.Reflection.RuntimeAssembly.EnumerateCache(AssemblyName partialName)
at System.Reflection.RuntimeAssembly.LoadWithPartialNameInternal(AssemblyName an, Evidence securityEvidence, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadWithPartialName(String partialName, Evidence securityEvidence)
at System.Xml.Serialization.TempAssembly.LoadGeneratedAssembly(Type type, String defaultNamespace, XmlSerializerImplementation& contract)
at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Type type)
at System.Web.Services.Protocols.SoapClientType..ctor(Type type)
at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()
at Simplex.EasyLink.EasyLinkJobSubmit.JobSubmitService..ctor()
at Simplex.EasyLink.RequestBuilder..ctor()
at Simplex.FaxService.Library.FaxService.Send(FaxMessage message)
at SyncInvokeSend(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
InnerException: