MessageSecurityException was unhandled

Just encountered this while attempting to call an ‘https’ web service that required NTLM authentication. Exception text: “The HTTP request is unauthorized with client authentication scheme ‘Anonymous’. The authentication header received from the server was ‘Negotiate,NTLM’.” Solution: Changed clientCredentialType to ‘windows’. Do this in the app.config. Changed from: <security mode=”Transport”>    <transport clientCredentialType=”None” proxyCredentialType=”None”        realm=”” />   …

1

NetDispatchFaultExcetion was unhandled

I just came across this whilst making a web service call from a Windows Forms client application. Exception text: “The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:GetWizardInfoResponse. The InnerException message was ‘There was an error deserializing the object of type DataManagementConsoleFileProducer.RegSysWebService.GetWizardInfoResponseBody. The…

1

Incorrect Syntax near ‘GO’… SqlCommand.ExecuteNonQuery();

Whilst building an ‘custom action’ to install a database, I encountered a SqlException (“Incorrect syntax near…”) when calling ExecuteNonQuery(). To solve the problem process sql commands separately (using ‘GO’ as a delimiter). Thankfully parsing the “.sql” file into commands is fairly straight forward:   string[] commands = sql.Split( new string[]{“GO\r\n”, “GO “, “GO\t”}, StringSplitOptions.RemoveEmptyEntries );…

2