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

Given this information...
POST /Sale/Application/v2/mypage.asmx HTTP/1.1
Host: b2b2.mywebsite.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/Persist"

Open in new window

How would I post my xml data to a service in vb.net web page win 4.5 environment

I do NOT want to import the wsdl
Fundamentals of JavaScript
LVL 13
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

I am attempting to resolve an issue WCF Rest Service and I am able to step through debug in one way:

I am able to step-through by calling on the URL specifying the method on the URL:

        [WebInvoke(Method = "GET", UriTemplate = "/GetMember/{strTest}", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        string GetMember(string strTest);

Open in new window

But what I really needed is more like an object in the RequestBody. So, I originally had:

        [WebInvoke(Method = "POST", UriTemplate = "/GetMember",  RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        GetTestMemberRes GetMember(GetTestMemberReq TestMemberReq);

Open in new window

I am getting this:
Results of test
And it does not even hit the breakpoint.

When I do the first operation contract I had to change the signature of the method. But when I do that and use the GET as well as update the URITemplate it works and I hit the break point but when I change it to a POST and use the object GetTestMemberReq. I get the above?

If the first one is working my config changes should be good.

I am using C#, .NET 4.0, and VS 2017.

Any information as to what I might be doing incorrectly.

Very much appreciated.
We are trying to POST to a WCF REST method. We can successfully POST using SoapUI, Postman, and YARC but when we try in Angular 5 I'm receiving a NULL object.

Client code:
    const headers: any =  {'Content-Type': 'application/json'};
    return this.ajax.request<any>({
        url: url,
        method: method (POST),
        headers: headers,
        options: {
            body: JSON.stringify(req.body)

    public request<T>(req: AjaxRequest): Observable<HttpEvent> {
        return this.http.request<T>(req.method, req.url, req.options)

    //this.http = HttpClient

    // Component
    public onNext(event: any): void {
            data: event.value,
            dmgInfo: this.responses['dmg'],
            emailId: this.util.getQueryStringValue('uname')


    private _saveInfo(data: any): void {
        this.appraisal.request('saveDmgInfo', null, {body: data})
        .subscribe(v => {

Open in new window

Server-side logic:
// WCF Interface definition
    [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
    Result InsertDemographicInfo(Demographic d);

    // Service code
    public Result InsertDemographicInfo(Demographic d) // The Demographic object is null when posting from Angular
        Result result = new Result();
            result.Status = "Success";
        catch (Exception ex)
            result.Status = "Fail";
            result.Message = ex.Message;
        return result;

Open in new window

Web config:

Open in new window

I have a question regarding validation of fields provided from a WCF web service.

Let's say that the web service has 6 fields:


Now, I want to check that when a Referral is provided the MemberFirtName *and* MemberLastName are also provided. When a City is provided the AptType *or* a MemberLastName is provided.

What is the best way to achieve something like that?

This is in C# with VS 2015.

Any information would be greatly appreciated.
I have the codes below
1. RetrieveData is working fine., but now I want to assign class library value in a loop.
Basically, I have wcf call to get the list of name which is exactly same as class library property name - see newretrievedata
Is it possible to do that?

On another side of class library in c#, i already have all of the property/object in class library.

  public JsonResult RetrieveData(string ID)
            Domain.Lead l = new Domain.Lead();
            l.firstname = "John";
            l.lastname = "Smith";
            return Json(l, JsonRequestBehavior.AllowGet);

        public JsonResult newRetrieveData(string ID)
            Domain.Lead l = new Domain.Lead();

            foreach (KeyValuePair<string, string> i in Helper.DynamicsCRM.GetAllLeadInfoByMetaData3("a51ec467-7255-e811-81153863bb3c4538"))
                //Response.Write(i.Key + " >> " + i.Value + "<br>"); Key has firstname, and lastname, etc.
            	l.i.Key = i.Value;
            return Json(l, JsonRequestBehavior.AllowGet);

Open in new window

In a very simple Silverlight Application I have a DomainService Class which has a single method that returns a list of Letter Objects.

The application works fine when I run it in VisualStudio. However, when I publish it to a folder on my Windows 10 local machine and run it using IIS (version 10.0.166299.5) I get the following error:
The remote server returned an error: NotFound. at System.ServiceModel.DomainServices.Client.OperationBase.Complete(Exception error) at System.ServiceModel.DomainServices.Client.LoadOperation.Complete(Exception error) at System.ServiceModel.DomainServices.Client.DomainContext.CompleteLoad(IAsyncResult asyncResult) at System.ServiceModel.DomainServices.Client.DomainContext.<>c__DisplayClass1b.b__17(Object )

I supect this is due to something being wrong in missing in my WebConfig file. My WebConfig Currently looks like this:

<?xml version="1.0"?>


      <compilation debug="true" targetFramework="4.6" />
      <httpRuntime targetFramework="4.6" />

    <validation validateIntegratedModeConfiguration="false" />
    <modules runAllManagedModulesForAllRequests="true">
      <add name="DomainServiceModule" preCondition="managedHandler" type="System.ServiceModel.DomainServices.Hosting.DomainServiceHttpModule, System.ServiceModel.DomainServices.Hosting, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

Open in new window

Hi, I have 3 years of experience in Release Engineer and Software Engineer,

As I have less work for release management so I request for software development work to manager and got some work parallely. Now I am doing both Release as well as software development work in AngularJS, C#, WCF, MySQL, ASP.NET MVC etc. but my designation is "Release Engineer" . Now I want to switch to software engineer to different organization with this experience.

So is it possible? or how it should be done?

Please Help.

Is there any easy way to convert a WCF application to a pure web based application.
Hello guys,

I´m getting this error while trying to setup Outlook with autodiscover

Process w3wp.exe (FE_Autodiscover) (PID=8708). WCF request (Get Servers for sametime.cz) to the Microsoft Exchange Active Directory Topology service on server (TopologyClientTcpEndpoint (localhost)) failed. Make sure that the service is running. In addition, make sure that the network ports that are used by Microsoft Exchange Active Directory Topology service are not blocked by a firewall. The WCF call was retried 1 time(s). Error Details
 System.ServiceModel.Security.SecurityAccessDeniedException: Access is denied.

Server stack trace:
   at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at …

I have a webservice that I,m trying to apply a custome security, when I try to call the service it display the following error:


At least one security token in the message could not be validated.

To add the security I modify the service config file:

[b][b]<services> <service name = "WcfService1.Service1"> <endpoint address="" binding="customBinding" bindingConfiguration="customBindingOasis" contract="WcfService1.IService1"> <headers> <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsse:UsernameToken> <wsse:Username>USERNAME</wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">PASSWORD</wsse:Password> </wsse:UsernameToken> </wsse:Security> </headers> </endpoint> </service> </services> <bindings> <customBinding> <binding name ="customBindingOasis"> <security authenticationMode="UserNameOverTransport" includeTimestamp="false" messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10"> <secureConversationBootstrap /> </security> <textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16" messageVersion="Soap12" writeEncoding="utf-8"> <readerQuotas maxDepth="32"
OWASP Proactive Controls
LVL 13
OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.


I have this WCF service that works fine using soap1. I'm trying to change it to run in soap1.2 but I have not been able.

I have try changin diferents things in the webconfig.

First I change the basicHttpBinding for wsHttpBinding.  I also change the protocol , remove the soap1.1 and add the soap 1.2

How I can made that my WCF web service run in soap1.2?
what are advantages of creating a REST service in Web API vs some other technologies in .NET like WCF, ASP .NET MVC etc.

When trying to add a service reference I receive the following error:

"The configuration for the service reference could not be added due to the following issue: An error occurred creating the configuration section handler for system.serviceModel/bindings: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) (C:\....\web.config line 154)"

But, looking in web.config I am not seeing the problem.

Thanks. :)
I have written a mock for a REST service using SoapUI free version. The resource path looks like <webservice>/employees which returns all employees in JSON. Now I want to pass a parameter which is a date range, something like <webservice>/employees?from=01-01-2017&to=31-12-2017
This will return only a few employees who joined during the date range. I am not able to find a way to accept parameters in the mock response and not sure how do i check something like if(date == 01-01-2017 to 01-04-2017) { //pass this json text   } else if(date == 08/08/2017 to 31/12/2017) { pass this text }

Any help would be greatly appreciated as I am new to SoapUI

We have a server 2012 R2. When we want to add 1 of the 2 features below the installation failes with error 0x800f0922

The 2 features who fail are:
.NET Framework 4.5 Features\WCF Services\Named Pipe Activation
.NET Framework 4.5 Features\WCF Services\TCP Activation

What can we do to solve this? Any help is appreciated.
I have a C# WCF Service hosted in IIS 8.5 which has a simple Client webform consisting of a ComboBox for data entry. The ComboBox can be populated manually or via barcode scanner on the users mobile device. Every time the user uses scanned input the scanned value is written to a database table with UserId, dateTime & value. I have an API which will return the last scanned input for a user based on dateTime scanned.

So I now have a webform which can take its input either manually or via scanned input. If there is no selected value in the comboBox then I want to run a background job to call the API and return any scanned input value to the ComboBox.  

CheckForScannedTransactions below is part of the Client WebForm1 and it calls the background job StartBackgroundProcess passing parameters MyBGJobParms. I expected control to return to UI but when there is no scanned input to return control never returns to the UI despite RunWorkerAsync. Why is this ?

In this scenario every logged on user will call CheckForScannedTransactions() to check for their own scanned input. Is there a better way of doing this ? Could I for instance have just 1 background job running continuously and updating scanned input to each users webform page. Is that possible if so How so?

//CheckforSacnnedTransactions will run in background and populate any scanned value to ComboBox if ComboBox is empty 
if (ComboBox1.SelectedIndex == -1 )
    CheckForScannedTransactions ();

Open in new window

Open in new window

I am trying to install Sharepoint 2016 and have just been running into issue after issue. I have tried all suggested solutions available but have had no luck. Any clue why this is happning? The prerequisite installer (such a terrible and useless tool IMO) failed to install anything during the prerequisite installation process so I had to install the prerequisites manually. I tried reinstalling WCF data services 5.6 tools using the prerequisite installer in command line with the correct parameters and had no luck. I have tried reinstalling the .net 4.6.2 framework as well.

I am running a fresh install of Windows Server 2012 R2 and the database server is running Microsoft SQL Server 2014

Here is the error:

One or more configuration settings failed. Completed configuration settings will not be rolled back. resolve the problem and run this configuration wizard again. The following contains detailed information about the failure.

Failed to create the configuration database.

An exception of type Microsoft.Sharepoint.Upgrade.SPUpgradeException was thrown. Additional exception information: One or more types failed to load. Please refer to the upgrade log for more details.

I have also attached the error log. Any suggestions?
I have a C# WCF Service which is hosted in IIS 8.5 and has a number of web services. One of these web services is called MobileRegistration and when called from the Client works correctly (see below)

using (var svc = new DCRulesServiceRef1.TransactionClient())
{string returnval = svc.MobileRegistration(enterpriseId, userId, deviceId, qrcode);}

Open in new window

However I also need to be able to call the webservice MobileRegistration directly via a URL without having to go through the client. The URL I created is as follows

This fails with HTTP400 Webpage cannot be found.

http://xx.xx.xx.xxx/DCRules2Alias/Service.svc  does return the TransactonService Service page successfully.  So why can it not find my service. Is the format of the URL incorrect for a WCF web service ? Below is some of the relevant code and WSDL. Appreciate if someone can point out what I am doing wrong


Operation Contract for MobileRegistration web service
[WebGet(UriTemplate = "MobileRegistration?enterpriseId={enterpriseId}&userId={userId}&deviceId={devicerId}&qrcode={qrcode")]

        string MobileRegistration(string enterpriseId, string userId, string deviceId, string qrcode);

Open in new window

Web.config file
   <!-- Required to prevent error

Open in new window

I have WCF service which emails invitation for members to join a particular enterprise. The URL sent to the users is as follows:

Please respond to invitation using the Link below:

This would take this to the Invite Page where they could accept or reject the invitation. This all worked fine until recently. However now when the URL is clicked, instead of going to the invite page , it seems to be trying to redirect to the Login Page. Nothing is displayed but the URL displayed on the browser is as follows:  


I am not sure why this is happening or how I would go about debugging. Appreciate some suggestions.
Rowby Goren Makes an Impact on Screen and Online
LVL 13
Rowby Goren Makes an Impact on Screen and Online

Learn about longtime user Rowby Goren and his great contributions to the site. We explore his method for posing questions that are likely to yield a solution, and take a look at how his career transformed from a Hollywood writer to a website entrepreneur.

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?

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?

Besides , in order to let my WCF open normally, we recommend to adjust in web.config mainly in 3 parts below:
Part 1
      <service behaviorConfiguration="ServiceBehavior" name="Soc_MobileWebServices.MobileService">
        <endpoint address=""  

        <endpoint address="mex"  
                  contract="IMetadataExchange" />  
Part 2
          <serviceMetadata httpsGetEnabled="true"/>

Part 3
        <binding name="" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647" maxBufferSize="2147483647">
          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
        <binding …
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.

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.
I have a class called "globals" which holds multiple classes that are use by my WCF application. So for example globals consists of up to 50 classes. Until now I have been defining classes with globals  as follows:

   public class Commands
        DataSet ds = new DataSet();
        DataTable dt1=new DataTable("dt1");
        DataSet ds2 ;//= new DataSet("ds2");
        DataTable dt2; //= new DataTable("dt2");
        DataRow dr2;
        string[] delimitedList1;
        string[] delimitedList2;
        string[] delimitedList3;
        string[] delimitedList4;
        string[] delimitedList5;

        string currentDataType = null;
        string ds1XmlString = " ";
        string ds2XmlString = " ";
        string myStringValue = "";
        int cnt = 0;
        DataSet dsCopy = null;
        DataSet dsCopy2 = null;
        DataSet cltDS = null;
        DataSet dsSav1 = null;
        DataSet dsSav2 = null;
        DataSet dsSav3 = null;
        DataTable fileSchema;
        public Commands()


Open in new window

      globals g;

I now realize that by placing globals into class Commands that it is part of this class rather than a reference.I want to create class Commands and be able to reference variables that are available in globals without having to imbed globals as part of class commands. Appreciate if someone can explain how I can achieve this ?

I have a simple page (SOAP Request) I can call in  a browser or from SoapUI.org app


I type in the two variables and it returns a success or fail string

How do I call that in a C# Web Page?


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