|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
base64 encoding problem
<i><b>Originally posted by : Dilip (dilipp@tidan-solutions.com)</b></i><br />Can anybody help me or advise me with the problem i am running into.<br />What i am trying to do is to decode a base 64 encoded string. I am posting the value to a .net webservice via serverxmlhttp,with a simple soap message. if i hard code the encoded string it works fine but if i read the value from a querystring somehow it doesnt work. <br /><br />so question is, is there anything special i need to do to save the encoding when i read from a form element or a querystring?<br /><br />here is a sample soap message am posting via serverxmlhttp:<br />cPost="<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>"<br />cPost=cPost & "<soap:Body encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' use='encoded'>"<br />cPost=cPost & "<Decrypt xmlns='http://tempuri.org/security'>"<br />cPost=cPost & "<Data>" & szData & "</Data>"<br />cPost=cPost & "</Decrypt>"<br />cPost=cPost & "</soap:Body>"<br />cPost=cPost & "</soap:Envelope>"<br /><br /><br /><br />if i hardcode the encoded string to decode in place of szData variable it works. but if i read the value from querystring and store it in szData variable the encoding is no longer base64.<br /><br />please help..<br /><br />Thank you<br /><br />Dilip
|
|
#2
|
|||
|
|||
|
<i><b>Originally posted by : Richard</b></i><br />Try: szData = Server.URLEncode(Request.QueryString("data"))<br /><br /><br />------------<br />Dilip at 7/28/2002 8:32:35 AM<br /><br />Can anybody help me or advise me with the problem i am running into.<br />What i am trying to do is to decode a base 64 encoded string. I am posting the value to a .net webservice via serverxmlhttp,with a simple soap message. if i hard code the encoded string it works fine but if i read the value from a querystring somehow it doesnt work. <br /><br />so question is, is there anything special i need to do to save the encoding when i read from a form element or a querystring?<br /><br />here is a sample soap message am posting via serverxmlhttp:<br />cPost="<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>"<br />cPost=cPost & "<soap:Body encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' use='encoded'>"<br />cPost=cPost & "<Decrypt xmlns='http://tempuri.org/security'>"<br />cPost=cPost & "<Data>" & szData & "</Data>"<br />cPost=cPost & "</Decrypt>"<br />cPost=cPost & "</soap:Body>"<br />cPost=cPost & "</soap:Envelope>"<br /><br /><br /><br />if i hardcode the encoded string to decode in place of szData variable it works. but if i read the value from querystring and store it in szData variable the encoding is no longer base64.<br /><br />please help..<br /><br />Thank you<br /><br />Dilip
|
![]() |
| Viewing: ASP Free Forums > Programming > .NET Development > base64 encoding problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|