I’d like to detect requests made by my Silverlight client in ASP.Net MVC.
Silverlight can’t set ‘X-Requested-With’ as far as I remember.
What do I use instead?
I’d like to detect requests made by my Silverlight client in ASP.Net MVC. Silverlight
Share
You could probably just make your own header (like X-This-Is-Silverlight=true or something). And then you’d only need to check for that header in your mvc-application (shouldn’t be to hard). If not you can allways add a querystring-parameter (like mysite.com/home?issilverlight=true), but then it could be forged with the browser pretty easy.
Also, you could try to use Http Put (or something other than get or post) because normal browsers don’t do that.