在ASP.NET MVC项目上工作,我在部署到共享开发服务器时遇到了一些困难。
在本地,使用本地Visual Studio 2008服务器进行调试时,一切都很有效。但是,部署后,我收到以下错误:
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.## Heading ##
Parser Error Message: Unable to find an entry point named 'BCryptGetFipsAlgorithmMode' in DLL 'bcrypt.dll'.
Source Error:
Line 1: <%@ Application Codebehind="Global.asax.cs" Inherits="APPLICATION_NAME.Web.MvcApplication" Language="C#" %>
Source File: /APPLICATION_NAME/global.asax Line: 1
Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927
在错误日志中:
Event sequence: 1
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1/ROOT/APPLICATION_NAME-4-128995312096183595
Trust level: Full
Application Virtual Path: /APPLICATION_NAME
Application Path: E:\PROJECTS\APPLICATION\APPLICATION_NAME\APPLICATION_NAME\app\APPLICATION_NAME.Web\
Machine name: PC
Process information:
Process ID: 4608
Process name: w3wp.exe
Account name: IIS APPPOOL\DefaultAppPool
Exception information:
Exception type: HttpException
Exception message: Unable to find an entry point named 'BCryptGetFipsAlgorithmMode' in DLL 'bcrypt.dll'.
Request information:
Request URL: http://localhost/APPLICATION_NAME
Request path: /APPLICATION_NAME
User host address: ::1
User:
Is authenticated: False
Authentication Type:
Thread account name: IIS APPPOOL\DefaultAppPool
Thread information:
Thread ID: 6
Thread account name: IIS APPPOOL\DefaultAppPool
Is impersonating: False
Stack trace: at System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()
at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()
at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters)
Custom event details:
找到部署错误后,我尝试在本地添加一个应用程序,这似乎导致了同一个应用程序。
在我的本地开发机器上,我使用的是Windows 7 RTM(x64),而在共享服务器上,我运行的是Windows Server 2008 Standard(x86)。
戳了一下,我的本地安全策略中的FIPS加密被禁用了,所以我有点不知所措。
答案 0 :(得分:2)
过去在x64上开发并部署到x86环境时,我遇到了一些问题。在平台目标下,你编译为“任何CPU”,x86或x64?
尝试直接编译到x86,看看是否有帮助。
答案 1 :(得分:2)
您使用here的Bcrypt.net吗?如果是这样,你需要使用不同的dll名称构建它(例如将其构建为BCryptNet.dll)
问题是Vista / Windows 2008中有一个新的Windows API试图加载bcrypt.dll,如果你的web app bin /目录中有bcrypt.dll,它就找不到系统dll。 / p>