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

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

The handshake failed due to an unexpected packet format

Posted By:      Posted Date: September 17, 2010    Points: 0   Category :.NET Framework
Hi, I have a thick client deployed on a bunch of remote sites, and they all use a central web service (https - the client just default accepts the cert). One site has a proxy and works fine (the software has a proxy config area). Another site has a proxy as well, however on the test machine when they try and login after entering their proxy details, they receive this error; "The handshake failed due to an unexpected packet format." Does anyone have any idea? The web service still works for the other remote clients so i think it might be coming from the proxy? Or the proxy is doing something to my traffic before it sends it out? I cannot replicate this error and cannot visit or get a remote login to this particular external site, so its very hard to troubleshoot!! Any info anyone could give on this would be great!!

View Complete Post

More Related Resource Links

While dispose the com+, encounter error: failed due to the following error: Old format or invalid ty

I have web service to invoke com+ to do business layer checking. recently, the application encountered intermittently the following error while tried to dispose the com+ instance. Appreciate anyone who help for this. thanks!   System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'System.IDisposable'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{805D7A98-D4AF-3F0F-967F-E5CF45312D2C}' failed due to the following error: Old format or invalid type library. (Exception from HRESULT: 0x80028019 (TYPE_E_UNSUPFORMAT)).   Server stack trace:    at System.IDisposable.Dispose()    at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)    at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)    at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)   Exception rethrown at [0]:    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage

Failed to add relation(s) Unexpected error

I am getting the following error message when using the Data Source Configuration Wizard in Visual Studio 2008 to create a connection to a MySQL database.Failed to add relation(s) Unexpected error.I have found a KB article (KB954740) on the problem, but can not seem to find the fix.I have just started using Visual Studio but I am knowledgeable with VB from many years of work in Microsoft Access.Thanks in advance for any help you may provide,Ricky HicksMicrosoft Access MVP 2005, 2006, 2007, 2008, 2009 Ricky Hicks

SSPI handshake failed with error code 0x80090311



Yesterday, all of a sudden, I received 15 alerts from my sql2k8 R2 64bit with the same content as follows:

DATE/TIME:       9/27/2010 8:54:01 PM


DESCRIPTION:   SSPI handshake failed with error code 0x80090311, state 14 while establishing a connection with integrated security; the connection has been closed. Reason: AcceptSecurityContext failed. The Windows error code indicates the cause of failure.  [CLIENT: <named pipe>].

How can this be troubleshooted. I can access my sql withoiut any problem through sharepoint or SSMS.

The operation failed because an unexpected error occurred. (Result Code: 0x81071003)


Hi all,  I have a SINGLE web service that I call through two different programs.  I input the same values into the service and call a sevice method.  One call fails every time, one call works every time.  I have installed Fiddler2 and copied the requests and responses from each.  They are identical except for the [VsDebuggerCausalityData] header value and the [Authorization:] value (data below)  what is this error? What can I do to address it? Why does it work for one app, but not the other when the requests are the same.  I guess since the Authorization is different it could be a security problem. But I'm not so sure because I'm not getting a security type error.  The first trace is the working example (look at the response) the second is the failing call.  I have changed the Authorization values.

POST http://kerryportal/global/DMS/CRM/_vti_bin/Lists.asmx HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.4952)
VsDebuggerCausalityData: uIDPo+bNI0fMARFBsgZwKLhVCEUBAAAA2xBAL4gjpUWSP4dBtR8U/4q2nB9UKJVFvuCo3qZaaXUACQAA
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://schemas.microsoft.com/

SSPI handshake failed with error code 0x8009030c while establishing a connection with integrated sec


Logon Error: 17806, Severity: 20, State: 2.

SSPI handshake failed with error code 0x8009030c while establishing a connection with integrated security; the connection has been closed.


We are getting this error daily after i logged in to server.Recently we have created new login.So when login through this new one which is not domain one ,we are facing this problm.


kindly help me to remove this error. 

WCF client fails with The message received was unexpected or badly formatted and Decrypt failed with


I have written a console mode WCF client that contacts an Apache based web service that uses OpenSSL  0.9.8 tls or ssl3.
The WCF client uses client certificates on Windows 2008 SP2 x64. The client had been running for months with no problem, and then I started getting the errors below around Nov 8 2010 (below).
I have done my best to include all the details. Please read carefully.
The relevant traces, exceptions, code and config are included in this post.

1.) Fix it.
2.) Find out what 0X80090326 means.
3.) Find out what policies/acl's apply to the situation

The only thing I can be sure of that did not change is the code.

Can anyone point me toward the next step?

- The program executes as a local user (non-domain) that is in the Local Administrators group.
- I can display the server url using IE and Firefox, provided I have the certs installed for personal use.
- The certificates are installed in the LocalMachine store in "TrustedPeople" - NOT the user's location, the machine location. The local user finds the proper key, as the trace below will show.

What I have googled for:
- 0X80090326
- Decrypt failed with error 0X800

SSPI handshake failed with error code 0x8009030c while establishing a connection with integrated sec


Hello, I have a sql 2005 server, and I am a developer, with the database on my own machine.  It alwayws works for me but after some minutes the other developer cant work in the application

He got this error

Login failed for user ''. The user is not associated with a trusted SQL Server connection. [CLIENT:]

