.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Wcf +Transport certificate and Messagelevel Certificate + Timestamp validation

Posted By:      Posted Date: October 21, 2010    Points: 0   Category :WCF

Hi All,

I am facing validation issue when client send the request to Server.

Signing without primary signature requires timestamp.

this issue is becuase of missing timestamp.But i am sending the time stamp but after the signature.


 But i am sending the timestamp in my Soap request .Please find my soap request

View Complete Post

More Related Resource Links

Problem using Transport with certificate

Hi First I created a web service according to How to: Use Username Authentication with Transport Security in WCF Calling from Windows Formshttp://msdn.microsoft.com/en-us/library/ff649647.aspx Works fineThen I created a web service that uses client certificate authentication according toHow to: Use Certificate Authentication and Message Security in WCF Calling from Windows Formshttp://msdn.microsoft.com/en-us/library/cc948997.aspx But the later uses HTTP and not HTTPS so I wanted to change and I changed by binding (from the example above) to<bindings>      <wsHttpBinding>        <binding name="wsHttpEndpointBinding">          <security  mode="Transport">            <transport clientCredentialType="Certificate" />          </security>        </binding>      </wsHttpBinding></bindings>But now I get the errorThe SSL settings for the service 'SslRequireCert' does not match those of the IIS 'None'.I haved googled this but havn't found an answer.Is there a MSDN article on what I have to get http://msdn.microsoft

How to setup WCF with wsHttpBinding, Transport Security with x509 certificate behind a load balancer


I'm having a difficult time setting up this WCF Service with wsHttpBinding, Transport Security, x509 and, the key part, the Load Balancer (F5). This all works without a problem in our Dev environment but as soon as I put it behind the F5 it fails giving me this message:

System.ServiceModel.Security.SecurityNegotiationException: Could not establish trust relationship for the SSL/TLS secure channel with authority 'servicechannelcert'. ---> System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.

Is there any additional setup I need to do in IIS or the Load Balancer to handle these requests?

configuration files:

<binding name="wsHttpTransport">
 <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"
  maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
 <security mode="Transport&

System.IO.IOException: Unable to read data from the transport connection

Hello,   I have an xml webservice calling another xml web service and occasionally i get the following error - any ideas why?Does this happen when the request is made or when reading the response? Also how i can prevent it from happening? Thanks   System.IO.IOException: Unable to read data from the transport connection: A blocking operation was interrupted by a call to WSACancelBlockingCall. ---> System.Net.Sockets.SocketException: A blocking operation was interrupted by a call to WSACancelBlockingCall   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)   --- End of inner exception stack trace ---   at System.Net.ConnectStream.Read(Byte[] buffer, Int32 offset, Int32 size)   at System.IO.StreamReader.ReadBuffer(Char[] userBuffer, Int32 userOffset, Int32 desiredChars, Boolean readToUserBuffer)   at System.IO.StreamReader.Read(Char[] buffer, Int32 index, Int32 count)   at System.Xml.XmlTextReaderImpl.ReadData()   at System.Xml.XmlTextReaderImpl.InitTextReaderInput(String baseUriStr, TextReader input)   at System.Xml.XmlTextReaderImpl..ctor(String url, TextReader input, XmlNameTable nt)   at System.Xml.XmlTextReader..ctor(TextReader input)   at System.Web.Services.Protocols.SoapHttpClientProtocol.GetReaderForMessage(SoapClientMessage message, I

Transport Level Error

Hello,I have a ASP.NET 2.0 based web application. At a certain point, I restore a specific MS Sql Server Database from a previously saved backup. The restore works perfectly, however, when I try to access the application again I encounter this error:A transport-level error has occurred when sending the request to the server. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)If I just refresh the page, or in other words, I wait for a few moments and then access the web application, it works just fine. I am at a fix understanding as to what may be causing this. I have gone through couple of other posts in this forum and other material on the internet talking about Connection Pools and so on. At the end, I am still unable to resolve this issue? Should I stoop to a lower level and just add some sort of delay after the restore is done, so that the user will never (hopefully) encounter the above said hiccup, or is there a smarter way to deal with this?Also, I am using NetTiers template to access my MS Sql Server database.Any suggestions are welcome! Thanks!

Trans Libraries Documents Transport

I need to move documents from one lib in site to another lib on the same site. I want to save wf statuses and histories. Can i do it on the administrator level?

Rare exception: Unable to read data from the transport connection: An existing connection was forcib

Our .NET 2.0 app relies upon the ability to download xml webpages from URLs.  At startup, we have about 6 boxes in the wild (out of thousands) that are seeing the following inner exception when they try to download an xml page.  System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. (Inner: ) System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. They can get to the URL in their browser just fine, so we know our server is working.  Furthermore, the embedded WebBrowser control in our app can pull up webpages just fine, so I don't think their firewall is blocking our app.  I'm hoping it's just some diagnosible configuration issue.  Here is the snippet of code that does the downloading: WebRequest request = WebRequest.Create(fileToDownload.SourceUri);request.CachePolicy = new RequestCachePolicy(RequestCacheLevel.NoCacheNoStore);request.Timeout = (int)DefaultTimeout.TotalMilliseconds;request.Method = "HEAD";WebResponse response = request.GetResponse(); Nothing revolutionary there. (I've also tried it without the HEAD request, without keepalive, and using HTTP 1.0).  And here is the exception: System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. StackTrace Infor

Transport level security with netTcpBinding

