title: Could not load file or assembly 'idrsnet15.dll' or one of its dependencies. The specified module could not be found
body: <p>I'm trying to add third party C# dll as resource in my Asp.net WebService Project with these configurations.</p>
  
  <p>C# DLL build in dotnet framework 4 in x64 environment with Runtime version(4.0.30319).<br>
  We are using VS 2010 framework version 4.0.30319 RTMRel; under ASP.Net webservice project configuration we set target framework 4 with target x64 Platform.</p>
  
  <p>I need to use this DLL into my web service application but getting run time exceptions while browsing it through IIS.</p>
  
  <p>----------------------------ERROR DETAIL------------------------------------------------------------</p>
  
  <blockquote>
    <p>Could not load file or assembly 'idrsnet15.dll' or one of its
    dependencies. The specified module could not be found.    Description:
    An unhandled exception occurred during the execution of the current
    web request. Please review the stack trace for more information about
    the error and where it originated in the code. </p>
    
    <p>Exception Details: System.IO.FileNotFoundException: Could not load
    file or assembly 'idrsnet15.dll' or one of its dependencies. The
    specified module could not be found.</p>
    
    <p>Source Error: </p>
    
    <p>An unhandled exception was generated during the execution of the
    current web request. Information regarding the origin and location of
    the exception can be identified using the exception stack trace below.</p>
    
    <p>Stack Trace: </p>
    
    <p>[FileNotFoundException: Could not load file or assembly
    'idrsnet15.dll' or one of its dependencies. The specified module could
    not be found.]<br>
    System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String
    codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint,
    StackCrawlMark&amp; stackMark, Boolean throwOnFileNotFound, Boolean
    forIntrospection, Boolean suppressSecurityChecks) +0<br>
    System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName
    assemblyRef, Evidence assemblySecurity, StackCrawlMark&amp; stackMark,
    Boolean forIntrospection, Boolean suppressSecurityChecks) +567<br>
    System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString,
    Evidence assemblySecurity, StackCrawlMark&amp; stackMark, Boolean
    forIntrospection) +192    System.Reflection.Assembly.Load(String
    assemblyString) +35<br>
    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String
    assemblyName, Boolean starDirective) +118</p>
    
    <p>[ConfigurationErrorsException: Could not load file or assembly
    'idrsnet15.dll' or one of its dependencies. The specified module could
    not be found.]<br>
    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String
    assemblyName, Boolean starDirective) +11392147<br>
    System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory()
    +484    System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +127    System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection
    compConfig) +334<br>
    System.Web.Compilation.BuildManager.CallPreStartInitMethods() +280<br>
    System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager
    appManager, IApplicationHost appHost, IConfigMapPathFactory
    configMapPathFactory, HostingEnvironmentParameters hostingParameters,
    PolicyLevel policyLevel, Exception appDomainCreationException) +1087</p>
    
    <p>[HttpException (0x80004005): Could not load file or assembly
    'idrsnet15.dll' or one of its dependencies. The specified module could
    not be found.]    System.Web.HttpRuntime.FirstRequestInit(HttpContext
    context) +11524352<br>
    System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)
    +141    System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
    wr, HttpContext context) +4782309</p>
    
    <p>Version Information: Microsoft .NET Framework Version:4.0.30319;
    ASP.NET Version:4.0.30319.1 
    ----------------------------ERROR DETAIL------------------------------------------------------------</p>
  </blockquote>
  
  <p>We created Asp.net project by selecting 3.5 framework then set target framework 4.0 under application configuration.</p>
  
  <p>I can witness TempAsp.net files including assembly and third party dll under this path:
  C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\myocrapp\f4fd840d\f71f8f0e\assembly\dl3\1a6aa3d5\00bb235d_957bcf01</p>