.NET Framework Developer Center > .NET Development Forums > ASMX Web Services and XML Serialization > Server Error in Application - ".dll is not a valid file"
Ask a questionAsk a question
 

AnswerServer Error in Application - ".dll is not a valid file"

  • Thursday, November 05, 2009 6:14 PMdmarsh1111 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code
    I'm recieving the following error in a previously working Web Service, I can take the same code and run it on another server so I don't think it's a problem with the code, possibly an issue with .NET itself?

    Heres the Error:

    'oj4pmrco.dll' is not a valid file.

    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.FileLoadException: 'oj4pmrco.dll' is not a valid file.

    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.

    Assembly Load Trace: The following information can be helpful to determine why the assembly 'oj4pmrco.dll' could not be loaded.

    === Pre-bind state information ===
    LOG: Where-ref bind. Location = c:\windows\microsoft.net\framework\v1.1.4322\Temporary ASP.NET Files\wssots\500341cd\30097746\oj4pmrco.dll
    LOG: Appbase = file:///c:/xxxxx/xxxxxx
    LOG
    : Initial PrivatePath = bin Calling assembly : (Unknown). === 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/v1.1.4322/Temporary ASP.NET Files/wssots/500341cd/30097746/oj4pmrco.dll.

    Stack Trace:

    [FileLoadException: 'oj4pmrco.dll' is not a valid file.]
       System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Boolean isStringized, Evidence assemblySecurity, Boolean throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark) +0
       System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Boolean stringized, Evidence assemblySecurity, StackCrawlMark& stackMark) +307
       System.Reflection.Assembly.Load(AssemblyName assemblyRef, Evidence assemblySecurity) +21
       System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly() +67
       System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly() +0
       System.Web.Compilation.BaseCompiler.GetCompiledType() +376
       System.Web.UI.PageParser.CompileIntoType() +60
       System.Web.UI.TemplateParser.GetParserCacheItemThroughCompilation() +124
    
    [HttpException (0x80004005): 'oj4pmrco.dll' is not a valid file.]
       System.Web.UI.TemplateParser.GetParserCacheItemInternal(Boolean fCreateIfNotFound) +947
       System.Web.UI.TemplateParser.GetParserCacheItemWithNewConfigPath() +125
       System.Web.UI.TemplateParser.GetParserCacheItem() +88
       System.Web.UI.TemplateControlParser.CompileAndGetParserCacheItem(String virtualPath, String inputFile, HttpContext context) +115
       System.Web.UI.TemplateControlParser.GetCompiledInstance(String virtualPath, String inputFile, HttpContext context) +36
       System.Web.UI.PageParser.GetCompiledPageInstanceInternal(String virtualPath, String inputFile, HttpContext context) +43
       System.Web.UI.PageParser.GetCompiledPageInstance(String virtualPath, String inputFile, HttpContext context) +250
       System.Web.Services.Protocols.DocumentationServerProtocol.Initialize() +381
       System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing) +106
    
    [InvalidOperationException: Unable to handle request.]
       System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing) +205
       System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response) +82
    
    [InvalidOperationException: Failed to handle request.]
       System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response) +154
       System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath) +94
       System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, String path, String pathTranslated, Boolean useAppConfig) +699
       System.Web.MapHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +95
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +173
    


    Version Information: Microsoft .NET Framework Version:1.1.4322.2443; ASP.NET Version:1.1.4322.2407

Answers

  • Thursday, November 05, 2009 6:38 PMAmadeo Casas - MSFTModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    I think some of the files in that c:\windows\microsoft.net\framework\v1.1.4322\Temporary ASP.NET Files folder could be corrupted. Remove all the files in that temporary folder, and then restart IIS. Hopefully that will solve your problem in that particular machine.

    Hope this helps.

All Replies

  • Thursday, November 05, 2009 6:38 PMAmadeo Casas - MSFTModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    I think some of the files in that c:\windows\microsoft.net\framework\v1.1.4322\Temporary ASP.NET Files folder could be corrupted. Remove all the files in that temporary folder, and then restart IIS. Hopefully that will solve your problem in that particular machine.

    Hope this helps.