无法从另一个wcf服务iis 7中找到wcf服务

无法从另一个wcf服务iis 7中找到wcf服务,wcf,iis-7,Wcf,Iis 7,在实例化不同服务的行上,我从IIS 7得到一个编译错误 CS0246:找不到类型或命名空间名称“MyOtherService”。是否缺少using指令或程序集引用 是否需要在web.config文件中为该服务添加另一个程序集引用?这是我的网页配置: <?xml version="1.0"?> <configuration> <configSections> <sectionGroup name="applicationSettings" ty

在实例化不同服务的行上,我从IIS 7得到一个编译错误

CS0246:找不到类型或命名空间名称“MyOtherService”。是否缺少using指令或程序集引用

是否需要在web.config文件中为该服务添加另一个程序集引用?这是我的网页配置:

<?xml version="1.0"?>
<configuration>
  <configSections>
    <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
      <section name="MyService.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    </sectionGroup>
  </configSections>
  <system.web>
    <customErrors mode="Off"/>
    <compilation debug="true">
      <assemblies>
        <add assembly="Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342"/>
      </assemblies>
    </compilation>
  </system.web>
  <system.serviceModel>
    <bindings>
      <wsHttpBinding>
        <binding name="MyServiceBinding">
          <security mode="Message">
            <message clientCredentialType="Windows"/>
          </security>
        </binding>
      </wsHttpBinding>
    </bindings>
    <services>
      <service name="MyService">
        <endpoint binding="wsHttpBinding" behaviorConfiguration="webHttp" contract="MyService">
          <identity>
            <dns value="https://IPADDRESS:443"/>
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
      </service>
    </services>
    <behaviors>
      <endpointBehaviors>
        <behavior name="webHttp">
          <webHttp defaultOutgoingResponseFormat="Json" />
        </behavior>
      </endpointBehaviors>
      <serviceBehaviors>
        <behavior name="WCFWsHttpBindingHttps.MyServiceBehavior">
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="true"/>
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
 <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>

 <applicationSettings>
  <MyService.Properties.Settings>
   <setting name="MyService_MyOtherService_MyOtherService" serializeAs="String">
    <value>http://path-to-service/MyOtherService.svc</value>
   </setting>
  </MyService.Properties.Settings>
 </applicationSettings>
</configuration>

请检查以下元素:

<service name="MyService">
     <endpoint binding="wsHttpBinding" behaviorConfiguration="webHttp" contract="MyService">
       <identity>
         <dns value="https://IPADDRESS:443"/>
       </identity>
     </endpoint>
     <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
 </service> 
服务元素中的name属性应该是完全限定的。例如:namespace.MyService是需要显示的值

对于端点元素中的contract属性也是一样的,它应该是完全限定的。
例:namespace.IMyService

这与此无关。我拥有所有这些。我甚至使用服务的完全限定名称。我的项目中有网络参考。我在Oracle.DataAccess中遇到了同样的错误,通过在//