MVC app works in Visual Studio but not IIS7

Working on an ASP.NET MVC project and I'm having some difficulty deploying to a shared dev server.

Locally, when debugging using Visual Studio 2008 local server, everything works peachy. However, after deploying, I get the following error:

    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 

      

In the error log:

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: 

      

After finding a deployment error, I tried to add the application locally and it seems to lead to the same application.

On my local dev machine I am using Windows 7 RTM (x64) and on the shared server I am using Windows Server 2008 Standard (x86).

Turns around and my FIPS encryption in local security policy is off, so I'm a bit lost.

+2


source to share


2 answers


I have had some problems in the past with x64 development and x86 deployment. Under the target platform, are you compiling "Any processor", x86 or x64?



Try compiling directly to x86 and see if that helps.

+2


source


Are you using Bcrypt.net from here ? If so, you need to build it with a different dll name (so for example build it as BCryptNet.dll)



The problem is that there is a new windows API in Vista / Windows 2008 that tries to load bcrypt.dll and if you have bcrypt.dll in your / bin / web application directory it cannot find the system DLL.

+2


source







All Articles