Having problems translating VB6 to VB.NET (Visual Studio 2005)
Error: "The server committed a protocol violation"
Tried it with 2 different URL's same as in original code.
One works, the other doesn't.
For security reasons I can't give the exact URL but this is what the failed URL looks like:
The succesful URL only differs in page_without_extension and parameters, the key and such are the same.
innerText and innerXML is filled with sensible data for the succesful page.
When I try the bad URL in IE, firefox or VB6 it does work.
Set m_xmlChain = New DOMDocument30
s = False
m_xmlChain.async = True
m_Done = False
While Not m_Done
Private Sub m_xmlChain_onreadystatecha
If m_xmlChain.readyState = 4 Then
m_Done = True
m_xmlChain = New XmlDocument
ls = False ' my attempt to translate this line is in next 3 lines
Dim resolver As New XmlUrlResolver()
resolver.Credentials = CredentialCache.DefaultCre
m_xmlChain.XmlResolver = resolver
e = False ' how to translate?
'm_xmlChain.async = True ' how to translate?
Catch ex As Exception
Follow up Q: