locked
web service problem - An unhandled exception occurred during the execution of the current web request.

    Question

  • I have a web service created with the Managed Extensions for C++.   I need to use some unmanaged C++ code with this web service.   If I compile with the option "Pure MSIL Common Language Runtime Support" enabled,  the web service loads and I
    can see the web methods I've created.    If I change this option to "Common Language Runtime Support" so I can link with
    my unmanaged C++ code,  the webservice no longer loads in IE and I get the error:

    Server Error in '/xxxWebService' Application.
    The specified module could not be found. (Exception from HRESULT:0x8007007E)

    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.

    Exception Details: System.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)

    Source Error:

    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.

    Stack Trace:

    [FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)] 
    System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
    System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +54
    System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +211
    System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +141
    System.Reflection.Assembly.Load(String assemblyString) +25
    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +32




    [ConfigurationErrorsException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)]
    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +596
    System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +211
    System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +46
    System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +177
    System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +185
    System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) +230
    System.Web.Compilation.BuildManager.CompileGlobalAsax() +49
    System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +462
    [HttpException (0x80004005): The specified module could not be found. (Exception from HRESULT: 0x8007007E)]
    System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +57
    System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +612
    System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +644
    [HttpException (0x80004005): The specified module could not be found. (Exception from HRESULT: 0x8007007E)]
    System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +3465427
    System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +69
    System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +279

    Any ideas what might be causing this error?

    I cannot seem to resolve it.

    • Moved by Zhi-Xin Ye Thursday, October 23, 2008 9:41 AM Web Service problem [loc] (Moved from Common Language Runtime to ASMX Web Services and XML Serialization)
    Friday, October 17, 2008 12:23 AM

Answers

  • Seems like an assembly that the app requires is missing. Following could be the reasons:

    • Your app is trying to load an assembly dynamically which is not available
    • You deployed the app on a server which does not have all the required assemblies installed (e.g. Missing .NET framework)

     

    Sunday, November 09, 2008 8:38 PM

All replies

  • Seems like an assembly that the app requires is missing. Following could be the reasons:

    • Your app is trying to load an assembly dynamically which is not available
    • You deployed the app on a server which does not have all the required assemblies installed (e.g. Missing .NET framework)

     

    Sunday, November 09, 2008 8:38 PM
  • I developed a web service (ASP .NET v2)in C# with an ldAQuaR.dll as reference. I deployed the web service to server1. It works fine.

    When I deployed to server2 with the same code. I got the same error messages as the previous question (The specified module could not be found. (Exception from HRESULT: 0x8007007E)).

    My server2 run other ASP .NET v2 web applications perfectly. It seams no problem when I checked the access permission and .NET framework version. The bin folder contains all dll files about the web service references.

    Does anybody have idea about that?

    Thank you in advance.

    Friday, February 27, 2009 10:49 PM
  • I'm getting the same problem but just intermittently so I bet all the  assemblies are in place
    Friday, October 14, 2011 8:49 PM