What I’m looking to do is make an HTTP post to a server URL (ASP.NET MVC url) and send an XML file with the request.
I’m worried (maybe shouldn’t be?) that if I simply stick the XML string into the request stream it may be too long?
I’m almost positive there was a way to actually add a file itself to the HttpWebRequest, then extract that file on the server side.
This is a Silverlight assembly making a call to an ASP.NET MVC url.
So I’d also need to know how to extract the file on the MVC side from the request.
Thx
For this reason you should use a POST verb instead of GET.
On the client side you could use a WebRequest and write the XML payload directly to the request stream:
and on the server side you could have a controller:
and a custom model binder for the XDocument type:
which will be registered in
Application_Start: