open WCF svc file error in IIS
I am using VS2010 + C# + .Net 4.0 + IIS 7.5 + Windows 7. When I open a WCF svc f开发者_StackOverflowile in IIS 7.0, there is some error like this, any ideas what is wrong?
System.BadImageFormatException: Could not load file or assembly 'foo.test' or one of its dependencies.
Probably the application pool is configured to target CLR 2.0. You need to change it to target .NET 4.0:
Also make sure .NET 4.0 is registered by running:
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i
精彩评论