我对Web开发稍微陌生,所以我不确定在这里使用的术语。我有一个我为windows azure构建的wcf web服务。我想有多个解决相同服务的端点,但是我不完全确定如何配置它。WCF URL问题
这可能有助于解释什么,我想要一个好一点:
目前,我在https://myapp.cloudapp.net/service.svc
一个服务,我想有以下网址指向的应用程序相同的服务:
https://myapp.cloudapp.net/myapp/service.svc
我敢肯定这是一件容易的事,我只是一直没能找到解决的办法呢。
编辑:
我发现这个MSDN文档:
http://msdn.microsoft.com/en-us/library/ms734786.aspx
不过,我似乎无法得到它的工作。
这里是我的终点是如何在我的web.config中定义:
<services>
<service behaviorConfiguration="MetadataEnabled" name="myProject.myApp.myService">
<host>
<baseAddresses>
<add baseAddress="https://localhost/myService/" />
</baseAddresses>
</host>
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="wsBinding" name="wsBase" contract="myProj.myApp.IServ" />
<endpoint address="mex" binding="mexHttpsBinding" bindingConfiguration="mexBinding" name="HttpMetadata" contract="IMetadataExchange" />
<endpoint address="myApp/" binding="wsHttpBinding" bindingConfiguration="wsBinding" name="WsPlain" contract="myProj.myApp.IServ" />
</service>
</services>
它仍然没有工作,但希望它越来越接近。会喜欢任何建议!
感谢您的链接。我看了几个样本,但没有一个似乎解决了我想要做的。 – Brosto 2010-12-08 20:57:57