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

We need to authenticate our system users; System architecture is 3-tiers as follows:

Storage server: MS SQL Server
Application server: WCF services hosted in IIS
Presentation: Website built using AngularJS, Mobile App.

I searched the web and found that JWT is useful for this purpose.
I found many frameworks such as https://identityserver.io/

BUT we need NOT to depend on any framework.

Please collaborate by adding code, configuration,... snippets to do the authentication.
PLEASE no external URLs.

Note: we are using the .Net framework 4.8
I have a WCF Service which is hosted in IIS on my Windows 7 PC and  it has the following data contract defined:

    public class RtnFromServiceParms
        public string passedUserId { get; set; }
        public string passedBadgeId { get; set; }
        public string passedUserName { get; set; }
        public string passedEnv { get; set; }
        public string passedSecLvl { get; set; }


        public RtnFromServiceParms()
            passedUserId = " ";
            passedBadgeId = " ";
            passedUserName = " ";
            passedEnv = " ";
     passedSecLvl = " ";



Open in new window

// In the server application MyRtnFromServiceParms is a new instance of RtnFromServiceParms()
MyRtnFromServiceParms = new RtnFromServicParms();

From the client application the service is called as follows:

// Call to Service      
MyRtnFromServiceParms = client.NextTransactionSeq(MyPassToServiceParms);

However in my client WebForm1.aspx I am getting an error "Webform1.MyRtnFromServiceParms is inaccessible due to its protection level"  In WebForm1.aspx.cs references to MyRtnFromServiceParms are not showing any error.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="TiosClient.WebForm1" 

Open in new window

I am trying to get a old C# service back up and running. In VS2019 I can build the service successfully and view it in the browser. However when I move it to IIS 8.5 I am no longer able to browse the service. Instead I get an HTTP Error 404. IIS-Service-error.docx

I have detailed the steps I have taken in the attached word document. If someone could help me out I'd appreciate it.
Getting exception while accessing WCF SOAP service from Azure fuctions using dotnet core.

Error Message:

The content type multipart/related; type="application/xop+xml"; start="<http://tempuri.org/0>"; boundary="uuid:06e7725d-7c4a-404d-9f6b-0d9044ec44fe+id=2"; start-info="text/xml" 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 IsContentTypeSupported method is implemented properly. The first 872 bytes of the response were: '
Content-ID: <http://tempuri.org/0>
Content-Transfer-Encoding: 8bit
Content-Type: application/xop+xml;charset=utf-8;type="text/xml"

WCF Calling Methods in azure functions:

 public async Task<IActionResult> PosteCaseAsync([HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = null)] HttpRequest httpRequest)
            MethodBase methodBase = MethodBase.GetCurrentMethod();
            CaseListResponse response;
                string request = await httpRequest.ReadAsStringAsync();
                await _httpClient.LogAsync(LogTypes.Info, methodBase.ReflectedType.Namespace, methodBase.ReflectedType.Name, "PosteCaseAsync" + request).ConfigureAwait(true);
                CaseListUpdateRequest caseRequest = JsonConvert.DeserializeObject<CaseListUpdateRequest>(request);
                CaseServiceClient caseService =…
I have a wcf service. I'd like to fake this service for debugging.
Please assist.
Dear EE,

We have WCF client services which are giving an error.

Failed to invoke the service. Possible causes: The service is offline or inaccessible; the client-side configuration does not match the proxy; the existing proxy is invalid. Refer to the stack trace for more detail. You can try to recover by starting a new proxy, restoring to default configuration, or refreshing the service.
An error occurred while receiving the HTTP response to https://vm009-test-app.netsolpk.com:444/XYZservice.svc. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.

Server stack trace: 
   at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
   at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
   at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
   at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)

Open in new window

I am trying to set my WCF API on 2012 server and I am going to consume that from different server(2008 SP2), One of those API may be used for Payment Processing, So for eg. my website is https://website.com and my api service is accessing via http://WCFapis/api.svc, then what will be best way to consume API in secure mode so Payment can be done in very secure way. Will I need to put SSL certificate to API site as well or what are alternatives available?
what are the tools and procedures to establish the Web Application development department in a company?  The department will create new web applications and mobile applications including
Business and system analysis.
Hey Guys, I have a doubt in c++ I am trying to develop a complex number matrix (a+bi) which takes 320k values in each row. Initially, we dump zeros into a matrix like this (0+0i).
Then during the execution of the program, we dump the data we have obtained.
in our company (1000 - 10000 employee) we are going to establish a new department for software development so what are the best tools to:

1- manage software versions.
2- manage team tasks.
3- manage the development processes.
another question:

what are the usual processes for stakeholder requests and changes?

Be informed that we are using Microsoft technologies for software development.

