Thursday, April 17, 2014

Error when running web applications that reference SharePoint dlls in IIS Express

Hi All,

I was developing a web application that reference SharePoint 2013 dlls, and since SharePoint server dlls in general runs on a 64 bit environment, i want to use IIS express in Visual Studio 2013 without the need to use full local IIS that runs on 64 bit.

I was getting this error message when i am running my web application:

Could not load file or assembly or one of its dependencies. 

and i was seeing in the yellow error page that the VS 2013 is using IIS express under c:\ program files (86)\ IIS Express folder which is the 32 bit.


I want to switch IIS express to 64 bit so i will be able to run my web application that references 64 bit SharePoint dlls. here is the solution for this:

From Visual Studio 2013 IDE:

Click on :  Tools --> Options --> Projects and Solutions --> Web Projects  --> Use the 64 bit version of IIS Express --> check this checkbox and save.


Once you save, make sure you exit any instance of the IIS express and try to re-run your project! It will run with no issues!

Enjoy!


Post a Comment