.net – iis express .svc cannot access the file. It gives a file not found error


In the .net project, I get the svc file not found error on localhost. I made IIS settings. http activation vs. I also reviewed my web.config file but nothing worked.

I need to solve this problem myself, because I am making a request to the service from another computer.

     <handlers>
          <add name="svc-integrated" path="*.svc" verb="*" type="System.ServiceModel.Activation.HttpHandler" resourceType="File" preCondition="integratedMode" />
     
        </handlers>
  <system.serviceModel>
    <services>
      <service name="Clinic_Admin.Areas.Mobil.Service.ClinicService">
        <endpoint address="" binding="webHttpBinding" bindingConfiguration="webBinding" name="ClinicRestSoap" contract="Clinic_Admin.Areas.Mobil.Service.IClinicService" />
          
       
      </service>

      <!--<service name="Clinic_Admin.Areas.Mobil.Service.ClinicService" behaviorConfiguration="ServiceBehavior">
        <endpoint  binding="wsHttpBinding" bindingConfiguration="TransportSecurity" name="ClinicRestSoap" contract="Clinic_Admin.Areas.Mobil.Service.IClinicService" />


      </service>-->
      
    </services>
    <behaviors>
      <endpointBehaviors>
        <behavior name="TestServiceAspNetAjaxBehavior">
          <enableWebScript />
        </behavior>
      </endpointBehaviors>
      <serviceBehaviors>

       
        <behavior name="ServiceBehavior">
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
          <serviceThrottling maxConcurrentCalls="200" maxConcurrentSessions="100" maxConcurrentInstances="100" />
          <dataContractSerializer maxItemsInObjectGraph="2147483646" />
        </behavior>
        
        <!--<behavior name="EntryServiceBehavior">
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
          <useRequestHeadersForMetadataAddress>
            <defaultPorts>
              <add scheme="http" port="80" />
              <add scheme="https" port="443" />
            </defaultPorts>
          </useRequestHeadersForMetadataAddress>
         
        </behavior>-->


        <behavior name="">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true" />
    <bindings>

      <wsHttpBinding>
        <binding name="TransportSecurity">
      
          <security mode="None" />
        </binding>
      </wsHttpBinding>

      <!--<wsHttpBinding>
        <binding name="TransportSecurity">
          <security mode="Transport">
            <transport clientCredentialType="None" proxyCredentialType="None"
              realm="" />
            <message clientCredentialType="Certificate" algorithmSuite="Default" />
          </security>
        </binding>
      </wsHttpBinding>-->

      <webHttpBinding>
        <binding name="webBinding" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" transferMode="Streamed">

          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
          <security mode="Transport"></security>

        </binding>
      </webHttpBinding>

      <!--<webHttpBinding>
        <binding name="webHttp" />
      </webHttpBinding>-->
    </bindings>
  </system.serviceModel>

Select features on IIS with WCF:

enter image description here
enter image description here

Leave a Reply

Your email address will not be published. Required fields are marked *