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

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.
Become a Microsoft Certified Solutions Expert
LVL 13
Become a Microsoft Certified Solutions Expert

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

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.
We have a new sharepoint online site connected to an on premise WCF service using BCS.  Our Office 365 syncs with our on premise AD server using Azure.  Access to our new sharepoint site works fine for internal users.  We have shared the site with an external user to test.  The person can login and view the site but when that user tries to access anything that uses the WCF service, it says "access denied".  When looking at metadata store permissions.  It does not allow me to add "everyone" or "all users (membership".  I can find it when browsing, but when I try to add it, it says it doesn't exist.  I can only add "everyone except external users".
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
Exploring SharePoint 2016
LVL 13
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.


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

When I run my  WCF api I get the below code from WCF Test Client tool and my Test WebSite.  What do I need to do in my MVC VS 2015 webconfig file on the server and the client to get this apito work?

The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'NTLM,Negotiate'.
I have IIS7.
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

OWASP: Threats Fundamentals
LVL 13
OWASP: Threats Fundamentals

Learn the top ten threats that are present in modern web-application development and how to protect your business from them.

I am using WCF callback services for Real-Time User availability and text/video chat application and i have included reliable session with a receive timeout of 10 mins.The problem i face is when a message has to be broadcast for all users(say 10 users) i am using a for loop and if a client has disconnected from internet on his side the loop waits for 10 mins to reach the same client without broadcasting the message to other clients.
 Is there any alternative or a better approach for accessing other clients in the meantime or any work around.
Hey all I am using the following code on my local machine to give me a temporary WCF service:
    using System;
    using System.Windows.Forms;
    using System.ServiceModel;
    using TestService;
    namespace TestClient
        public partial class Form1 : Form
            IService1 patientSvc = null;
            public Form1()
            private void Form1_Load(object sender, EventArgs e)
                EndpointAddress address = new EndpointAddress(new Uri("net.tcp://localhost:2202/PatientService"));
                NetTcpBinding binding = new NetTcpBinding();
                ChannelFactory<IService1> factory = new ChannelFactory<IService1>(binding, address);
                patientSvc = factory.CreateChannel();

Open in new window

And the class1:
    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.ServiceModel;
    using System.Runtime.Serialization;
    namespace TestService
        public interface IService1
            Patient GetPatient(Int32 index);
            void SetPatient(Int32 index, Patient patient);
        [ServiceBehavior(IncludeExceptionDetailInFaults = true)]
        public class PatientService : IService1

Open in new window

I'm getting the following error:
The incoming message was signed with a token which was different from what used to encrypt the body.  This was not expected.

I'm thinking it has to do something with my app.config file
      <endpoint address="https://xxxxxx/ESARWS/CORETransactionService"
        behaviorConfiguration="endpointCredentialBehavior" binding="customBinding"
        bindingConfiguration="esar" contract="ESAR.CORETransaction"
          <dns value="xxxxx" />
        <behavior name="endpointCredentialBehavior">
            <clientCertificate findValue="xxxxx"
             <authentication certificateValidationMode="ChainTrust"/>
              <defaultCertificate findValue="xxxxxxxxx"

Open in new window

I'm using C# to call a Java Webservice.  Fiddler gives me a status of 200. So my call to the service is good.  But something in the .NET does not like my MTOM message.  Any ideas?  Here are all the details.  

I'm getting this error:
MTOM messages must have type 'application/xop+xml'.

Open in new window

The stack trace says:
Server stack trace: 
   at System.ServiceModel.Channels.MtomMessageEncoder.MtomBufferedMessageData.TakeXmlReader()
   at System.ServiceModel.Channels.BufferedMessageData.GetMessageReader()
   at System.ServiceModel.Channels.BufferedMessage..ctor(IBufferedMessageData messageData, RecycledMessageState recycledMessageState, Boolean[] understoodHeaders, Boolean understoodHeadersModified)
   at System.ServiceModel.Channels.MtomMessageEncoder.ReadMessage(ArraySegment`1 buffer, BufferManager bufferManager, String contentType)
   at System.ServiceModel.Channels.HttpInput.DecodeBufferedMessage(ArraySegment`1 buffer, Stream inputStream)
   at System.ServiceModel.Channels.HttpInput.ReadBufferedMessage(Stream inputStream)
   at System.ServiceModel.Channels.HttpInput.ParseIncomingMessage(HttpRequestMessage httpRequestMessage, Exception& requestException)
   at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
   at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)

Open in new window

I'm trying to call a Java web service with an attachment in C#.    

string soap = "<?xml version='1.0' encoding='utf-8'?> <soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:soap='http://www.w3.org/2003/05/soap-envelope' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:int='http://xxxxx.com/'>" +
               "<soap:Header/> " +
                "<soap:Body> " +
                "	<int:xxxxxSubmission> " +
                "	xxxxxxxxxxxx " +
                "	</int:xxxxxSubmission> " +
                "</soap:Body> " +
                "</soap:Envelope> ";

            X509Certificate2 cert = new X509Certificate2(@"C:\Test\xxxxxx.pfx", @"xxxxx");
            X509Certificate2 cert2 = new X509Certificate2(@"C:\Test\xxx.cer", @"xxxxx");

            HttpWebRequest req = (HttpWebRequest)WebRequest.Create("https://xxxxx/TestService");

            req.ContentType = "application/soap+xml;charset=\"utf-8\"";
            req.Accept = "application/soap+xml";
            req.Method = "POST";
            req.Host = "test";
            req.KeepAlive = true;

            using (Stream stm = req.GetRequestStream())
                using (StreamWriter stmw = new StreamWriter(stm))

            WebResponse response = 

Open in new window

I'm calling a web service where I'm suppose to encrypt the data being passed over.    When I look at the diagnostic file I don't see my payload being encrypted.  Am I missing something in the app.config file for the encryption to occur?

Here is my app.config file:
      <source name="System.ServiceModel.MessageLogging">
          <add name="messages"
          initializeData="c:\logs\messages.xml" />

          <binding name="CoreSoapPortBinding">
            <security mode="Transport">  
              <transport clientCredentialType="Certificate"/>  
        <endpoint address="https://xxxxxxxxx/ESARWS/CORETransactionService"
            binding="wsHttpBinding" bindingConfiguration="CoreSoapPortBinding"
            contract="ESAR.CORETransaction" name="CoreSoapPort" behaviorConfiguration="endpointCredentialBehavior" 

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