trouble deploying WCF service from VS2013 using msdeploy

Discussion in 'Site Programming, Development and Design' started by Joseph Bazalgette, Jul 7, 2014.

  1. Joseph Bazalgette

    Joseph Bazalgette King of the sewers...

    Last edited by a moderator: Oct 14, 2015
  2. Joseph Bazalgette

    Joseph Bazalgette King of the sewers...

    UPDATE: I am now able to publish. I have no idea why it has just 'started working' but it has published. I can not browse to it but I recall seeing a similar article that I will no look at again and see if it helps
     
  3. Joseph Bazalgette

    Joseph Bazalgette King of the sewers...

    UPDATE: this is the post I was referring to and I went thru it and tried the suggestions from your staff http://forum.Winhost.com/threads/the-resource-cannot-be-found.9621/ but unfortunately they did not work

    I cna browse the service locally in IIS but can not reach it where I have deployed it. I can see it has been deployerd using IIS remote manager and the dll are copied across fine as well as the .svc

    This is a really simple proof of concept.

    I appreciate you guys are a hosting company/ISP and not a programming support service and am not expecting you to solve my programming issues but I can not see why this should not atleast render as a service

    the web.config is as follows

    <?xml version="1.0"?>
    <configuration>

    <appSettings>
    <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
    </appSettings>
    <system.web>
    <compilation debug="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5"/>
    </system.web>
    <system.serviceModel>
    <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>
    </behaviors>
    <services>
    <service name="WcfService1.Service1">
    <endpoint address="" binding="webHttpBinding" contract="WcfService1.IService1" />
    </service>


    </services>
    <protocolMapping>
    <add binding="basicHttpsBinding" scheme="https" />
    </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>

    </configuration>
     
    Last edited by a moderator: Oct 14, 2015
  4. Joseph Bazalgette

    Joseph Bazalgette King of the sewers...

    FIDDLER REQUEST (my_domain substituted)
    GET http://[my_domain].com.au/services/Service1.svc HTTP/1.1
    Host: [my_domain].com.au
    User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: en-US,en;q=0.5
    Accept-Encoding: gzip, deflate
    Connection: keep-alive



    FIDDLER RESPONSE
    HTTP/1.1 500 Internal Server Error
    Content-Type: text/html
    Server: Microsoft-IIS/7.0
    Date: Mon, 07 Jul 2014 13:08:36 GMT
    Connection: close
    Content-Length: 75

    The page cannot be displayed because an internal server error has occurred.
     
  5. Joseph Bazalgette

    Joseph Bazalgette King of the sewers...

    alright got it working....


    stripped the config down to minimum

    <configuration>
    <system.serviceModel>
    <behaviors>
    <serviceBehaviors>
    <behavior name="returnFaults">
    <serviceDebug includeExceptionDetailInFaults="true"/>
    <serviceMetadata httpGetEnabled="true"/>
    </behavior>
    </serviceBehaviors>
    </behaviors>
    <services>
    <service name="WcfService1.Service1" behaviorConfiguration="returnFaults">
    <endpoint address="" binding="basicHttpBinding" contract="WcfService1.IService1" />
    </service>
    </services>
    <bindings>
    <basicHttpBinding>
    <binding name="HttpBinding" maxReceivedMessageSize="2097152">
    </binding>
    </basicHttpBinding>
    </bindings>
    </system.serviceModel>
    </configuration>


    hope this helps someone else :)
     
    Michael and Elshadriel like this.
  6. Thanks for following up!
     

Share This Page