The requested content appears to be script and will not be served by the static file handler.

If you get the above message from IIS while working with ASP.NET 4.5 or above, the most likely cause is that you’re missing the ASP.NET 4.5 in your development IIS. Here’s the resolution To install or uninstall ASP.NET 4.5 on Windows 8 or Windows Server 2012, use one of the following options: Run the following... Continue Reading →

HTTP Headers

This is a quick and a small post on reading the HTTP headers in ASP.NET. Code gets the HTTP header key – value pairs and write it to a text file. 1: protected void Page_Load(object sender, EventArgs e) 2: { 3: var headers = Request.Headers; 4: StreamWriter writer = new StreamWriter(Server.MapPath("~/data.txt")); 5:  6: foreach (var... Continue Reading →

UI Updates – Part 2

ASP.NET ASP.NET UI updates are handles using Ajax. In this example it is described how to use the ASP.NET Ajax for the updates. In ASP.NET Ajax we can have update panel and make the updates via Ajax calls. Prepare your ASPX markup like below. 1: <body> 2: <form id="form1" runat="server"> 3: <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> 4:... Continue Reading →

Put watermarks on uploaded images–ASP.NET

Here’s the simples piece of code in C# which can write some text on an image, eventually making it as a watermark. StreamReader reader = new StreamReader(Server.MapPath("sample.jpg")); Bitmap bi = new Bitmap(reader.BaseStream); // base image Graphics gr = Graphics.FromImage(bi); string customString = "your string goes here"; gr.DrawString(s, new Font("Cooper Black", 25), Brushes.ForestGreen, new PointF(140, 115));... Continue Reading →

Charting with DotNet HighCharts

This post explains how to use the DotNet HighCharts wrapper for the HighCharts Javascript library. You can download the wrapper from Codeplex. First create an ASP,NET file and add the following Javascript references. 1: <script type="text/javascript" src=""></script> 1:  2: <script src=""> 1: </script> 2: <script src=""></script> Download the wrapper and add the single .dll reference... Continue Reading →

Powered by

Up ↑

%d bloggers like this: