开发者

ServiceHostFactory is not being invoked

开发者 https://www.devze.com 2023-02-19 03:24 出处:网络
I got a ASP.Net hosted service host: <%@ ServiceHost Language=\"C#\" Debug=\"true\" Service=\"LongTermStorage.WebService.LongTermStorageService\"

I got a ASP.Net hosted service host:

<%@ ServiceHost Language="C#" Debug="true" 
    Service="LongTermStorage.WebService.LongTermStorageService" 
    Factory="LongTermStorage.WebService.SteelServiceHostFactory"
    CodeBehind="LongTermStorageService.svc.cs" %>

SteelServiceHostFactory is not being invoked and I do not get any errors.

Factory:

public class SteelServiceHostFactory : ServiceHostFactory
{
    protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)
    {
        return new SteelServiceHost(SteelWcfAppli开发者_C百科cation.InstanceProvider, serviceType, baseAddresses);
    }
}


It works if I switch from Cassini (development web server) to IIS.

0

精彩评论

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