PDA

View Full Version : XML.send To .NET ASPX


brixel
08-04-2006, 08:42 PM
Hey guys - I'm not getting very far and hoping someone here can help. I've done some very extensive searching and no one seems to have an answer, though plenty have run into this problem.

My Flash App is using XML and when I use sendAndLoad I have no problems in .NET. I read in the input stream and convert - everything is great.

In one instance I need to pass XML to new window so I'm creating an XML object in Flash and using send instead of sendAndLoad.

It calls the page but errors out because it can't find the XML data from Flash.

In .NET with sendAndLoad I can grab the data with conv.GetString( Request.BinaryRead( Request.ContentLength ) ), where conv is an in instance of UTF8Encoding.

I've debugged all over my page, but can't seem to see how the send method is passing data, or if its passing it at all - all Request objects are zero length.

Any help would be greatly appreciated. Thanks.

sleekdigital
08-04-2006, 10:21 PM
I'm not sure what the problem might be, but this interests me so I will experiment with this when I get some time.

I don't know if it will help, but here is how I get the XML in .NET ...


XmlDocument xmlData = new XmlDocument();
try
{
xmlData.Load( Request.InputStream );
// do stuff with xmlData
}
catch(Exception err)
{
Response.Write("<message>"+err.Message+"</message>");
}

brixel
08-04-2006, 10:23 PM
Thanks for the reply - Going to give your method a try, I had not seen that one before.

brixel
08-04-2006, 10:27 PM
Hey Sleek - wanted to let you know that worked for me. Of course I'm testing it in a different environment and under 2.0 instead of 1.1 where I was having the issue, but I think it's going to do the job. Thanks again.