DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Thu, 23 Aug 2007 16:22:10 +0200,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    Mateo


REquest/response problem....   
Hi!

I have communication from asp.net aplication with some service on other 
server.... I send them data, and they return me some data. I have to take 
recived data and forward it to third server UNCHANGED!

This is my problem. When I receive first response with Request("Data"), 
store it to the string variable and then I forward that data to third server 
with HttpWebResponse   it looks like this data is changed! It is actually 
ancrypted data which can not be encripeted on third server becouse it is 
changed during transmition.

This is how I forward my data:

Cold this be problem with code page or something???? Third server is using 
utf-8 code page.... I use utf8 to....

Try

Dim sbHTMLResponse As New StringBuilder

Dim byte_data As Byte() = Encoding.UTF8.GetBytes(sFormData.ToString)

Dim NewRequest As HttpWebRequest = CType(WebRequest.Create(sUrl), 
HttpWebRequest)

NewRequest.Method = "POST"

NewRequest.ContentType = "application/x-www-form-urlencoded"

NewRequest.ContentLength = byte_data.Length

NewRequest.AllowAutoRedirect = False 'kad saljemo webtehu

Dim oNewRequestStream As Stream = NewRequest.GetRequestStream()

oNewRequestStream.Write(byte_data, 0, byte_data.Length)

oNewRequestStream.Close()

Dim oHttpWebResponse As HttpWebResponse = CType(NewRequest.GetResponse(), 
HttpWebResponse)

Dim oNewResponseStream As Stream = oHttpWebResponse.GetResponseStream()

sbHTMLResponse.Append(New StreamReader(oNewResponseStream).ReadToEnd())

oNewResponseStream.Close()

Return sbHTMLResponse.ToString



Catch ex As Exception

'neka onda funkcija samo vrati nas gn_NoData

Return bcommon.gnNO_DATA.ToString

End Try
Date:Thu, 23 Aug 2007 16:22:10 +0200   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us