Best regards.
I am trying to convert my WCF service from http to https. I have purchased an SSL certificate and now I am looking at updating references to http to https. However when I do this I am getting the following warnings:

Users\Administrator\source\repos\TiosService\TiosService\App.config(141,79,-1,-1): warning : WCF configuration validation warning: The 'bindingConfiguration' attribute is invalid - The value 'webHttpsBinding_ITransaction2' is invalid according to its datatype 'serviceBindingConfigurationType'.

Below is the app.config with the changes I have made highlighted. Appreciate some guidance.
<?xml version="1.0" encoding="utf-8"?>
    <section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=, Culture=neutral, PublicKeyToken=89b483f429c47342" />
    <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
    <add key="ClientSettingsProvider.ServiceUri" value="" />
    <!-- minimum levels Verbose, Debug, Information,Warning, Error, Fatal -->
    <add key="serilog:minimum-level" value="Information" />
    <add key="serilog:write-to:RollingFile.pathFormat" value="C:\TiosFolder\TiosServerLogs\ServerLog.txt" />
    <!--<add key="serilog:write-to:RollingFile.outputTemplate" value="customTemplate"/>
    <add key="serilog:write-to:RollingFile.fileSizeLimitBytes" value=""/>-->

Open in new window

Help !!!,
I have written a C# WCF ASP.NET Service which runs in IIS and has been working fine for the past few years. I have returned to it after 3-4 months to do some additional work, However when I try to log into the service I cannot get beyond the login Page. I recompiled the service & client but with same result. When I try to debug I get a message that "The breakpoint will not currently be hit. No symbols have been loaded for this document. I am at a loss as to how to figure out what is wrong. When I look at the trace logs I see the following.  I have made no changes to the Login where it seems to be failing.

2019-01-29 21:38:21.240 +00:00 [Information] Trying to Log on as: "stryker" 
2019-01-29 21:38:22.300 +00:00 [Information] Error encountered: "[b]System.ServiceModel.ProtocolException[/b]: The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"> 
<html xmlns=\"http://www.w3.org/1999/xhtml\"> 
[b]<title>IIS 8.5 Detailed Error - 500.19 - Internal Server Error</title> [/b]
<style type=\"text/css\"> 

Open in new window

This is my web.config file:

<?xml version="1.0" encoding="utf-8"?>

  For more information on how to configure your ASP.NET application, please visit
    <compilation debug="true" targetFramework="4.6.1"/>
    <httpRuntime targetFramework="4.6.1"/>
      <compiler language="c#;cs;csharp" extension=".cs"
        type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701"/>
      <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
        type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"/>
    <directoryBrowse enabled="true"/>
        <binding name="BasicHttpBinding_IService1" >

We are migrating to o365. The setup is hybrid.
Hybrid server are  Exchange Server 2016 Cumulative Update 8 (CU8)
Source servers are mixed, most of them Exchange 2016, Exchange 2010.
From average batch of 100 users, approx 10 are failing with the following error:

 Error: Couldn't switch the mailbox into Sync Source mode.
 This could be because of one of the following reasons:
   Another administrator is currently moving the mailbox.
   The mailbox is locked.
   The Microsoft Exchange Mailbox Replication service (MRS) doesn't have the correct permissions.
   Network errors are preventing MRS from cleanly closing its session with the Mailbox server. If this is the case, MRS may continue to encounter this error for up to 2 hours - this
 duration is controlled by the TCP KeepAlive settings on the Mailbox server.
 Wait for the mailbox to be released before attempting to move this mailbox again.
upon deeper investigation, this seems to be related with WCF (Windows Communication Foundation)

FailureType       : CommunicationWithRemoteServiceFailedTransientException
FailureHash       : e76c
FailureCode       : -2146233088
MapiLowLevelError : 0
FailureSide       : Source
FailureSideInt    : 1
ExceptionTypes    : {MRS, MRSTransient, Transient, Exchange}
ExceptionTypesInt : {10, 11, 2, 1}
WorkItem          : IncrementalSync
Message           : Communication with remote service 'https://hybrid.ommited/EWS/mrsproxy.svc hybryd server FQDN (15.1.1415.3 …
Dear all

i have a wcf service ,this wcf service is displayed in arabic

below is the output:
[To Parent Directory]

  26/03/40 11:50 ص        <dir> bin
  18/03/40 05:34 م           86 WcfserviceSample.svc
  18/03/40 05:34 م           50 PrecompiledApp.config
  26/03/40 11:55 ص         3778 Web.config

why this wcf service is displayed in arabic
how to display this wcf service in english as below:
[To Parent Directory]

