locked
WCF Error RRS feed

  • Question

  • Hi All,

    I have created a service and hosted in IIS and i tried to browse it am getting the following error

    My web.config is below

    <?xml version="1.0"?>
    <configuration>
      <connectionStrings>
        <add name="XrmConnection" connectionString="Url=http://ddd/TRESSAAEW434;"/>
      </connectionStrings>

      <appSettings>
        <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
      </appSettings>
      <system.web>
        <compilation debug="true" targetFramework="4.5.2" />
        <httpRuntime targetFramework="4.5.2"/>
      </system.web>
      <system.serviceModel>
        <services>
          <service name="CrmWcfService.CrmService">
            <endpoint address="" binding ="webHttpBinding" contract="CrmWcfService.ICrmService" behaviorConfiguration="CustomBehaviour"/>
          </service>
        </services>
        <behaviors>
          <serviceBehaviors>
            <behavior>
              <!-- To avoid disclosing metadata information, set the values below to false before deployment -->
              <serviceMetadata httpGetEnabled="true" httpsGetEnabled="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="true"/>
            </behavior>
          </serviceBehaviors>
          <endpointBehaviors>
            <behavior name="CustomBehaviour">
              <webHttp/>
            </behavior>
          </endpointBehaviors>
        </behaviors>
        <protocolMapping>
          <!--<add binding="wsHttpBinding" scheme="http" />-->
          <add binding="basicHttpBinding" scheme="http" />
        </protocolMapping>
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
      </system.serviceModel>
      <system.webServer>
        <modules runAllManagedModulesForAllRequests="true"/>
        <!--
            To browse web app root directory during debugging, set the value below to true.
            Set to false before deployment to avoid disclosing web app folder information.
          -->
        <directoryBrowse enabled="true"/>
      </system.webServer>

      <system.diagnostics>
        <trace autoflush="true" />
        <sources>
          <source name="System.ServiceModel"
                  switchValue="Critical, Error"
                  propagateActivity="true">
            <listeners>
              <add name="sdt"
                  type="System.Diagnostics.XmlWriterTraceListener"
                  initializeData= "C:\\POC\\CrmWcfService\\CrmWcfService\\bin\\SdrConfigExample.e2e" />
            </listeners>
          </source>
        </sources>
      </system.diagnostics>


    </configuration>

    Thursday, April 23, 2015 11:48 AM

All replies

  • The error is because ASP .Net cannot find the class CrmWcfService.ICrmService within your code. How is it deployed - is it an IIS application or not ? Is the code built into one or more assemblies, or have you deployed the .cs code to compile on demand ?

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Thursday, April 23, 2015 12:09 PM
    Moderator