0

Does any of you perhaps know if it is possible to host a wcf-service in a windows service, without IIS installed, AND anonymous authentication?

I keep getting a 403 (forbidden), because 'anonymous' is not allowed.

Local in VS everythings works, but when I run it in 2 different servers (host andclient) then I get the error. Both servers are not in the same domain.

Thanks!

code on server side:

<system.serviceModel>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true">
    </serviceHostingEnvironment>
    <bindings>
      <wsHttpBinding>
        <binding name="Unsecured">
          <security mode="None" />
        </binding>
      </wsHttpBinding>
    </bindings>
    <services>
      <service name="WcfServiceRoelant.ServiceRoelant" behaviorConfiguration="ServiceRoelantBehavior">
        <endpoint address="" binding="wsHttpBinding" contract="WcfServiceRoelant.IServiceRoelant" bindingConfiguration="Unsecured"/>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="ServiceRoelantBehavior">
          <!-- 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="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
Roelant
  • 65
  • 2
  • 8
  • What does your binding configuration look like at the server side? – tomasr Oct 08 '15 at 19:18
  • @tomasr; I've added the config. However, it's nice of you that you want to look into it. But if you can say it's possible then I have some google-ing to do ;) Unless you can provide the answer :) Thnx! – Roelant Oct 09 '15 at 07:26
  • Try to add and . I see that you use wsHttp rather basicHttp binding. Maybe this is your way https://msdn.microsoft.com/en-us/library/ms729789.aspx ? – Mimas Oct 09 '15 at 12:57
  • It looks like a network-related issue.. Thnx for helping @tomasr! – Roelant Oct 12 '15 at 06:51
  • @tomasr: the hostingparty says that they opened port 8888 for http. However, i still can't connect. And I switched to basicHttp (trying everything)... Any other ideas? – Roelant Oct 14 '15 at 13:37
  • Can you share the exact errors you have? Could it be that there's a proxy requiring authentication between the client and the service? – tomasr Oct 14 '15 at 14:48
  • and yet again another network-related issue! Thanks for your help @tomasr! – Roelant Oct 19 '15 at 09:53

0 Answers0