> Hi All,
>
[quoted text clipped - 5 lines]
> xmlInDoc.Load(Request.InputStream) in PAGE1.ASPX then PAGE2.ASPX give me
> error on line Response.Write(docOUT.xml) saying
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"""
> <MethodResult
Status="2"><Error><ErrorNumber>-1071651496</ErrorNumber><ErrorDescription>An
> XML parse error occured.
> File Position: 0
[quoted text clipped - 4 lines]
> Source Text: </ErrorDescription><ErrorSource>modXML.LoadXMLDocumentFromURL \\
> W6IntInMsgLib</ErrorSource><ErrorLine>0</ErrorLine></Error></MethodResult>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"""
> I can not remove(comment) the line xmlInDoc.Load(Request.InputStream) in
> PAGE1.ASPX as that is needed for some processing in PAGE.ASPX like
[quoted text clipped - 13 lines]
> xmlInDoc.Load(Request.InputStream)
> Server.Transfer("w6inboundprocessor.aspx", True)
Once the Request InputStream has been consumed it can not be reset and
re-consumed elsewhere. Since you've loaded the InputStream in to an XML doc
already you cannot using the InputStream to load another in page 2.
You should avoid consuming it in Page 1 or find a way to provide the loaded
the XMLDoc to page 2.
BTW, You still haven't got this Multi-posting message have you. Stop doing
it or you'll find that those who can answer your questions will stop since
they'll get fed up seeing the same question in different places.

Signature
Anthony Jones - MVP ASP/ASP.NET
deepak - 12 Feb 2008 14:29 GMT
hi anothony,
yeah sorry i willavoid multi posting ...in the mewnwhile the dou know any
other way to use use this request object in page1.aspx?
thanks,
Deepak
> > Hi All,
> >
[quoted text clipped - 53 lines]
> it or you'll find that those who can answer your questions will stop since
> they'll get fed up seeing the same question in different places.
Anthony Jones - 12 Feb 2008 15:07 GMT
> hi anothony,
> yeah sorry i willavoid multi posting ...in the mewnwhile the dou know any
> other way to use use this request object in page1.aspx?
You want to use the Request entity without consuming it? No I don't know
how you can have your cake and eat it.
As I've stated you can load it up into an XML DOM then stuff that DOM away
somewhere say in the Session object then retrieve it from there.
Frankly I never use Server.Transfer, any desire to do so sets off my 'bad
design' alarm. I would re-factor the page that would call it and the page
I'm calling to both use a shared component instead. In this case the shared
component would consume the Request entity.
Thats not say use of Server.Transfer is always bad design but most of the
time I've seen it used it is.

Signature
Anthony Jones - MVP ASP/ASP.NET
deepak - 12 Feb 2008 15:51 GMT
i can use the session object for second page but the thing is that second
page needs it in binary format ONLY for processing by that
programid
Dim binData = Request.BinaryRead(Request.Totalbytes())
Call docOUT.loadXML(objProcessor.ProcessMessage(binData))
the above second line of code needs it in binary format so we need to pass a
object of type Dim into it which has value of tyep binary into it. i m
confused really....
> > hi anothony,
> > yeah sorry i willavoid multi posting ...in the mewnwhile the dou know any
[quoted text clipped - 13 lines]
> Thats not say use of Server.Transfer is always bad design but most of the
> time I've seen it used it is.
Anthony Jones - 13 Feb 2008 23:15 GMT
> i can use the session object for second page but the thing is that second
> page needs it in binary format ONLY for processing by that
[quoted text clipped - 7 lines]
> object of type Dim into it which has value of tyep binary into it. i m
> confused really....
It would help if I knew what ProcessMessage does. Is it modifying the
content in someway. It would seem from your first post the posted entity
body is XML. Are you sure that :-
(Whats the Call keyword doing here anyway?)
Call docOUT.loadXML(objProcessor.ProcessMessage(binData))
isn't equivalent to:-
docOUT.Load(Request.InputStream)
Whatever the case it seems some redesign is in order here. Create a class
in App_code that can be shared by the two pages and loose the
Server.Transfer.
Consider also that you could create a class that inherits from Page and then
have the two pages inherit from that.

Signature
Anthony Jones - MVP ASP/ASP.NET