我正在寻找在开发过程中托管wcf服务。
使用IIS是最好的还是我可以使用Visual Studio附带的默认BUILT IN Web服务器?
我可以将Assign自动端口更改为特定端口,因此在我的客户端中我总是有一个固定的地址。
我希望有人可以提出最好的方法吗?
答案 0 :(得分:2)
在开发期间托管WCF服务的最方便方法是使用Visual Studio内置的WCF Service Host。
您可以在WCF configuration settings:
中控制服务使用的通信协议和端口<services>
<service name="MyNamespace.MyService">
<endpoint
address="http://localhost:8080/myservice"
binding="basicHttpBinding"
contract="MyNamespace.MyContract" />
</service>
</services>
但是,如果您需要在ASP.NET管道中运行服务,我将使用ASP.NET Development Server(以前称为Cassini)。