Tagged pages

Found 7 articles tagged with Request

The server committed a protocol violation. Section=ResponseStatusLine
Switching off header validation in .NET
0
Recently I was adding GitHub project section to my blog when I run into the following exception "The server committed a protocol violation. Section=ResponseStatusLine" After some time of Google-ing I found few solutions, but the most simplest one was actually the best one... read more
Maintaining same session with separate web requests from C# code
Create separate web requests with the same server session
0
Recently I started a small project for image optimization which relies on public image optimization services available online. For now it supports Yahoo SmushIt and Compressor.io services, but it will be extended over the time. Project is open-source and hosted at GitHub https://github.com/dejanstojanovic/ImageOptimization. ... read more
Change Request.Form collection on the fly
How to modify Request.Form collection
0
Data from form are sent to backend (whether code behing of page in WebForms or Controller Action in MVC) in Request.Form property. It is oragnized as collection of name and value and can be easily access by name. In some extreme cases, you need to make some modifications to posted form data. ... read more
Forcing accept type for WebApi call
Setting accept type on the server side for the WebApi request
0
One of the coolest things of WebApi is that adapts to accept type sent in request header. This header value depends on a client. Based on this WebApi will serve different formats of data (XML/JSON). ... read more
Optimized media serving in Umbraco by creating media CDN
Reduce bandwidth with serving from one domain
0
Let's say you have multiple websites with different domains in one Umbraco instance. All websites will use the same media, but the catch is how will it serve them. For example the same image will be served to a browser with two different paths like the following: ... read more
Detecting request from mobile device
Take control over what is and what is not mobile device for your web app
0
Microsoft made is easy to detect whether request to your web application is coming from mobile device or not by adding a property to Request class. Usage of this is Request.Browser.IsMobileDevice. This works pretty fine for most of mobile devices, but this property is based on list of mobile browsers which is configured in .NET framework itself. ... read more
Detect ajax request in C#
Easier way to detect whether request is an ajax request
0
Sometime you need to determine whether your request is standard GET/POST request or Ajax POST/GET http request. This info is stored in request value isAjax or X-Requested-With. By checking these values of request you can easily determine whether http request is ajax or not. ... read more