开发者

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:

open WCF svc file error in IIS

Also make sure .NET 4.0 is registered by running:

%WINDIR%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