Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: IIS7 C# WCF WinForm
Hi,
I want to install WCF on remote host and connect my desktop application to it. I install the WCF but when I try to access the service via browser it says that:
Metadata publishing for this service is currently disabled.
Also I couldn't add service reference to my desktop application.
The HTML document does not contain Web service discovery information.
Metadata contains a reference that cannot be resolved: 'http://xxx.xxx.xxx.xxx./test/test.svc'.
Content Type application/soap+xml; charset=utf-8 was not supported by service http://xxx.xxx.xxx.xxx/test/test.svc.  The client and service bindings may be mismatched.
The remote server returned an error: (415) Cannot process the message because the content type 'application/soap+xml; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'..
If the service is defined in the current solution, try building the solution and adding the service reference again.
 
Test.cs
 
namespace TestExample
{
    public class Test: ITest
    {
        ...
    }
}
 
Test.svc:
<%@ ServiceHost Language="C#" Service="TestExample.Test" %>
 
App.config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.web>
    <compilation debug="true" />
  </system.web>
  <system.serviceModel>
    <services>
      <service name="TestExample.Test">
        <endpoint address="" binding="wsHttpBinding" contract="TestExample.ITest" />
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="http://xxx.xxx.xxx.xxx/test/test.svc" />
          </baseAddresses>
        </host>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <serviceMetadata httpGetEnabled="True"/>
          <serviceDebug includeExceptionDetailInFaults="False" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
</configuration>
 
What I miss? Any suggestions?
 
Thank you in advance!
 
Best regards,
Blagovest Razhenkov
Posted 21-Jan-12 3:57am
Edited 17-Aug-12 2:14am
v5
Comments
Abey Thomas at 21-Jan-12 22:19pm
   
How did you host the WCF service? In the IIS or simply as a command line app or as a windows service?
I suggest you try to access your WCF service using the "wcftestclient" from your desktop.
OPen Visual Studio command prompt (in admin mode) and type "wcftestclient". A client application will open up. See if your WCF service can be accessed through this.
Wael Al Wirr at 23-Jan-12 2:17am
   
Please can you post the client configuration file content.
darshan_ur at 12-Jul-12 9:39am
   
on which Server Machine (Operating System/IIS) are you trying to publish the WCF service ?
Kenneth Haugland at 22-Jul-12 11:59am
   
I think your problem is that It cant find the SVC you have on your web page. I solved it by makeing the directory visible from outside, and it worked...
 
[Edit]I could run it easily on my computer in debug, but as soon as I published the page with WCF It wouldnt work...[/Edit]

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 901
1 OriginalGriff 445
2 CPallini 255
3 Richard Deeming 175
4 George Jonsson 161
0 OriginalGriff 5,540
1 Sergey Alexandrovich Kryukov 4,668
2 CPallini 4,540
3 George Jonsson 3,102
4 Gihan Liyanage 2,445


Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 17 Aug 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100