部署到生产环境后,我只收到 404 - 找不到文件。
该服务需要配置为虚拟目录 ( /v1 )。它有自己的应用程序池。
我根据在 IIS 6 中托管 .net 4.0 REST WCF 服务添加了通配符并删除了 Windows 集成安全性
它仍然不起作用...
这是我的 web.config 的 ServiceModel 部分:
<system.serviceModel>
<extensions>
<behaviorExtensions>
<add name="restHttpBehavior" type="--hidden for security purposes--, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null"/>
</behaviorExtensions>
</extensions>
<services>
<service name="--hidden for security purposes--" behaviorConfiguration="MetadataBehavior">
<host>
<baseAddresses>
<add baseAddress="http://localhost/v1/api.svc"/>
</baseAddresses>
</host>
<endpoint behaviorConfiguration="WebBehavior" binding="webHttpBinding" bindingConfiguration="restNoSSL" contract="--hidden for security purposes--"/>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="WebBehavior">
<restHttpBehavior/>
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="MetadataBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<webHttpBinding>
<binding name="restNoSSL">
</binding>
</webHttpBinding>
</bindings>
</system.serviceModel>
请帮忙!!