WCF Client Inner Exception: "The Security Support Provider Interface (SSPI) negotiation failed."

Creating a WCF Client in Visual Studio 2010, I struggled with this error.  I was running as the currently logged on user and the service was as well so this made no sense to me.  I found that this entry in the client app.config was the culprit: <identity><userPrincipalName value=”MYDOMAIN\MyUsername” /></identity> Simply deleting these 3 lines…

20

WinHttp Proxy Settings in 64 Bit (x64) Environments

There are two settings for WinHttp Proxy settings for a 64 Bit OS.  One applies to the 64 bit environment and one for the 32 bit environment.  You can use netsh for Windows 2008, Windows 7 and later OSes and proxycfg.exe for earlier OSes.  If you are confused and not sure where your WinHttp application…

6

Understanding Problems with MS10-049, KB 980436 and IETF RFC5746

Understanding Problems with MS10-049, KB 980436 and IETF RFC5746 Microsoft released a Security update MS10-049: Vulnerabilities in SChannel could allow remote code execution. This update patches vulnerabilities in SChannel (TLS) that can be exploited (see: CVE-2009-3555). Read the RFC and CVE articles to understand what vulnerability this is addressing: http://tools.ietf.org/html/rfc5746 http://tools.ietf.org/html/draft-ietf-tls-renegotiation-03 There are some ancient…

8

How to Programmatically add a QueryTable and Data Connection to Excel

I needed to create an Excel Spreadsheet with a Connection object and link a QueryTable to it.  I could not find a good example of this so I thought I would share.  Please drop me a note if you found this useful! Code listing for sample (Copy Code):         private void createProdSheet(string topicText, bool debugView)        {           …

4

Cannot Log on to MSDN Blog site

OK, I am a dummy.  I spent 30 minutes trying to associate my account with the MSDN Blog sign in so I could author a blog.  Since the change of the site it asks you for your screen name and password.  Since I have my Live account associated with the Blog, I thought it wanted…

1

How to iterate (list) all selected items in a Databound ListBox in .NET 4.0 Winforms

A seemingly easy thing to do that I could not find documentation for! string astr;foreach (DataRowView aRow in listBox1.SelectedItems ){    astr = aRow[“TopicId”].ToString();    astr = aRow[“TopicText”].ToString();} TopicId and TopicText are the name of the columns in the table of the Datasource that has been bound to the listbox control. Drop me a note if you…

3

URL Rewrite 2.0 Rule can prevent Images from displaying on WebControls like TreeView

I was excited to try URL Rewrite to create some rules on my internal web site.  I added a rule to map a query string like http://mysite/treepage.aspx?nodeName=RedColors to http://mysite/RedColors .  After doing this I found that the images of the treeview web control now did not display.  I enabled FREB tracing and found that this…

0

.NET 2.0 HttpWebRequest does not use the https Proxy from Internet Explorer Settings

The .NET framework version 2.0 has the ability to get the IE proxy Settings and use them when making a WebRequest.  However it only will read the http static proxy and not use the https value when specified.  See this example: I would expect this code to return http://secureproxy:8080 for the proxy when I specify …

2