我正在尝试访问在服务器上运行的 VB 程序中的 .Net 程序集。我收到了经常提到的Could not load file or assembly
错误。我浏览了大约 60 个不同的网页,但我没有做任何事情来修复它。
我将 dll 与我正在启动的可执行文件放在同一目录中。在它显示的 Appbase 中file://?/c:
,在我看到的研究这个的其他示例中,它们都有file:///
. 我不知道这是否是问题所在。如果是的话,谁能告诉我如何解决它?我试过搜索,file://?/
但即使在谷歌和必应中用问号括起来时也会忽略所有特殊字符,据我所知。
错误信息:
Unhandled Exception: System.TypeInitializationException: The type initializer for 'cgiTest.modCurrentBalance' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Aspose.Cells, Version=7.4.1.0, Culture=neutral, PublicKeyToken=716fcc553a201e56' or one of its dependencies. The system cannot find the file specified.
File name: 'Aspose.Cells, Version=7.4.1.0, Culture=neutral, PublicKeyToken=716fcc553a201e56'
at cgiTest.modCurrentBalance..cctor()
=== Pre-bind state information ===
LOG: User = WEBSERVER1\Administrator
LOG: DisplayName = Aspose.Cells, Version=7.4.1.0, Culture=neutral, PublicKeyToken=716fcc553a201e56
(Fully-specified)
LOG: Appbase = file://?/c:/inetpub/intranet/
LOG: Initial PrivatePath = NULL
Calling assembly : cgiTest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=abaf442583423e6f.
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using machine configuration file from c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Post-policy reference: Aspose.Cells, Version=7.4.1.0, Culture=neutral, PublicKeyToken=716fcc553a201e56
LOG: Attempting download of new URL file://?/c:/inetpub/intranet/Aspose.Cells.DLL.
LOG: Attempting download of new URL file://?/c:/inetpub/intranet/Aspose.Cells/Aspose.Cells.DLL.
LOG: Attempting download of new URL file://?/c:/inetpub/intranet/Aspose.Cells.EXE.
LOG: Attempting download of new URL file://?/c:/inetpub/intranet/Aspose.Cells/Aspose.Cells.EXE.
--- End of inner exception stack trace ---
at cgiTest.modCurrentBalance.GenerateReport()
at cgiTest.Module1.ProcessFunction() in q:\visual studio 2010\Projects\cgiTest\cgiTest\Module1.vb:line 65
at cgiTest.Module1.Main() in q:\visual studio 2010\Projects\cgiTest\cgiTest\Module1.vb:line 41