C# 我的WCF服务的引用名称-Customers.svc或CustomersWcfDS.svc?

C# 我的WCF服务的引用名称-Customers.svc或CustomersWcfDS.svc?,c#,asp.net,visual-studio-2010,wcf,C#,Asp.net,Visual Studio 2010,Wcf,我有以下Visual Studio Web应用程序结构: CustomerManagement\ - Services - Customers.aspx - Customers.aspx.cs - CustomersWcfDS.svc - Default.aspx - web.config 以下代码位于web.config文件的中: <system.serviceModel> <bindings> <basicHttpB

我有以下Visual Studio Web应用程序结构:

CustomerManagement\
  - Services
    - Customers.aspx
      - Customers.aspx.cs
    - CustomersWcfDS.svc
  - Default.aspx
  - web.config
以下代码位于web.config文件的
中:

<system.serviceModel>
<bindings>
  <basicHttpBinding>
    <binding name="BasicHttpBinding_ICustomers" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
      <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
      <security mode="None">
        <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
        <message clientCredentialType="UserName" algorithmSuite="Default" />
      </security>
    </binding>
  </basicHttpBinding>
</bindings>
<client>
  <endpoint address="http://localhost:1112/Services/Customers.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ICustomers" contract="CustomersService.ICustomers" name="BasicHttpBinding_ICustomers" />
</client>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
</system.serviceModel>
我还尝试了以下方法:

http://localhost:1112/Services/CustomersWcfDS.svc
而且

http://localhost:1110/Services/Customers.svc

(测试端口1110是因为项目属性
端口号
设置为
1110

但它仍然无法显示类似下图的内容


那么,有没有专家能告诉我我的WCF服务URL去了哪里?

嗨,根据你的图片

我认为您已将服务名称重命名为Customers.svc。但它仍然是指前一个。您可以做的是尝试在整个解决方案中找到“SimpleService.svc”
并将其重命名为Customers.svc。如果您有任何问题,请将其作为评论。

奇怪,我发现正确的URL是。我可以知道它为什么在那里吗?我应该将
添加到这个URL吗?正如我已经告诉过你的,你已经尝试重命名一些接口/类,这就是为什么它在那里。尝试重命名它,否则共享项目将试图帮助您。它似乎不起作用,我在这里提出了一个新问题-为什么不共享代码..很难识别错误!
http://localhost:1110/Services/Customers.svc
http://localhost:1110/Services/CustomersWcfDS.svc