27/11/2018    10:08        <dir> bin
26/11/2018    17:35           86 MobileService.svc
26/11/2018    17:34           50 PrecompiledApp.config
04/12/2018    15:56         4037 Web.config
I get the WCF error "{"The remote server returned an error: (403) Forbidden."} The HTTP request was forbidden with client authentication scheme 'Anonymous'." when using basicHttpBinding with Transport security and certificate credential. My service is in amazon ec2 instance and my client app remotely connect to it over the internet. I am able to connect to the wcf service if I my Transport credential is set to "None" in both the web.config of the service and app.config of the client. My service certificate is like "www.example.com" is installed on amazon ec2 "local machine store" and "Personal Folder". My client app certificate is just a self-signed certificate which I installed to its "local machine and Personal Folder" and also to the "Trusted People store" in the amazon ec2 instance where my wcf service is. I have also setup "https" to my IIS site bindings and I can reach the site through like "https://www.example.com"

Below is the web.config, app.config, and the code I have on the client app.

Service Web.config:

    <?xml version="1.0"?>
        <compilation debug="true" targetFramework="4.0" />
        <customErrors mode="Off"/>
            <binding name="basicHttpBinding_Config" >
              <security mode="Transport">
                <transport clientCredentialType="Certificate"/>
dear all

I have 14998 records returned from a wcf service
but xamarin insert only 11000 records in sql lite

is there any limitation for the number of records added into xamarin table in sql  lite .
Thank you

I am trying to call a WCF Service from Jquery.
When i run the application as of now, it goes into error.
All i get is :         XHR: [object Object]

Earlier i was getting CORS issues.
I Included "            "Access-Control-Allow-Origin" under Application_Beginrequest of global.asax file.

Just to make sure the service is working good, I tried calling the service from a server side button control click and it works good and returns the data.
However, when i call it form Jquery, it goes into error and does nothing.

Can you point out what is wrong with this code?  Why is it failing.


namespace EnrSvcOut
    // NOTE: If you change the interface name "IService1" here, you must also update the reference to "IService1" in Web.config.
    public interface IServiceEnrollmentOutcome
        [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, UriTemplate = "/GetServicePrograms")]
        List<SvcEnrOutProgram> GetServicePrograms();
    public class CompositeType
        bool boolValue = true;
        string stringValue = "Hello ";

        public bool BoolValue
            get { return boolValue; }
            set { boolValue = value; }

        public string StringValue
            get { return stringValue; }
            set { stringValue = value; }

Open in new window

I have a silverlight app hosted on windows 7 and IIS, it works fine

I'm trying to move to a different box (windows 10) and its not working
I've run fiddler tool and can see the SVC binary requests are not found (404)
As this is a direct copy of the published code, I assume its setup related
If i run the project through visual studio it works fine, but in IIS does not

Here is an example of the url that isn't found on the new box:
The above gives a 404 in fiddler

The previous request to the XAP file works and does NOT 404

I've tried to duplicate the IIS setup as much as possible, but for some reason it isn't working

My solution consists of 2 projects
MasterUI (silverlight stuff here)
MasterUI.Web (this is the non silverlight app - .aspx files)

The windows 10 box is a fresh install, so perhaps i'm missing some components, but as its working in visual studio on this windows 10 box, I assume it's IIS setup related?
I have a .NET WCF service which communicates with a time and attendance clocking terminal.
The WCF service method is as follows:
[WebInvoke(UriTemplate = "/Status", Method = "POST")]
public Stream Status(XmlElement status)
    XmlDocument xml = new XmlDocument();

    string terminal = xml.SelectSingleNode("/StatusResponse/@terminal").Value;
    string uid = xml.SelectSingleNode("/StatusResponse/@uid").Value;

    StringBuilder builder = new StringBuilder();
    builder.Append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
    builder.Append("<OperationStatus uid=\"" + uid + "\">OK</OperationStatus>");

    return new MemoryStream(Encoding.UTF8.GetBytes(builder.ToString()));

The WCF service is choking on ascii characters (ASCII 31) which are contained within the XML being sent from the terminal.
There is an error in XML document (3, 55), this is the ASCII 31 character after SR00 in the XML.

It is not possible to change the firmware on the terminal so I need to modify the WCF service to cope with the ascii characters.
If need be the ascii characters can be removed, however this must be done by the WCF service and not the client.

Details from Wireshark below :

