2009-07-23 6 views
1

ライブラリを使用するASP.net WebServiceがありますが、これはサードパーティの.dllに依存しています。ライブラリを使用しようとするとCOMExceptionが発生する

ライブラリへの参照をWebサービスに追加すると、COMExceptionが発生し、サイトを読み込めません。私はそれがaspnetユーザーの資格情報とは関係があるかもしれないと思ったので、machine.configでprocessModelを偽装して使用しようとしましたが、何も動作しないようです。

.dllはハードウェアと通信するためのもので、私はライブラリの他の部分だけをサーバー上で使用していませんが、これを修正する方法はありますか?

私はWindows XP Pro SP3でVisual 2008 SP1と.net 3.5を使用しています。

私はそれを修正する唯一の方法は、ライブラリをハードウェアと非ハードウェアに分割することだと考えています。右のトラックに私を設定するためのキム・Gräsmanへ

乾杯、Sarkie

The specified procedure could not be found. (Exception from HRESULT: 0x8007007F) 
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.Runtime.InteropServices.COMException: The specified procedure could not be found. (Exception from HRESULT: 0x8007007F) 

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: 


[COMException (0x8007007f): The specified procedure could not be found. (Exception from HRESULT: 0x8007007F)] 

[FileLoadException: A procedure imported by 'OBIDISC4NETnative, Version=0.0.0.0, Culture=neutral, PublicKeyToken=900ed37a7058e4f2' could not be loaded.] 
    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) +43 
    System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127 
    System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142 
    System.Reflection.Assembly.Load(String assemblyString) +28 
    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46 

[ConfigurationErrorsException: A procedure imported by 'OBIDISC4NETnative, Version=0.0.0.0, Culture=neutral, PublicKeyToken=900ed37a7058e4f2' could not be loaded.] 
    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613 
    System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203 
    System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105 
    System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178 
    System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir) +163 
    System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +53 
    System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors) +175 
    System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +83 
    System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +261 
    System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +101 
    System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +83 
    System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath) +10 
    System.Web.UI.WebServiceParser.GetCompiledType(String inputFile, HttpContext context) +43 
    System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath) +180 
    System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated) +102 
    System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +193 
    System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +93 
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155 




-------------------------------------------------------------------------------- 
Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082 
+0

OBIDISC4NETnative.dllのDllImportsはありますか? –

+0

私はちょうどそれを参照してください。 私は両方の.dllを反映しており、いくつかのDLLImportを持っています。 – Sarkie

答えて

1

感謝。

asp.netが現在のディレクトリではない%windir%\ system32の.dllを読み込んでいるためです。

そこには、.dllの非常に古いバージョンがありました(誰が/そこに行ったのかはわかりません)。これらを削除してFileIOExceptionを表示するので、最新の.dllに置き換えると修正されたようです。

+0

サルキー、それは助けてうれしい!私は今、参照されたdllがインポートに失敗したことを示すエラーメッセージを表示します。 –

関連する問題