MrLoadx
MrLoadx

Reputation: 21

IIS - system.badimageformatexception could not load file or assembly

I have MVC application. I need whatever it was in the x64. I have local iis with x64 OS. When I publish the project in Visual Studio I choose x64 configuration. When i set the value of “Enable 32-bit Applications” to False in IIS AppPool settings everything works well, but when i set the value of “Enable 32-bit Applications” to True i get an error. How can I publish x64 project to IIS server with “Enable 32-bit Applications” = True?

I still have a problem. I can not even run a standard initial application. here's a screencast (sorry that the IIS have russian interface): http://www.screencast.com/t/Kf0mpM9uFa

what am I doing wrong?

And sorry for my English. Bears, vodka, balalaika.

Thanks in Advance.

Upvotes: 1

Views: 3471

Answers (2)

HoseiniPeyrov
HoseiniPeyrov

Reputation: 41

It’s because you are trying to run 32 bit dlls on a 64 bit system. Fix it in IIS manager by changing the advanced settings on you application pool to enable 32 bit applications. Or create a new app pool specifically for them. original artcle

Upvotes: 3

Vijunav Vastivch
Vijunav Vastivch

Reputation: 4211

I got a simulation:

1. Project platform target x64 => Working in IIS.
2. IIS > enable 32bit application = > Working also.

My Idea is:

Kindly check framework of your application pool.

Upvotes: 0

Related Questions