and When I see the log event after that error, it comes with another error.

SSPI handshake failed with error code 0x8009030c while establishing a connection with integrated security; the connection has been closed. [CLIENT:]

He has IIS5 and me too.

I created a user on the domain called ASPSYS with password, then in the IIS on anonymous authentication I put that user with that password, and it works, on both machines.


and in the connection string I have.

<add key="sqlconn"

Unexpected "Microsoft.SharePoint.SPListDataValidationException: List data validation failed."


Steps to replicate (I suspect it can be replicated with any list, not just a survey):

1. Create a survey
2. Go to Survey Settings / Validation Settings, enter a formula and a user message.
3. Respond to a survey. 
3.1. If a formula validation succeeds, a new survey response is created.
3.2. If a formula validation fails, I expect to see a user message created in step #2 above. Instead, I see an exception:

 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: Microsoft.SharePoint.SPListDataValidationException: List data validation failed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


How To Set a Date Format In GridView Using ASP.NET 2.0

A very common desire is to set a column of a gridview to display just the month, day and year of a DateTime type. The problem is the by default, the HtmlEncode property of the boundfield attribute (
The problem is that if this field is enabled, you can not pass format information to the boundfield control. That is, if you try the following code, you will not get the desired result.

How to format and update GridView and DataGrid rows using JQuery

The behavior described in this question is as expected. When you set text of a cell in grid, it directly affects HTML that is going to be rendered. When you set text value of a cell, it means that you are setting innerText of the cell. The column that GridView creates for command fields (Edit, Delete and Select) are a (anchor) or button elements. So you can see what will happen if you set text value in that cell. It will wipe out those link or button controls and replace them with simple text string.

How to format datetime & date with century?

Execute the following Microsoft SQL Server T-SQL datetime, date and time formatting scripts in Management Studio Query Editor to demonstrate the usage of the multitude of temporal data formats available and the application of date / datetime functions.


Program for Format Conversion of An Image

.NET provides extensive support for image conversion. Any image can be processed from one format to another. Most common formats to which .NET have support for are .BMP, .EMF, .GIF, .ICO, .JPG, .PNG, .TIF and .WMF.

Get pixel format, raw format, property id list and property items image in VB.net - C#.net.

n this simple article you will learn that how we can get pixel format, raw format, property id list and property items image in VB and C#.net.

Get Pixel Format:

Image consists of pixels to get the format of the pixel we have a property named pixel format. This property returns an enumeration of pixel format. This enumeration tells the pixel format.

To demonstrate make a window application. Drag one button and a picture box on form.

Now write the following code on Button click event:

Format Generic List Bound to Gridview


I have a generic list of a custom type. The custom type has a string and double.

I'm binding the list to a gridview and it outputs everything fine.

I'm trying to format the double column into a currency format. It is in a template field as I'm calculating a running total. I pass the value to a function that returns a double and adds the current value to a running total which I will show in the footer.

The format is not changing to currency as expected when using String.Format("{0:c}", GetTotal(Convert.ToDouble(Eval("Amount"))))

Any ideas on what might be going on and how to fix this?


Sys.Net.WebServiceFailedException: The server method '' failed with the following error:



Let's say we have 2 time consuming functions, aaa and aaa1 inside a aspx page.

        public static string aaa(int i)
            return i.ToString();

        public static string aaa1(int i)
            return i.ToString();



        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
        <span id="displayspan"></span>
        <br />
        <input type="button" value=

WebMatrix conversion failed when converting from a character string to uniqueidentifier?


I am trying to retrieve xml from a small function in my .cshtml page. Its throwing me an error. This however, runs fine in a console/form environment.

It takes 3 parameters and 1 exception.

myDll.GetXML(year, username, uniqueidentifier, out ex);

When I run this page I get the error, "Conversion failed when converting from a character string to uniqueidentifier."

Or a stack of.

System.Data.SqlClient.SqlException (0x80131904): Conversion failed when converting from a character string to uniqueidentifier.

   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)

   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)

   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()

   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)

   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()

   at System.Data.SqlClient.SqlDataReader.get_MetaData()

   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)

   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBeha

Failed to create AppDomain


Recently updated my system to use Visual Studio 2010, and projects will no longer compile. All of them give the error "Failed to create AppDomain." Intellisense does not work either (except for standard HTML tags), and individual pages will also not compile.

Points of note:

  • All sites are hosted on UNC shares (although it doesn't work on a new site created on local drive either)
  • Language is mostly C#
  • No explicit code is creating AppDomain objects
  • Sites compiled fine under both VS 2005 and 2008 both before and after VS 2010 installation
  • Sites compile and run fine from the IIS server on the remote machines (one IIS 6, one IIS 7)

Things I've tried (some obviously shouldn't have any bearing on it, but I've tried just about everything that anyone suggested on any forum I could find, most of which seemed to apply to IIS, not VS):

  • renaming/deleting security.config
  • running caspol -reset
  • re-registering asp.net: aspnet_regiis.exe -ua / aspnet_regiis.exe -i
  • removing VS 2005, 2008, 2010, and then re-installing just VS 2010
  • adding the UNC path to the local intranet zone (internet options control panel)
  • adding the UNC path to LocalIntranet_Zone in the ASP.Net 2.0 control panel (runtime security policy/machine/al
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