bigbillydotcom
asked on
does XMLHTTP work over HTTPS
I recently discovered (well..for myself!) the XMLHTTP object and fell in love
I thought I had finally found a way to leverage my server side scripting without having to postback pages
and I could use client side vbscript (we require our users to use IE6)
I could just send the requests off and have them write back without leaving the page
It was all working so well - I completed an entire module, then uploaded it to my SSL secured website
but then
IT DIDNT WORK (That's love for ya)
Well...thats not precisely correct - The functions that only "read" data worked fine, but the functions that called asp pages that did add/change/delete functions would just not return anything - no errors - no other signs of problems - the pages just didnt process
For instance
- I created a function to get the description of an item from the database, which i would then write to a textbox
-----That worked on development server and SSL server - no problem!
- I created a function to delete an item from the database
-----That worked on development server - but NOT THE SSL server - Problem!
I did read in some documentation that it doesnt work over SSL (wish I would have read it first), but I wonder why it worked for the "read" functions, but none of the "add/change/delete" functions would work
Here is an example of a "add" function that WOULD work o nthe development server, but WOULD NOT work on SSL server
<SCRIPT LANGUAGE=vbscript>
function AddTrkOpt()
Dim objXMLHTTP, xml,resvar
' Create an xmlhttp object:
Set xml = CreateObject("Microsoft.XM LHTTP")
' Opens the connection to the remote server.
urlStr = "AutoStepAddTrkOpt.asp?Hdr Ref="+cstr (document. thisForm.A ddBLTrkOpt s.value)
xml.Open "get", urlStr, False
' Actually Sends the request and returns the data:
xml.Send
'when page processes correctly, it will return a value of "done"
if xml.responseText = "done" then
'call function to create listbox of all items
call GetAllBox
'call function to create listbox of selected items
call getselbox
'clear all item description textbox
document.thisForm.TrkOptDe sc.value=" "
'clear selected item description textbox
document.thisForm.TrkOptDe scSel.valu e=""
end if
Set xml = Nothing
end function
</script>
Now - that script worked on development server (Non-SSL), but on the SSL server, it would return with "done", but the actual database "insert" never took place
SO - HAS ANYBODY HAD ANY EXPERIENCE WITH GETTING THE ADD/CHANGE/DELETE METHODS TO WORK ON SLL USING THE XMLHTTP OBJECT?
I thought I had finally found a way to leverage my server side scripting without having to postback pages
and I could use client side vbscript (we require our users to use IE6)
I could just send the requests off and have them write back without leaving the page
It was all working so well - I completed an entire module, then uploaded it to my SSL secured website
but then
IT DIDNT WORK (That's love for ya)
Well...thats not precisely correct - The functions that only "read" data worked fine, but the functions that called asp pages that did add/change/delete functions would just not return anything - no errors - no other signs of problems - the pages just didnt process
For instance
- I created a function to get the description of an item from the database, which i would then write to a textbox
-----That worked on development server and SSL server - no problem!
- I created a function to delete an item from the database
-----That worked on development server - but NOT THE SSL server - Problem!
I did read in some documentation that it doesnt work over SSL (wish I would have read it first), but I wonder why it worked for the "read" functions, but none of the "add/change/delete" functions would work
Here is an example of a "add" function that WOULD work o nthe development server, but WOULD NOT work on SSL server
<SCRIPT LANGUAGE=vbscript>
function AddTrkOpt()
Dim objXMLHTTP, xml,resvar
' Create an xmlhttp object:
Set xml = CreateObject("Microsoft.XM
' Opens the connection to the remote server.
urlStr = "AutoStepAddTrkOpt.asp?Hdr
xml.Open "get", urlStr, False
' Actually Sends the request and returns the data:
xml.Send
'when page processes correctly, it will return a value of "done"
if xml.responseText = "done" then
'call function to create listbox of all items
call GetAllBox
'call function to create listbox of selected items
call getselbox
'clear all item description textbox
document.thisForm.TrkOptDe
'clear selected item description textbox
document.thisForm.TrkOptDe
end if
Set xml = Nothing
end function
</script>
Now - that script worked on development server (Non-SSL), but on the SSL server, it would return with "done", but the actual database "insert" never took place
SO - HAS ANYBODY HAD ANY EXPERIENCE WITH GETTING THE ADD/CHANGE/DELETE METHODS TO WORK ON SLL USING THE XMLHTTP OBJECT?
You may want to consider using the ServerHTTPRequest object.
ASKER
thanks ac - but that would require page roundtrips -right, since it is a server object
what i am trying to emulate is the AJAX style interface where
the client page doesnt refresh - they just interact wit hthe page and it runs off and does its thing
behind the scenes
It works brilliantly under http, but the add/change/delete routines dont process when the url is secured with https
what i am trying to emulate is the AJAX style interface where
the client page doesnt refresh - they just interact wit hthe page and it runs off and does its thing
behind the scenes
It works brilliantly under http, but the add/change/delete routines dont process when the url is secured with https
I suggest you read up on the differences between ServerHTTPRequest and the XMLHTTP objects.
ASKER
thanks ac
I have
am i missing something?
I thought ServerHTTPRequest is a server side object - right?
that would mean a page refresh on any call using ServerHTTPRequest - right?
I need to make calls to and from client side vb
Like i said - works perfect under HTTP but not HTTPS
I have
am i missing something?
I thought ServerHTTPRequest is a server side object - right?
that would mean a page refresh on any call using ServerHTTPRequest - right?
I need to make calls to and from client side vb
Like i said - works perfect under HTTP but not HTTPS
Again I would suggest you re-read the differences between the two objects they are fundementally different and have nothing to do with whether you do a page refresh or not.
I am not going to get into another byzantine debate with you, so I will leave it at that.
I wish you the best of luck.
I am not going to get into another byzantine debate with you, so I will leave it at that.
I wish you the best of luck.
ASKER
>>I am not going to get into another byzantine debate with you, so I will leave it at that.
thanks - i prefer answers to questions vs your method of debating and never getting anywhere
again - the questions was
SO - HAS ANYBODY HAD ANY EXPERIENCE WITH GETTING THE ADD/CHANGE/DELETE METHODS TO WORK ON SLL USING THE XMLHTTP OBJECT?
if you havent please refrain from posting
thanks
bbdc
thanks - i prefer answers to questions vs your method of debating and never getting anywhere
again - the questions was
SO - HAS ANYBODY HAD ANY EXPERIENCE WITH GETTING THE ADD/CHANGE/DELETE METHODS TO WORK ON SLL USING THE XMLHTTP OBJECT?
if you havent please refrain from posting
thanks
bbdc
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
now thats an answer and i am motivated
could i bother you for some code??
could i bother you for some code??