WCF

Windows Communication Foundation (WCF) is a tool used to implement and deploy a service-oriented architecture (SOA) to support distributed computing where services have remote consumers. It features a runtime and a set of APIs in the .NET Framework for building connected, service-oriented applications. Services typically have a WSDL interface (Web Services Description Language) that any WCF client can use to consume the service, regardless of which platform the service is hosted on. WCF implements many advanced Web services (WS) standards such as WS-Addressing, WS-ReliableMessaging, WS-Security, RSS Syndication Services, WS-Discovery, routing and better support for REST services.

Share tech news, updates, or what's on your mind.

Sign up to Post

I am part of a development for a SOAP web services client on WCF/.NET. After a session of sending request, team for server side left feedback "extend someAction from schema i am mentioning below", and mentioned an URL. In this context, what does it mean to extend from schema?
0
Free Tool: Path Explorer
LVL 9
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Dear ,

I have a web service that opens normally under https after adjusting below in web.config of my WCF
  <system.serviceModel>
    <services>
      <service behaviorConfiguration="ServiceBehavior" name="Soc_MobileWebServices.MobileService">
        <endpoint address=""  
                  binding="basicHttpBinding"  
                  bindingConfiguration="secureHttpBinding"  
                  contract="Soc_MobileWebServices.IMobileservice"/>  

        <endpoint address="mex"  
                  binding="mexHttpsBinding"  
                  contract="IMetadataExchange" />  
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="ServiceBehavior">
          <dataContractSerializer maxItemsInObjectGraph="2147483647" />
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata 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="ServiceEndpointBehavior">
          <webHttp />
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <bindings>
      …
0
Dears.,

Referring to some links, I could fix by changing in web config of my WCF to open WCF using https from IIS manager but in my application upon running it gives below error message when calling a method from WCF web services: The provided URI scheme ‘https’ is invalid; expected ‘http’.Parameter name: via

Any hint?
Regards

Besides , in order to let my WCF open normally, we recommend to adjust in web.config mainly in 3 parts below:
Part 1
  <system.serviceModel>
    <services>
      <service behaviorConfiguration="ServiceBehavior" name="Soc_MobileWebServices.MobileService">
        <endpoint address=""  
                  binding="basicHttpBinding"  
                  bindingConfiguration="secureHttpBinding"  
                  contract="Soc_MobileWebServices.IMobileservice"/>  

        <endpoint address="mex"  
                  binding="mexHttpsBinding"  
                  contract="IMetadataExchange" />  
      </service>
    </services>
Part 2
          <serviceMetadata httpsGetEnabled="true"/>

Part 3
    <bindings>
      <webHttpBinding>
        <binding name="" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647" maxBufferSize="2147483647">
          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
        </binding>
      </webHttpBinding>
      <basicHttpBinding>  
        <binding …
0
Dears.,

Referring to some links, I could fix by changing in web config of my WCF to open WCF using https from IIS manager but in my application upon running it gives below error message when calling a method from WCF web services: The provided URI scheme ‘https’ is invalid; expected ‘http’.Parameter name: via

Any hint?
Regards

Besides , in order to let my WCF open normally, we recommend to adjust in web.config mainly in 3 parts below:
Part 1
  <system.serviceModel>
    <services>
      <service behaviorConfiguration="ServiceBehavior" name="Soc_MobileWebServices.MobileService">
        <endpoint address=""  
                  binding="basicHttpBinding"  
                  bindingConfiguration="secureHttpBinding"  
                  contract="Soc_MobileWebServices.IMobileservice"/>  

        <endpoint address="mex"  
                  binding="mexHttpsBinding"  
                  contract="IMetadataExchange" />  
      </service>
    </services>
Part 2
          <serviceMetadata httpsGetEnabled="true"/>

Part 3
    <bindings>
      <webHttpBinding>
        <binding name="" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647" maxBufferSize="2147483647">
          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
        </binding>
      </webHttpBinding>
      <basicHttpBinding>  
        <binding …
0
I dont want to re-invent the wheel and build a new WCF or Rest webservice. Please advise, how can I find out if the service I need has already been created by someone? I would love to be able to re-use that WCF/Rest service.

Example: I need a service that would convert currencies.

Thanks,
Ricky
0
All

We have a requirement where we need to build a WCF service which can make outbound calls (as client) to backend services which requires 2-way SSL (mutual-authentication).

We have been trying this with no luck. It works with 1-way SSL (WCF as client), but when we set the backend services to require 2-way SSL, the handshake failed at the point where WCF is supposed to send its certificate to the backend service, but it doesn't.

Any one has experience doing this? Any clues of what the problem could be will be much appreciated.

