Click here to Skip to main content
15,887,477 members
Home / Discussions / Visual Basic
   

Visual Basic

 
SuggestionRe: Excel VBA Function runtime error 1004: Application-defined or object-defined error Pin
Richard MacCutchan3-Jul-15 21:28
mveRichard MacCutchan3-Jul-15 21:28 
QuestionPublic Delegate Sub Action(Of T) (obj As T) Pin
Member 1171394230-Jun-15 20:23
Member 1171394230-Jun-15 20:23 
AnswerRe: Public Delegate Sub Action(Of T) (obj As T) Pin
Richard MacCutchan30-Jun-15 21:21
mveRichard MacCutchan30-Jun-15 21:21 
QuestionFirstData G4 V14 HMAC Header Pin
jkirkerx29-Jun-15 13:47
professionaljkirkerx29-Jun-15 13:47 
AnswerRe: FirstData G4 V14 HMAC Header Pin
Jörgen Andersson29-Jun-15 20:17
professionalJörgen Andersson29-Jun-15 20:17 
GeneralRe: FirstData G4 V14 HMAC Header Pin
jkirkerx30-Jun-15 6:49
professionaljkirkerx30-Jun-15 6:49 
GeneralConclusion - XMLWriter, UTF16 and XML empty element short form. Pin
jkirkerx5-Jul-15 8:54
professionaljkirkerx5-Jul-15 8:54 
AnswerRe: FirstData G4 V14 HMAC Header - Issue 1: Pin
jkirkerx30-Jun-15 11:10
professionaljkirkerx30-Jun-15 11:10 
I got issue 1 to calculate right finally.
I pasted the actual content into a string calculated against it, and changed the type to text/xml.

This part of the code doesnt work right. That's what I get for copying code from the internet.
The XML stuff, doesn't appeared to be used at all, so I'm not sure of the purpose of it.
I guess the question is, how to get the body from the copy of the request?, to calculate against.
Public Function BeforeSendRequest( _
        ByRef request As Message,
        ByVal channel As IClientChannel) As Object Implements IClientMessageInspector.BeforeSendRequest

        Dim buffer As MessageBuffer = request.CreateBufferedCopy(Int32.MaxValue)
        request = buffer.CreateMessage

        Dim msg As Message = buffer.CreateMessage
        Dim encoder As ASCIIEncoding = New ASCIIEncoding

        Dim sb As StringBuilder = New StringBuilder
        Dim xmlSettings As New XmlWriterSettings
        xmlSettings.OmitXmlDeclaration = True

        Dim xmlWriter As XmlWriter = xmlWriter.Create(sb, xmlSettings)
        Dim writer As XmlDictionaryWriter = XmlDictionaryWriter.CreateDictionaryWriter(xmlWriter)

        msg.WriteStartEnvelope(writer)
        msg.WriteStartBody(writer)
        msg.WriteBodyContents(writer)
        xmlWriter.WriteEndElement()
        xmlWriter.WriteEndElement()

        writer.Flush()

        Dim body As String = sb.ToString.Replace(" />", "/>")
        Dim xml_bytes() As Byte = encoder.GetBytes(body)

GeneralUpdate - got the calc to work now with the request message Pin
jkirkerx1-Jul-15 7:38
professionaljkirkerx1-Jul-15 7:38 
AnswerCan't get the hashed content right Pin
jkirkerx1-Jul-15 12:39
professionaljkirkerx1-Jul-15 12:39 
QuestionExecute multiple sql queries with one database hit Pin
satc27-Jun-15 19:53
satc27-Jun-15 19:53 
AnswerRe: Execute multiple sql queries with one database hit Pin
Sascha Lefèvre27-Jun-15 22:04
professionalSascha Lefèvre27-Jun-15 22:04 
GeneralRe: Execute multiple sql queries with one database hit Pin
satc27-Jun-15 22:49
satc27-Jun-15 22:49 
GeneralRe: Execute multiple sql queries with one database hit Pin
Sascha Lefèvre27-Jun-15 23:15
professionalSascha Lefèvre27-Jun-15 23:15 
GeneralRe: Execute multiple sql queries with one database hit Pin
satc27-Jun-15 23:28
satc27-Jun-15 23:28 
GeneralRe: Execute multiple sql queries with one database hit Pin
Sascha Lefèvre28-Jun-15 1:11
professionalSascha Lefèvre28-Jun-15 1:11 
GeneralRe: Execute multiple sql queries with one database hit Pin
Dave Kreskowiak28-Jun-15 2:17
mveDave Kreskowiak28-Jun-15 2:17 
GeneralRe: Execute multiple sql queries with one database hit Pin
satc28-Jun-15 2:20
satc28-Jun-15 2:20 
GeneralRe: Execute multiple sql queries with one database hit Pin
Dave Kreskowiak28-Jun-15 10:40
mveDave Kreskowiak28-Jun-15 10:40 
GeneralRe: Execute multiple sql queries with one database hit Pin
Dave Kreskowiak28-Jun-15 2:09
mveDave Kreskowiak28-Jun-15 2:09 
GeneralRe: Execute multiple sql queries with one database hit Pin
satc28-Jun-15 2:12
satc28-Jun-15 2:12 
QuestionCreate a kind of "recovery script" for a deleted object in Entity Pin
satc27-Jun-15 19:06
satc27-Jun-15 19:06 
AnswerRe: Create a kind of "recovery script" for a deleted object in Entity Pin
Dave Kreskowiak27-Jun-15 19:34
mveDave Kreskowiak27-Jun-15 19:34 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
satc27-Jun-15 19:40
satc27-Jun-15 19:40 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
Richard MacCutchan27-Jun-15 21:16
mveRichard MacCutchan27-Jun-15 21:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.