Why is my JSON result method returning response error (500) I am performing AJAX file upload operation in my ASP.net MVC application in which I also use angularjs.  Service method call:      uploadFile: function() {         var defer = $q.defer();         var fileInput = document.getElementById("files");         var messageHeaders = { 'Content-Type': 'application/x-www-form-urlencoded' };         messageHeaders['X-File-Name'] = encodeURI(fileInput.files[0].name);         messageHeaders['X-File-Type'] = encodeURI(fileInput.files[0].type);         var fileData = fileInput.files[0];          $http({             url: window.ROOT + 'EmployerBenefit/UploadFile',             method: "POST",             data: fileData,             headers: messageHeaders         }).success(function(callback) {             defer.resolve(callback);         });         return defer.promise;     },   Controller Method:  [AllowAnonymous] public JsonResult UploadFile(string attachmentType, int planId = 24527) {     var success = true;     string message = ApplicationMessage.InvalidParameter;     // Validation part removed     if (success)     {         var inputStream = Request.InputStream;         var fileLenght = (int) inputStream.Length;         var fileName = HttpUtility.UrlDecode(Request.Headers["X-File-Name"]);         var bytes = new byte[fileLenght];         Request.InputStream.Read(bytes, 0, fileLenght);         if (!Directory.Exists(Server.MapPath("/Content/Images/" + CommonFunctions.ParseString(planId))))         {             Directory.CreateDirectory(Server.MapPath("/Content/Images/" + CommonFunctions.ParseString(planId)));         }         System.IO.File.WriteAllBytes(             Server.MapPath("/Content/Images/" + CommonFunctions.ParseString(planId) + "/" + fileName), bytes);      }      Response.StatusCode = (int)HttpStatusCode.OK;     return Json(new {success, message}, JsonRequestBehavior.AllowGet); }   Question:  I have an interceptor to handle response errors in a factory, even though I set the response status as OK the interceptor is picking up responseError (500)?  Where am I going wrong?
A potentially dangerous Request.Form value was detected from the client Every time a user posts something containing &lt; or &gt; in a page in my web application, I get this exception thrown.  I don't want to go into the discussion about the smartness of throwing an exception or crashing an entire web application because somebody entered a character in a text box, but I am looking for an elegant way to handle this.  Trapping the exception and showing     An error has occurred please go back and re-type your entire form again, but this time please do not use &lt;   doesn't seem professional enough to me.  Disabling post validation (validateRequest="false") will definitely avoid this error, but it will leave the page vulnerable to a number of attacks.  Ideally: When a post back occurs containing HTML restricted characters, that posted value in the Form collection will be automatically HTML encoded. So the .Text property of my text-box will be something &amp; lt; html &amp; gt;  Is there a way I can do this from a handler?
I'm looking to schedule 16 players to play a round robin tournament with each other such that there are 4 players at each table.  I'd like for each player to play with each other player exactly once over the course of 5 rounds.  I just took a look at this post:  , and I was wondering if anyone knows if the case n=m=4 has been solved, and if so what that solution is. How can I make extra money with photography? I have photos in Getty Images, in Shutterstock, Imagekind and I recently added some to RedBubble, but I'm not having the expected results.  Does anyone have some history of success selling photographs or working as a photographer?  Examples of my work are available in .    Also asked by   I am an amateur who sometimes takes pictures of nature or random things. I've been told by several people that my pictures are worth money.  How can I monetize my best shots?  I don't really want to do a lot of work, editing, SEO or whatever. I'm looking for an easy way where I would just upload my pictures somewhere and let it go.  Maybe stock photos? People buying prints? I have no idea how that works...  EDIT: maybe a link to see which type of photography I do can help How to visualize the gradient as a one-form? I am reading Sean Carrol's book on General Relativity, and I just finished reading the proof that the gradient is a covariant vector or a one-form, but I am having a difficult time visualizing this. I usually visualize gradients as vector fields while I visualize one-forms with level sets. How to visualize the gradient as a one-form? I'm trying to compile a document that only works with an up-to-date distribution, so I'd like to know: how do I update my distribution? Please provide screenshots where appropriate.  List of answers           To keep an eye on what’s going on at CTAN you may subscribe to the  or the RSS feed feed://www.mail-archive.com/ctan-ann@dante.de/maillist.xml Show that SO(n) is a normal subgroup of O(n).  A normal subgroup is a subgroup which is invariant under conjugation by members of the group of which it is a part. SO(n) is the set of orthogonal matrices of determinant 1. O(n) is the set of real matrices whose inverses equal their transposes (orthogonal matrices). I'm simply bad at writing proofs. Please help? $\lim_{h\to 0}\int \frac{f(x+h)-f(x)}{h}\,\mathrm{d}x = f(b)-f(a)$ Let $f\in C^{\infty}(\mathbb{R},\mathbb{R})$ such that $f(x)=0$ on $\mathbb{R}$\ $(-1,1)$. Prove that there exists $n\in\mathbb{N}$ such that $f^{(n)}$ has at least n+1 zeros on $(-1,1)$  My attempt :   Assume $f$ is strictly positive  (if not n=0 works). Let $Z(f^{(n)})$ the number of zeros of $f^{(n)}$ on $(-1,1)$. Then we have: $$ \forall n\in\mathbb{N}:\;f^{(n)}(-1)=f^{(n)}(1)=0 $$ so that iterating the Rolle theorem to the successive derivatives of f we have  $$  \;Z(f^{(k+1)}) \geq Z(f^{(k)}) +1 $$ thus, by induction : $$ \forall n\in\mathbb{N}: \;Z(f^{(n+1)}) \geq Z(f^{(n)}) +1 $$ Therefore, $$ Z(f^{(n)}) \geq n $$ How can I find an another zero ?   I'm still looking for an another proof which does not use the lemma ..,  Thank you in advance. I installed Ubuntu 12.04 a month ago and am using it till now. I failed to notice that all this time there was no sound at all while running Ubuntu, even while playing a game in Wine. The weird thing is that only the startup sound comes when I log in (Indian/African drum tone), then comes the utter silence.  I tested both Digital Output (S/PDIF) and the speakers in the sound settings but can hear nothing.  Any help? Command prompt as SYSTEM user (Windows 7) How can I get a command prompt as the SYSTEM user on Windows&nbsp;7?  Context: I'm testing a computer startup script, and I need to figure out the behavior of a command when run as SYSTEM rather than my user account.  I've seen ways to do this with at and psexec, but those methods only appear to work on Windows&nbsp;XP or Windows&nbsp;Vista.  I'm using Windows&nbsp;7 Pro SP1. What is the 64-bit Firefox Beta PPA? Seeking English term for relationship between two members of extended family? How to resize array in C++? SciFi movie (or miniseries) of the afterlife I am trying to find the name of a direct to TV movie, possibly a 2-3 part miniseries which I believe aired on the SciFi channel in the 90s. I don't remember who starred in it, but the movie opened with an astronaut attempting reentry whose shuttle ends up exploding. He awakes in a large bubble of air in a river and after reaching the surface and swimming to shore, meets several other people, from seemingly many different times throughout history (including one alien, who died on Earth).  Over the course of the movie, we learn the world is the afterlife, where everyone goes when they die. The major plot involves launching a steamboat (built by Mark Twain, no less) to travel up a river to the mountains, where the beings responsible for bringing everyone to this world are.  Does anyone know what the title of this movie/miniseries is? So this has been an on-going saga the last few days, and I've already posted several related questions here, and I am feeling quite defeated.  I have/had a beautiful 16" cast iron dutch oven from Cabelas. I took it out for a test spin the other night (I had completed all seasoning steps that the Google Gods recommended). Then:   I tried (and failed spectacularly) to cook a pork roast in it, but cooked it at way too hot a temperature and burned/charred/fused the animal fats/juices into the oven, whereby it basically baked into the cast iron (related question ) I tried cleaning/scrubbing it with coarse-grained salt -> did nothing Then I tried cleaning it with dishwashing liquid + salt -> did nothing Then I let the whole thing soak in a vat of a 50/50 mixture of water + white vinegar -> took all the tarry slude off, stripped some seasoning off (revealing bare iron), but in 80% of the burned/charred areas, still did nothing Then I went to town on it with a steel wool and salt and dishwashing liquid and was left with some smooth, properly seasoned surfaces, and some more areas stripped down to bare metal I decided to just re-season it. So I scrubbed it one last time (about 1 hour ago) with a steel wool and some water, got all the rust and remaining crud off (finally), and built a fire. I placed it on the hot coals of the fire and let it sit there for 15 mins. My intention (whether misled or not) was to burn off all the remaining water from when I had previously washed/scrubbed it, then let it cool off, then season it with oil, and then bake it for a few hours.   So I just took the oven off the fire and opened the lid...and the entire inside is covered in rust. An hour ago there was none. When I put the oven into the fire 15 mins prior, there had been none (yes, I checked) This just came out of nowhere.  I'm ready to give up, unless anyone can offer some concrete set of steps for me that will salvage this $100 rust bucket. How can I get rid of the rust and then re-season this before more rust sets in? Meh... Does going outside the range of the spell or breaking line of sight between the caster and target break concentration or otherwise affect control over the spell?  For example, a Heat Metal spell has a range of 60 ft. If I cast the Heat Metal spell on a an armored foe, and that foe runs outside the range of the spell (60 ft), or around the corner, does that break concentration and end the spell? Heat Metal also allows you to use a bonus action to cause the 2d8 of damage — would exercising that option be prevented by being out of range or line of sight? Proof on Catalan numbers "A friend of my father" vs. "a friend of my father's" — which one is right? Why? I have seen them both in my reference book, which is written by a native speaker. I wonder why there are two different phrases to describe the same meaning and am looking forward to some reasonable details to explain why this is so. Submodule of free module over a p.i.d. is free even when the module is not finitely generated? Installation problem QGIS I do not manage to install QGIS on my windows 10 machine using the osgeo4w installer.  During the installation I get this message:   At the end of the installation I get this message:   And when I subsequently try to run QGIS, I receive this message:    Similar issue can be found in various fora, but none of them provides a conluding answer or did help me to solve the problem.  Any propositions? Are there any holidays in Middle Earth, except Yule, Lithe, New Year in Gondor and Durin's Day?