Best Regards
Charles
0
Hello sir , i'm using WCF services in both web application and android . Now i want to implement encryption and decryption of various id's  so if i apply the encryption and decryption then on the web end i can easily manage the code but for android developer this is very hectic problem therefore suggest me how can i manage the code.
0
public void PostImagesToServer(Stream Images)
        {
         
            try
            {
                Guid Unique = System.Guid.NewGuid();
                string U = Unique.ToString();
                string Name = U + ".jpg";
                FtpWebRequest req = (FtpWebRequest)WebRequest.Create("ftp://NikhelPrans117@182.50.151.43/webservice/ChachaChaudaryImages/ComicImages/" + Name);
                req.Credentials = new NetworkCredential("NikhelPrans117", "Nilesh@2188");
                req.KeepAlive = true;
                req.UseBinary = true;
                req.Method = WebRequestMethods.Ftp.UploadFile;
                byte[] fileData = StreamToByte(Images);
                req.ContentLength = fileData.Length;
                Stream reqStream = req.GetRequestStream();
               
                reqStream.Write(fileData, 0, fileData.Length);
               
                reqStream.Close();
}
0
Trying to consume webservice using wcf client, getting following error

The content type multipart/related; boundary=MIMEBoundaryurn_uuid_B50EC784A204DC07C91495512014914; type="text/xml"; start="<0.urn:uuid:B50EC784A204DC07C91495512014915@apache.org>"; charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the  . The first 1024 bytes of the response were ...

Fiddler is showing the complete response but wcf is not able to deserialize the complete response. Response contains Japanese characters.
0
C# code is unable to parse the response from webservice, the information is in Japanese language.

Any help would be good.
0
On Demand Webinar: Networking for the Cloud Era
LVL 9
On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

This app.config is resided in my c# class library. and I have class library called service.cs


I also have web application in c# and try to called service.cs (of course I added reference inside of the web app)
and I have alert about "Could not find default endpoint element that references contract"

so I create another web application project and add web reference directly and the webconfig is exactly the same. there is no error and I can call as usual.
What did I do wrong?

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <system.serviceModel>
        <bindings>
            <basicHttpBinding>
              <binding name="BasicHttpBinding_IQuotingService" allowCookies="true" maxBufferSize="20000000" maxReceivedMessageSize="20000000">
                <readerQuotas maxDepth="32" maxStringContentLength="200000000" maxArrayLength="200000000"/>
                <security mode="Transport"/>
              </binding>
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="abc.svc" 
                      binding="basicHttpBinding" 
                      bindingConfiguration="BasicHttpBinding_IQuotingService" 
                      contract="NGICService.IQuotingService" 
                      name="BasicHttpBinding_IQuotingService"
                      />
        </client>
    </system.serviceModel>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1"/></startup></configuration>

Open in new window

0
Hi All,

I have compile error below.


using System;
using System.Collections.Generic;
 
using System.Data.Entity.Infrastructure;
using System.Linq;
using System.Net;
using System.Web.Http;
 
using System.Web.OData;

Error      8      'System.Web.OData.Delta<ERVJGMERPDATASERVICE.TMCARCOLOR>' does not contain a definition for 'GetEntity' and no extension method 'GetEntity' accepting a first argument of type 'System.Web.OData.Delta<ERVJGMERPDATASERVICE.TMCARCOLOR>' could be found (are you missing a using directive or an assembly reference?)       

What component is missing ?

Thank you.
0
Dear,
Can someone let me know what to do to let our application developed in VS2015 using http as wen application and wcf services
There is any walk through to follow it

Thank you,
0
Example for WinRM  API using SOAP
0
We have the WCF service .SVC. There are multiple Operation contract in that.
When we hit the WSDL of web service, all methods get exposed.

Requirement : We want to expose selected methods client wise.

How can we do that.
0
Hello,

Can I use a published wcf from a  web services in order to do not duplicate a developed method
however, I could consume a WCF from windows project or  asp.net project
0
Hello Expert Team,

I am trying to develop a method in WCF service to dump data in an SQL tables
I asked the user to give us a json string with a specific format
if I test it for a small json , the method works correctly
but I tried to test for a long string it gives 'HTTP Error 414. The request URL is too long.'
 <WebGet> _
    Function GetHello(UserParam As String) As String
-----------------------
    Public Function GetHello(Json_Parameter As String) As String Implements IMobileservice.GetHello
        Dim ParameterInfoLength As String = ""

        Try
            ParameterInfoLength = Json_Parameter
        Catch ex As Exception
            ParameterInfoLength = ""
        End Try
        ParameterInfoLength = "This is the result of " & ParameterInfoLength
        Return ParameterInfoLength
    End Function

Do we have a solution?
Besides, I develop same method using a web services, it gives a window unresponsive to wait/kill, after a wait time ,  I get an answer, the method displays the string
 <WebMethod()> _
    Public Function GetHello(Json_Parameter As String) As String
        Dim ParameterInfoLength As String = ""

        Try
            ParameterInfoLength = Json_Parameter
        Catch ex As Exception
            ParameterInfoLength = ""
        End Try
        ParameterInfoLength = "This is the result of " & ParameterInfoLength
        Return ParameterInfoLength
    End Function

What do you suggest?
What is the best and …
0
We have an MVC application that consumes a third party WCF service.
We are calling a method in that service that takes base64encoded byte array as one of the parameters among other parameters.
We also have to specify the Username and Password in the ClientCredentials before calling the method

Below are the web. config settings
<system.serviceModel>
            <bindings>
                  <wsHttpBinding>
                        <binding name="WSHttpBinding_ISampleOrderSubmit">
                              <security mode="TransportWithMessageCredential">
                                    <transport clientCredentialType="None" />
                                    <message clientCredentialType="UserName" />
                              </security>
                        </binding>
                  </wsHttpBinding>
            </bindings>
            <client>
                  <endpoint address="https://abc.test.sample.com/SampleOrderSubmit.svc/SampleOrderSubmit.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_ISampleOrderSubmit" contract="SampleOrder.ISampleOrderSubmit" name="WSHttpBinding_ISampleOrderSubmit" />
            </client>
      </system.serviceModel>

Most of the time everything works fine.
But on certain occasions we get the following error:


System.ServiceModel.Security.MessageSecurityException: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail. ---> System.ServiceModel.FaultException: An error occurred when verifying security for the message.


This is the only error that gets captured at our end and since majority of the times it works fine, we …
0
Hi,
I need to create a web service in vs 2015. This web service will connect to active directory and get all different kinds of information.
I need to call the same web service from asp.net application, asp.net mvc and classic asp applications. What kind of service is preferred WCF or Ajax enabled WCF? Which is more clean and more secure??  This service is going to host in cloud environment.

Which wcf service is more commonly used in this kind of situation?

thanks
0
Want to be a Web Developer? Get Certified Today!
LVL 9
Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Hi All,

I use InstallUtil to create WCF windows service.
Here is the code of installing :

Installing assembly 'D:\EMI NEW\APPLICATION WEB\testWCF\testWCFApp\bin\Debug\testWCFApp.exe'.
Affected parameters are:
   logtoconsole =
   logfile = D:\EMI NEW\APPLICATION WEB\testWCF\testWCFApp\bin\Debug\testWCFApp.InstallLog
   assemblypath = D:\EMI NEW\APPLICATION WEB\testWCF\testWCFApp\bin\Debug\testWCFApp.exe
Installing service testWCFApp.ApplicationServer...
Creating EventLog source testWCFApp.ApplicationServer in log Application...
Rolling back assembly 'D:\EMI NEW\APPLICATION WEB\testWCF\testWCFApp\bin\Debug\testWCFApp.exe'.
Affected parameters are:
   logtoconsole =
   logfile = D:\EMI NEW\APPLICATION WEB\testWCF\testWCFApp\bin\Debug\testWCFApp.InstallLog
   assemblypath = D:\EMI NEW\APPLICATION WEB\testWCF\testWCFApp\bin\Debug\testWCFApp.exe
Restoring event log to previous state for source testWCFApp.ApplicationServer.
An exception occurred during the Rollback phase of the System.Diagnostics.EventLogInstaller installer.
System.Security.SecurityException: The source was not found, but some or all event logs could not be searched.  Inaccessible logs: Security.
An exception occurred during the Rollback phase of the installation. This exception will be ignored and the rollback will continue. However, the machine might not fully revert to its initial state after the rollback is complete.

What's wrong ?

Thank you.
0
Dears, kindly note that I have to build  have to build the server which host the service as windows form application c#, and the client also is windows from application c#, so I tried to create new WCF Service Library, now how can I host it by the server and access it by the client?

the client have to connect to the server using http protocol as it is far from it,

so, is there a possible scenario for that?
0
How to call WSDL from Stored Procedure in a SQL Server.
0
I need  to have fundamental knowledge and certain patterns in WCF to be able to pass  
Exam 70-513
What training can you recommend me ?
0
I had my web service running nicely on a remote IIS server, but now it's broken. I believe I've got the relevant client and server servicemodel sections of the system properly configured. See attached files.ClientServiceModel.docxServerServiceModel.docxI have another website running just fine on the same server, w/ username/password authentication. I can run my service properly when the server is locally on my laptop. However now I can't access the remote service at all.  Can't do an "Add Service reference".  Elmah not working.

I believe that I don't have authentication properly set for the web service website
0
i am converting wcf service into web api.  i need to get and set cookie from the incoming request and outgoing response.
0

WCF

Windows Communication Foundation (WCF) is a tool used to implement and deploy a service-oriented architecture (SOA) to support distributed computing where services have remote consumers. It features a runtime and a set of APIs in the .NET Framework for building connected, service-oriented applications. Services typically have a WSDL interface (Web Services Description Language) that any WCF client can use to consume the service, regardless of which platform the service is hosted on. WCF implements many advanced Web services (WS) standards such as WS-Addressing, WS-ReliableMessaging, WS-Security, RSS Syndication Services, WS-Discovery, routing and better support for REST services.

Top Experts In
WCF
<
Monthly
>