473,738 Members | 3,636 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Httprequest.inp utstream from mobile

1 New Member
i am using mobile for communication with live server
when mobile send its information to server the input stream is encoded in utf-8
that is converted into string but it is still not understandable
so chk it what should i do to convert such type of data


Stream str;
string strmContents= "";
int counter, strLen, strRead;

// Create a Stream object.
str = context.Request .InputStream;
_request.WriteL ine("Stream direct input stream:" + str.ToString()) ;
// Find number of bytes in stream.
strLen = (int)str.Length ;
// Create a byte array.
byte[] strArr = new byte[strLen];
// Read stream into byte array.
strRead = str.Read(strArr ,0,strLen);
//_request.WriteL ine("Stream byte data:" + strArr.ToString ());
/*// Convert byte array to a text string.
for(counter = 0;counter<strLe n-1;counter++)
strmContents = strmContents + strArr[counter].ToString();

_request.WriteL ine("InputStrea m:" + strmContents+"\ ninoutstream length:"+Conver t.ToString(strL en));


Result: i got a string
InputStream:200 106294547478389 786777764747688 468328312111099 777632494649474 769781091081133 494649011143831 211109977764749 464901101349495 553495455555557 019134901110873 104116116112584 747504850465651 464954574649495 347102105110971 084711512111099 471001011029711 710811646115121 110991091080111 038735153505349 504849575354545 548480186311497 104101101108011 789001713985452 018331151211109 910910858971171 161044598971151 059901100793991 097011190878611 579109494997717 011698877010701 190017635151484 801110010770753 490179350484901 841108739710010 098111111107011 103873971001009 811111110701190 016974301793490 111110070753500 179350484901841 108739997108101 110100971140111 038739997108101 110100971140119 001697430179349 011111009575351 019001713119981 201091080183397 112112108105999 711610511111047 118110100461151 211109910910845 100101118105110 102431199812010 910801100841038 734647100101118 105110102494901 179195134632001 062945474783897 867777647476884 683268101118731 101023249464947 476978741013494 649018137711111 611111411110897 326769443267111 112121114105103 104116325048484 801853765401943 825153494995719 548654653514649 658201803656585 715048564965670 173351535053495 048495753545455 484801753112104 111110101017193 397100100981111 111070190703116 101120116471204 511899971141000 110035046490119 870311610112011 647120451189997 114100011003504 649011959634901 963500111719339 997108101110100 971140190703116 101120116471204 511899971081011 101009711401100 349464801198703 116101120116471 204511899971081 011101009711401 100349464801195 963490196350011 169703116101120 116471204511899 971141000188366 697173780199386 676582680188369 786801993866765 826801883866982 837379780199350 464901883707801 883780188384697 601873808269700 187387798275018 737279776901873 676976760187386 736869790187370 658801873806571 698201873884577 798445827378717 368018836668658 901883656882018 736879770187372 797769018738779 827501873737884 760187380798384 657601873806582 676976018836977 657376018737378 846982786984018 838845777984456 765840188388457 779844577760188 367726582836984 017031161011201 164712045118999 710810111010097 114018836669717 378019938667657 669786865820199 386698669788401 883666971737801 993866765766978 686582019938669 866978840188386 698283737978019 934946480188366 697173780188369 786801883838577 776582890188368 848384658284018 836884697868018 836565766582770 188382828576690 188369886865846 901883676584697 179827369830188 380827379827384 890188368856901 883677977807669 846968018838384 658485830188367 726582836984011 1111181
inoutstream length:1274
Mar 30 '07 #1
0 1247

Sign in to post your reply or Sign up for a free account.

Similar topics

3
4639
by: HikksNotAtHome | last post by:
In Mozilla 1.4b, when the URL is set to a local URL, it works as expected. function showIt(){ var xmlhttp = new XMLHttpRequest(); xmlhttp.open("GET", "blank.html" ,true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { document.myForm.outputSource.value = xmlhttp.responseText; } }
4
11573
by: Daniel Rimmelzwaan | last post by:
I am having trouble getting the XML out of an HttpRequest object. I am sending the XML from biztalk into my aspx page, after which I want to take the XML out of it and process it using a MSXML.DOMDocument. I understand that in the Request object, it is stored as a binary, and I can't figure out how to translate it into a text string. Do I need to read it into a byte variable and then move it to the DOMDocument, or is there a method I...
1
2130
by: Matt | last post by:
Does anyone know how to get the whole request stream when data is posted to a web page? I need the HTTP Headers as well in the InputStream when receiving the data into my web page. I know I can get the HTTP headers from the collection but I would like to get the stream as a single item. Thanks, Matt
1
2265
by: SteveR | last post by:
I need some help getting started POSTing data from aspx page. From an aspx page (Send.aspx), I would like POST the contents of a file (i.e., file resides in some directory) to another page (Process.aspx). The other page would read the contents of the InputStream (?), process the data within the stream, and send a response back to the requesting URI. How do I form the request the request in Send.aspx?
0
1006
by: davidw | last post by:
Is there a way to get contentype from HttpRequest.InputStream? Thanks!
1
2025
by: Gunnar | last post by:
I am finding some unusual behavior with techniques I am using to show/hide/update data without having to refresh the page. I'm quite sure it's developer ignorance on my part and would be grateful for any suggestions. My page has 10 tables with their visibility controlled by the user making a menu selection. For example, selecting menu_1 calls a function which displays table_1 by setting table_1's style display: block and hides tables...
2
2758
by: jjouett | last post by:
I'm trying to setup an ASPX web page to service requests from an existing Java Client that posts multi-part data as a way to upload files, and I can't find a straightforward way to process the request. >From the HttpRequest, the Request.Form and Request.Files collections are empty. The Request.ContentType states the following: multipart/form-data, boundary=012AhbCfFg225929 and using the Request.InputStream to get the content results in...
1
8119
by: samtilden | last post by:
I want to print out some tracing messages from Global.asax.cs/Application_BeginRequest(). I easily got: System.Web.HttpContext.Current.Request.RawUrl, and System.Web.HttpContext.Current.Request.Params. I would now like to get the entire:
1
2848
by: Jeff | last post by:
ASP.NET 2.0 I'm about to program a HttpRequest from my asp.net 2.0 website. I'll request another server using HttpRequest and ask if password etc are okay.... So I've looked into the HttpRequest constructors and cannot see how to use it. public HttpRequest ( string filename, string url,
0
8969
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8788
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9476
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9335
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9263
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8210
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6053
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3279
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2745
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.