הערה
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות להיכנס או לשנות מדריכי כתובות.
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות לשנות מדריכי כתובות.
Question
Thursday, September 4, 2014 10:24 AM
Hello
First of all please let me say sorry if this is in the wrong forum and please relocate it if neccessary.
Ok so I have a small vb.net application that runs on a timers and does a xmlhttp.send() when the timer ticks
On my developement machine, Windows 7 64bit in debug and release it works fine and I get my expectedreturned_value however I deploy this by one click and when the timer ticks on the Live server, Windows server 2012 64bit i get the excelption error "the parameter is incorrect"
Here is my code snippet
Try
Dim strPostData As String
Dim objRequest As Object
strPostData = xml
'objRequest = New MSXML2.XMLHTTP
objRequest = CreateObject("MSXML2.XMLHTTP.3.0")
With objRequest
.Open("POST", url, False)
.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
.send(strPostData)
returned_value = .responseText
End With
Catch ex As Exception
MsgBox("Error in Try Send " & RN & vbCrLf & "Error Message = " & ex.Message & vbCrLf & "Return Value = " & returned_value)
Exit Sub
End Try
I have also tired
objRequest = CreateObject("MSXML2.ServerXMLHTTP")
objRequest = CreateObject("MSXML2.XMLHTTP.3.0")
I am at a loss, any help would be great
thanks
Alan
All replies (5)
Thursday, September 4, 2014 1:51 PM ✅Answered
The next thing I would do is make from the parameters instead of variables fixed values.
Success
Cor
Friday, September 5, 2014 5:57 AM ✅Answered
Hi Checkprint,
Using MSXML with .NET is not recommended, please refer to here for more information: http://support.microsoft.com/kb/815112
For your requirement, it will work well by using WebRequest instead of xmlhttp, please see this artile about how to send Data Using the WebRequest Class:
#How to: Send Data Using the WebRequest Class
http://msdn.microsoft.com/en-us/library/debx8sh9(v=vs.110).aspx?cs-save-lang=1&cs-lang=vb#code-snippet-27
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.
Friday, September 5, 2014 9:04 AM ✅Answered
Hi Checkprint,
Using MSXML with .NET is not recommended, please refer to here for more information: http://support.microsoft.com/kb/815112
For your requirement, it will work well by using WebRequest instead of xmlhttp, please see this artile about how to send Data Using the WebRequest Class:
#How to: Send Data Using the WebRequest Class
http://msdn.microsoft.com/en-us/library/debx8sh9(v=vs.110).aspx?cs-save-lang=1&cs-lang=vb#code-snippet-27We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.
Thank you very much for your reply ..... worked a treate
Thursday, September 4, 2014 10:41 AM
I would first check if the used Net frameworks are the same
Success
Cor
Thursday, September 4, 2014 12:49 PM
Cor
Thanks for the advice, I thought it might be something to do witht the framework so I changed ti from 2.0 to 3.5 still no joy
My development machine is 2.0.5727.5420
Live Machine is 2.0.5727.4927
Surely there is not alot of difference in these minor release?
Any other thoughts?