托管在IIS地址下的wcf服务
我有一个托管在IIS下的WCF服务。 我有以下配置:托管在IIS地址下的wcf服务,wcf,iis-7,Wcf,Iis 7,我有一个托管在IIS下的WCF服务。 我有以下配置: <services> <service name="BillboardServices.LoginService" behaviorConfiguration="LoginServiceBehavior"> <host> <baseAddresses> <add baseAddress="http://myip/Log
<services>
<service name="BillboardServices.LoginService" behaviorConfiguration="LoginServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="http://myip/LoginService/" />
</baseAddresses>
</host>
<endpoint address="" name="LoginService" binding="basicHttpBinding" contract="BillboardServices.ILoginService" />
<endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
</service>
,我有一个404。
如果输入,则获取服务元数据
为了通过nice url访问服务,我需要对配置进行哪些更改
谢谢。为了获得无扩展服务,您需要在global.asax文件中使用WCF 4并初始化路由引擎,如下所示:
void Application_Start(object sender, EventArgs e)
{
RegisterRoutes();
}
private void RegisterRoutes()
{
// Edit the base address of Service1 by replacing the "Service1" string below
RouteTable.Routes.Add(new ServiceRoute("Service1", new WebServiceHostFactory(), typeof(Service1)));
}
您确定省略服务部分是明智的还是有用的?我只能看到版本控制和升级的问题。@Henk-这不是WCF服务的常见做法吗?