在IIS7.5中,我在“启用协议”中将我的asp.net网站配置为"http,net.pipe“。
注意: net.pipe配置是为了调用网站内的另一个模块(SOA)。
通过简单的asp.net和net.pipe服务调用调用其他模块,一切都能正常工作。但是,当我尝试调用RIA service from silverlight 4时,我得到了以下错误
The provided URI scheme 'net.pipe' is invalid; expected 'http'.
Parameter name: context.ListenUriBaseAddress如何配置我的网站在http和net.pipe配置中工作?
发布于 2011-10-11 18:50:11
我用新的REST wcf API也遇到了同样的问题。在自定义服务主机工厂中,我必须过滤net.pipe,下面是代码
public class FilteredServiceHostFactory : HttpServiceHostFactory
{
private static readonly List<string> _allowedSchemes;
static FilteredServiceHostFactory()
{
_allowedSchemes = new List<string> {Uri.UriSchemeHttp, Uri.UriSchemeHttps};
}
protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)
{
baseAddresses = baseAddresses.Where(uri => _allowedSchemes.Contains(uri.Scheme)).ToArray();
return base.CreateServiceHost(serviceType, baseAddresses);
}
}https://stackoverflow.com/questions/4150977
复制相似问题