开发者

aspNetCompatibilityEnabled for just one service

开发者 https://www.devze.com 2023-03-03 23:55 出处:网络
I have an asp.net web site.I only want to use asp.net compatibility mode for one of the wcf services.

I have an asp.net web site. I only want to use asp.net compatibility mode for one of the wcf services.

However when I do this I end up getting an error message for all of the services because it tries to use it for every one of them.

How can I selectively use aspNetCompatibilityEnabled for wcf.

I am doing this b开发者_Python百科ecause of performance issues.


Unfortunately, that's not possible. ServiceHostingEnvironment.AspNetCompatibilityEnabled is a static member, hence it always applies to all services within one AppDomain.

If you definitely don't want AspNetCompatibility enabled for some services they have to be hosted in a different (IIS) app. Could still be within the same site, though! Would that work for your scenario?

0

精彩评论

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