Does service and client need to be part of domain with netTcpBinding endpoint configured to used Transport security mode with Certificate based client credential type and protect level set to EncryptAndSign <bindings> <netTcpBinding> <binding name="CertificateWithTransport" maxBufferPoolSize="100000000" maxBufferSize="100000000" maxReceivedMessageSize="100000000" portSharingEnabled="true"> <readerQuotas maxDepth="100000000" maxStringContentLength="100000000" maxArrayLength="100000000" maxBytesPerRead="100000000" maxNameTableCharCount="100000000" /> <security mode="Transport"> <transport clientCredentialType="Certificate" protectionLevel="EncryptAndSign"/> </security> </binding> </netTcpBinding> </bindings> Thanks      -= JL =-

transport size limit for WCF

Hi, I am returning a Cashflow object from a WCF service, like this. [OperationContract] [ServiceKnownType(typeof(Cashflow))] Cashflow GetCashflow();   The cashflow objects contains a list of double values. After receiving the cashflow object in the WCF client, i am printing the double values contained in it in a text   file. It works well, till the file size is around 500 kb. If the cashflow object is bigger, meaning, the list contains more double values, I get an exception "An error occurred while receiving the HTTP response to http://server.corp.net:1000/service.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." When I saw the logs in the IIS, the sc-status was 200 and sc-win32-status was 64. I have put maxReceivedMessageSize as 2147483648 in the config file of the client. I am using the wsHttpBinding. I think that I am getting the error coz I am trying to transport a large amount of data through WCF. But in that case the standard error is "The maximum message size quota for incoming messages has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element." Is it possible in some way to return very large data objects

"net.local" transport in Windows Service



I have been trying the LocalChannel (Channels Extensibility) sample provided with the RC version of .NET 4.0.

For some reason, the channel extension code provided by the sample does not work when hosted in a Windows (NT) service. The WCF client sends the message to the WCF server, but the ServiceHost does not even instantiate a Service instance.

The sample runs fine when hosted in a Console application. What is the reason it does not work in a Windows service?


why WCF uses the term "transport schema" in address?


Any thing new than the original term "transport protocol"?

The transport failed to connect to the server


Server Error in '/' Application.

The transport failed to connect to the server.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Runtime.InteropServices.COMException: The transport failed to connect to the server.

Source Error: 

Line 32:         objEmail.BodyFormat = MailFormat.Text
Line 33:         SmtpMail.SmtpServer = "mail.Wherever.com"

transport layer error



We have an issue when exporting an olap report as a .gif file by using OWC 2003 object. To export we are using 'ExportPicture' method of OWC object.  But we are getting following error


- An error was encountered in the transport layer.
- The peer prematurely closed the connection


We are using SSAS 2005 server.

We already tried some attempts, but they did not help:

  • The IE in client side already set : Enable Access Data Sources across domains in Security Settings
  • The connection string from OWC to Data Source is:
  • We are using MSOLAP.3 provider.
  • On Server Side, in SQL Native Client Configuration, the TCP/IP is set Enabled
  • Microsoft SQL Server 2005 Analysis Services 9.0 OLE DB Provider is already on the ssas 2005 server.
  • In the server side, in Registry, below HKEY_CLASSES_ROOT \ MSOLAP \ CLSID has the same value with HKEY_CLASSES_ROOT \ MSOLAP.3 \ CLSID

Any suggestions on how to proceed.

Silverlight and WCF 'simple question' (right), involving https vs transport security


Two questions:  I’m familiar with WCF and using it with Silverlight, https:, and I have a remote web server that I have a SSL / TLS certificate on.


I want to encrypt login and/or data to and from the web server.  Already I can do this on localhost, using this video:  http://www.silverlight.net/learn/videos/silverlight-videos/using-aspnet-secure-services-and-applications-services/

    (“In this video, Tim Heuer demonstrates two important features of Silverlight and ASP.NET, using secure web services and using ASP.NET application services from within Silverlight. This demonstration walks through securing services and interacting with the ASP.NET authentication services to restrict use as well as directly interact with ASP.NET application services from within a Silverlight application.”)

 Also I have reviewed this video on localhost:


Windows 2008 Server: Authentication failed because the remote party has closed the transport stream


Hi, I am trying to use TLS to connect to the Windows 2008 Server from windows XP, I set Authentication=False.

It throws the below authentication exception when connected to WIN 2008 Server with SP2, where as it used to work fine with WIN 2003:

System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

Below is the sample code.


protected Stream stream;

IPEndPoint ipe = new IPEndPoint(addr, port);

Socket socket = new Socket(ipe.AddressFamily, SocketType.Stream, ProtocolType.Tcp);


socket .SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.KeepAlive, options.keepAlive);
socket .LingerState = new LingerOption(options.lingerTime >= 0, options.lingerTime >= 0 ? options.lingerTime : 0);
socket .NoDelay = options.noDelay;

stream = new SslStream(stream, false, new RemoteCertificateValidationCallback(true), null);


I am using .Net 3.0 Frame work & VS 2005

Any help over here is highly appreciated.



A transport-level error has occurred when sending the request to the server. (provider: TCP Provider


Hi all,

I use Asp.Net 2.0 and SQL server 2000 and I get the above error in my site.I went through the other posts and reply.It is said to clear the connection pools.So i need a clear view what that will do.When should i actually clear it.Will Clearing the pools introduce any other problem or is there any othere solution for this. Please help me in solving this.



Problem with Implementing Transport Message Security with WCF 4.0 and VS 2010



I'm working on a tree tier project in this solution I have tree project ,

the Service layer,the ServiceContract Layer and presentation layer

At first I implemented it without security and it worked  properly,

But when I tried to add Transport Message security with SSL I faced some problem here is some of my code :

web.config in service layer:



Applying transport rule on System.Net.Mailmessage C# email

I want to apply transport rule to block the recipients(DRM/IRM-Information Rights Management/Permission settings) from forwarding email received from a specific sender, is there a way to do this in MailMessage class itself instead of enabling this option at exchange server.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend