ashx

How do I use an .ashx handler with an asp:Image object?

I have an ashx handler: <%@ WebHandler Language="C#" Class="Thumbnail" %> using System; using System.Web; public class Thumbnail : IHttpHandler { public void ProcessRequest(HttpContext context) { string imagePath = context.Request.QueryString["image"]; // split the string on periods and read the last element,...

How to use output caching on .ashx handler

How can I use output caching with a .ashx handler? In this case I'm doing some heavy image processing and would like the handler to be cached for a minute or so. Also, does anyone have any recommendations on how to prevent dogpiling? ...

how to debug ashx file in VSTS?

Hello everyone, I am using VSTS 2008 + .Net + C#. I am developing an ASP.Net web application. I have added an generic handler, i.e. .ashx file. How to debug this ashx file in VSTS 2008? I find there is no view in browser or set as startup page option. Any ideas? thanks in advance, George ...

Silverlight access an ashx JSON response

I have a Silverlight application that is calling out to an ashx that is hosted in the same application as the Silverlight control. The ashx does the following (stripped down): // Basic object class SomeObject { int ID { get; set; } string Description { get; set; } double Value { get; set; } } // ASHX details DataLayer dl ...

How can I make a VERY simple web proxy using ASP.NET?

I'm about to launch a site that was working well until I found the following hiccup: I can't request a Yahoo! Pipe over SSL. So the pages that require SSL are now missing a piece of their functionality unless I figure out a way around this; obviously, this could be done if I use an SSL-hosted page on my app to request the Yahoo! pipe f...

Visual Studio ASHX files debugging

I have a ashx file in a non web project in VS2008. The type of web project (stsdev that is used with Share Point) deploys the ashx file to the server. I can navigate to the file and it is there. In VS2008 when I try and put a break point in the ashx code it will not let me. This means when I connect to the WP3.exe process to remotely deb...

How to prevent ashx from resetting Session Timeout?

I'm having trouble finding any info on this, which makes me think I'm doing something wrong. I've made an ashx that serves up secured images to our logged-in users. The problem is that a Sql Profiler trace reveals that TempResetTimeout is called in our Session State DB for every image served via this mechanism. This ashx was built to ...

ASP.NET C# - Create upload directory on the fly?

public class UploadHandler : IHttpHandler { public void ProcessRequest(HttpContext context) { ... // Create the directory if needed... if (!Directory.Exists(uploadDir)) { System.Security.AccessControl.DirectorySecurity ds = new System.Security.AccessControl.DirectorySec...

ExtJS combobox jsonDataStore

var remoteLookupJsonStore = new Ext.data.JsonStore({ root : 'records', baseParams : { column : 'fullName' }, fields : [ { name : 'name', mapping : 'fullName' }, { name : 'id', mapping : 'id' } ], proxy : new Ext.data.ScriptTagProxy({ url : 'LookupLoader.ashx' //url: 'http://tdg-i.com/dataQuery.php' similar data }) }); ...

Calling GetWebResourceUrl from .ashx

Is it possible to get a web resource from an .ashx handler? We have resources (images) in a class library and would like to reference them from an ashx handler. Normally you get the url by doing something like: Page.ClientScript.GetWebResourceUrl(this.GetType(), "myimagename"); But, in my case we have the IHttpHandler and the resour...

ASPX or ASHX as ajax server page ?

Whats best in terms of performance/speed when considering a ASP.NET ajax server page which returns results back to the ajax calle in the javascrit ? an ASPX file or ASHX ? ...

ASP.NET Javascript Resource Handler

I would like to make a Handler that takes all of my Javascript files i need and compresses and merges them, something like the scriptmanager of asp.net does. Is this possible? i thought on an .ashx handler, but i'm not sure if this works.. would be cool if you also could do this with the css files. ...

How do you render a User control from a ashx or webservice?

Question is it possible to have a .ashx or webservice return a user control rendered? if so how would i do this? ...

httphandler filetype mapping requires virtual directory (or does it?)

I am using an httpHandler to pass all requests for *.gif files to an ashx handler. i only want to do this for requests to a sub-folder within the website. The website root is called 'demo' and the subfolder is called et. So, I add a web.config file to the et folder with an entry as follows: This is not enough to pass all *.gif reque...

.ashx ASP.NET Handler Image not displayed in html img-element

Hi, I have a strange problem. I created an ASP.NET Handler (AccidentMap.ashx) that gets a bitmap and returns it. Here is the handler: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; using System.Drawing; namespace BackOffice.Modules.Insurance_Company { /// <summary>...

Is the default ASHX handler mapping missing from IIS 7.5 (Windows 7)?

I have an application that makes use of the default ASP.NET HTTP handler extension, .ashx. This no longer works in IIS 7.5. I get a 404.3 message with instructions to add a handler. I used the default handler extension specifically to keep things simple and not have to add a mapping within the setup program for my web application. ...

HTTP Handlers: When to use Synchronous/Asynchronous/Generic handlers (ashx)?

Hi, ASP.NET offers 4 types of http handlers - synchronous, asynchronous, generic synchronous (ashx) and generic asynchronous (ashx) handlers. How do you choose the type of http handler to use for a job? ...

ASP.NET - Display Images and pdf in a GridView

I want to display in an asp:GridView an "Images" column. The idea is to provide a thumbnails of the image with link to real size image. For some rows, this may alternatively be a PDF document. I'd like the link to be to the PDF. The PDF or image are stored in a SQL database. Now I have error in Handler (.ashx) file: "Invalid attemp...

jQuery to bind data to ASP.NET DataList using a ashx handler

Using jQuery how do I bind data from a call to a asp.net ashx handler to a datalist? ...

IOException when making HttpWebRequest to local ASHX file

Greetings, all. Here is my situation. I am attempting to make an HttpWebRequest to a local handler file and I keep getting the following exception: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. Now, I'm using a local handler file because I am writing some integration...