POST /AccutouchService.svc/status HTTP/1.1
Accept: */*
Date: Sun, 26 Aug 2018 15:21:45 GMT
Authorization: ATS 000001714134:PASS
Content-Type: application/xml
Accept-Encoding: gzip
User-Agent: UCS-XML/3.0 …
Vehicle mortgae (muroor) ABU DHABI WCF  service integration

anyone who implemented I need to know the web configuration as it’s not cleared from their side and I am unable to process anything
Hello all,

Kindly advice how I can send XML data to a Restful URL..  

Please provide me some sample codes.

I have created a WCF service but unfortunately its not sending anything and moreover i am getting following error message
The remote server returned an error: (415) Unsupported Media Type.

Following is the WCF code.
Dim xml As String
xml = "http://send/p1/?xml=<?xml version=""1.0"" encoding=""utf-8""?>" +
"<Emp ID=""1234"">" +
"<EmpDtls>" +
"<Empno>" & Empno & "</empno>" +
"</EmpDtls>" +
Dim url As String = "http://send/p1"
Dim req As HttpWebRequest = DirectCast(WebRequest.Create(url), HttpWebRequest)
Dim requestBytes As Byte() = System.Text.Encoding.ASCII.GetBytes(xml)
req.Method = "POST"
req.ContentType = "text/xml;charset=utf-8"
req.ContentLength = requestBytes.Length
Dim requestStream As Stream = req.GetRequestStream()
requestStream.Write(requestBytes, 0, requestBytes.Length)
Dim res As HttpWebResponse = DirectCast(req.GetResponse(), HttpWebResponse)
If res.StatusCode = HttpStatusCode.OK Then

End If
Dim sr As New StreamReader(res.GetResponseStream(), System.Text.Encoding.[Default])
Dim backstr As String = sr.ReadToEnd()

<proxy usesystemdefault="False"/>

<compilation debug="true" strict="false" explicit="true" targetFramework="4.0" />

i'm newbie in C# and web service but i need to read the soap service (xml format) and save it to a SQL tables (dataset)...

here's my client's data:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:pix="">

I have 2 classes:
class order
            [MessageBodyMember(Order = 0)]
            public string wsVersion { get; set; }
            [MessageBodyMember(Order = 1)]
            public string cname { get; set; }
            [MessageBodyMember(Order = 2)]
            public string PO { get; set; }
            [MessageBodyMember(Order = 3)]
            public string method { get; set; }
            [MessageBodyMember(Order = 4)]
            [XmlArrayItem("oItems", IsNullable = false)]
            public Item[] Items { get; set; }
class Item
            [XmlElement(Order = 0)]
            public string style { get; set; }
            [XmlElement(Order = 1)]
            public int qty { get; set; }
            [XmlElement(Order = 2)]
            public double price { get; set; }

in service.svc.cs

Aside from removing the TransactionScope created on the WCF client (and effectively taking msdtc out of the picture), Is there an alternate way to avoid the excessively long WCF-service-wide hang when a single workstation hosting the WCF client is misconfigured (or experiencing communications issues)?

We have a simple WCF service implemented using C#, and a simple WCF Client which creates TransactionScope before invoking the WCF service proxy.

Both work fine as far as concurrency goes if Windows Firewall allows TCP communication from/to msdtc.exe thru firewall. However if a single workstation is misconfigured (i.e. has firewall enabled, and has an Inbound Rule for TCP for msdtc.exe disabled), its attempt to communicate with the service will block all other WCF clients (which are properly configured) from communicating with the WCF Service for at least 41 seconds (given the currect settings for TCP retransmissions), despite us using much shorter timeout settings for the WCF binding as well as for the TransactionScope timeout.    

 The WCF service is decorated with
        InstanceContextMode = System.ServiceModel.InstanceContextMode.PerCall,
        ReleaseServiceInstanceOnTransactionComplete = false,
        ConcurrencyMode = System.ServiceModel.ConcurrencyMode.Multiple,
        IncludeExceptionDetailInFaults = false,
        TransactionTimeout = "00:00:13"
The WCF service has a single operation contract, …
I am trying to Integrate Swagger with a WCF service by following the article SwaggerWCF

I skipped ASP.Net part as i dont have ASP.Net in my project

The steps are not clearly stating whether these changes have to made in the service or in the host, mine is a self hosted service.

I have tried making changes in both the places (service and host, i am always getting
failed to parse JSON/YAML response swaggerwcf

Please help if i am missing anything

Adding project code

Service Project (WCFSample)

Service Interface

public interface IService1
[SwaggerWcfPath("Get Data", "Gets Data")]
[WebInvoke(UriTemplate = "/data",
BodyStyle = WebMessageBodyStyle.Bare,
Method = "Get",
RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json)]
string GetData(int value);

    [SwaggerWcfPath("Get Data", "Gets Data using data contract")]
    [WebInvoke(UriTemplate = "/datawithcontract",
        BodyStyle = WebMessageBodyStyle.Bare,
        Method = "Get",
        RequestFormat = WebMessageFormat.Json,
        ResponseFormat = WebMessageFormat.Json)]
    CompositeType GetDataUsingDataContract(CompositeType composite);

    // TODO: Add your service operations here

// Use a data contract as illustrated in the sample below to add composite types to service operations.
// You can add XSD files into the project. After building the project, you

Open in new window



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