Sorry, but I don't have a better description of my problem. I'll edit the post if I discover something.
I am building an F#-C# MVC4
application (in Windows 8
, using Visual Studio 2012 Express for Web
). Everything was working without a problem. I was making Ajax calls to post XML data to the server, by essentially doing the following on the server:
let str = (new StreamReader(HttpContext.Current.Request.InputStream,new UTFEncoding())).ReadToEnd()
let xr = XElement.Parse str
This was working perfectly, until about an hour ago. I just got back to my desk after a snack, and now, the same call won't work anymore. The error I get is that InputStream
has `length 0'.
There is literally nothing else in the call stack. The MVC template registers the routes in a file called Global.fs
, in the following function:
type Global() =
inherit System.Web.HttpApplication()
static member RegisterRoutes (routes:RouteCollection) =
routes.IgnoreRoute("{resource}.axd/{*pathInfo}")
routes.MapRoute(
"Default",
"{controller}/{action}/{id}",
{controller = "Home"; action = "Index"; id=UrlParameter.Optional})
I don't want to clutter the post, but the controller and all the requisite functions are definitely present.
I have several other projects on my workstation which use the same F#-C# MVC4
template, and they work perfectly. And they have exactly the same set-up.
I have searched on Google, to no avail. Any pointers as to how I can go about even trying to figure out why InputStream has length 0
would be greatly appreciated.