ashx

response redirect from .ashx file

I have ashx file and I want to redirect from ashx to aspx page. Some solution? ...

ASP.NET [Image Handler]

I'm still trying to load my image from database. But that's not so easy with my skins to understand the shots : Using Handler I read this stuff and was on trying to make it but I found only one method : Mapping some my page (in webconf) to this handler (ashx) I need to use it in my page in my and Thank you. ...

Dynamically Loaded User Control's Page_Load event Doesn't Fire from Handler. Why?

Hi Guys I have a handler (.ashx) file that I'm using to deal with Requests. Depending on the type of output needed, I want to load a user control that will present the data in the correct format. I thought that when I created the instance of MyUC its load event would fire, but i guess not. I've even tried specifying my own event handl...

how to lock AJAX calls to ASHX/WCF service to domain to stop data harvest

Hi, Is it possible to restrict the access of an ASHX or WCF service to only AJAX calls from your own domain? In order to improve site performance, we want to use the full jQuery & MS AJAX 4.0 approach however exposing our retail data via an ASHX or WCF service makes it really easier for competitors to harvest our data. Yes it is a pub...

Downloading files using ASP.NET .ashx modules.

Hello all. I have ASP.NET page with an iframe on it for displaying some pdf reports on this page. When user select the report type from dropdown, I add the needed for report data into the ASP.NET Session and change the attribute "src" of the iframe to .ashx module address which generates the .pdf report. But if Adobe glug-in for viewin...

saving thumbnail when they don't exist in asp.net

I wrote an ashx handler to return a thumbnail image and in order to avoid the cost of having to re-create the thumbnail every time it is requested, I save it to the disk. so next time a certain thumbnail size is requested, I check if it exists first. If it does I create the thumbnail,save it, create an image object from the saved file an...

Am I using handlers in the wrong way?

Hey, I've never used HTTP Handlers before, and I've got one working, but I'm not sure if I'm actually using it properly. I have generated a string which will be saved as a CSV file. When the user clicks a button, I want the download dialog box to open so that the user can save the file. What I have works, but I keep reading about modi...

response.write only working IE for ASP.NET

I'm using uploadify (http://www.uploadify.com/) to upload video to my site then convert them into *.flv using ffmpeg and play preview. But it dosen't fully working with firefox, chrome or safari. uploadify provides a onComplete interface, so when the script (.ashx, .php) used on your site for saving uploaded files. you can use response...

Session Not working in Generic Handler .ashx in Firefox

I have created .ashx which implemented IRequiresSessionState, so I can create session variables in that ashx, it worked in IE, but doesn't work in Firefox. When access this session variable from other pages it's NULL. any idea? thx. ...

Use ASP.Net server control code generation from .ashx

I'm trying to take an existing bunch of code that was previously on a full .aspx page, and do the same stuff in a .ashx handler. The code created an HtmlTable object, added rows and cells to those rows, then added that html table the .aspx's controls collection, then added it to a div that was already on the page. I am trying to keep t...

ASP.NET - Passing JSON from jQuery to ASHX

I'm trying to pass JSON from jQuery to a .ASHX file. Example of the jQuery below: $.ajax({ type: "POST", url: "/test.ashx", data: "{'file':'dave', 'type':'ward'}", contentType: "application/json; charset=utf-8", dataType: "json", }); How do I retrieve the JSON data in my .ASHX file? I have the m...

jQuery ajax call failing with undefined error

My jQuery ajax call is failing with an undefined error. My js code looks like this: $.ajax({ type: "POST", url: "Data/RealTime.ashx", data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", timeout: 15000, dataFilter: function(data, type) { alert("RAW DATA: " + data + ", TYPE: "+ type); ...

How to handle null return from custom HttpHandler in asp.net?

I'm using a custom ashx HttpHandler to retrieve gif images from a database and show it on a website - when the image exists, it works great. However, there are cases when the image will not exist, and I'd like to have the html table holding the image to become invisible so the "image not found" icon is not shown. But since the HttpHan...

c# asp.net How to return a usercontrol from a handeler ashx?

I want to return the HTML output of the control from a handler. My code looks like this: <%@ WebHandler Language="C#" Class="PopupCalendar" %> using System; using System.IO; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public class PopupCalendar : IHttpHandler { public void ProcessReq...

vb Writefile zip issue comes as a ashx

I have a ashx page handling file/attachment requests last line of code is System.Web.HttpContext.Current.Response.WriteFile(filename) It ends up downloading a file called GetFile.ashx (which sounds like a page name but if I rename the .ashx to .zip it is actually the correct file... Any reasons why this might be happening and how to...

jQuery ajax post to web service

$(document).ready(function() { $.ajax({ type: "POST", url: "/getprojects.ashx", data: "<formData client=\"\" year=\"\" categories=\"\" tags=\"\" freeText=\"\" count=\"34\" page=\"1\"></formData>", dataType: "text/xml", cache: false, ...

ASHX handler; fires up only once...

I've got a simple ASHX handler that returns an dynamically generated image; the image is generated from a custom created class, and an object belonging to this class is passed to the handler using Session (I'd rather avoid using QueryString). The handler is used as the URL of an image on a ASP form which is very simple: a drop down list...

How to: jQuery post to ashx file to force download of result?

Hi, I have an ashx handler which takes the 'html' property from the request, then returns that back to whatever called it. I also have the Content-Disposition set as attachment. Calling the page directly works as expected, forcing a download with a save as dialog. What I'm stuck on is this: I need to do this from javascript (jQuery...

ASP.Net 4.0 - How to access RouteData from within an ASHX?

My web site has a handler (FileDownload.ashx) that deals with all file download requests. I've recently migrated my site to ASP.Net 4.0, and it now uses routing extensively. Everything works fine when dealing with page requests (aspx), but it's not working with my handler - I encounter the following error: Type '<snip>.Handlers.FileDown...

Sometimes Image is not displaying for only one user

Hi All, I am having ASP.NET MVC application in which i am using HTTP handler ashx file to get the image on the page . This image is uploaded by user by scanning the document. Now my problem is for every user its displaying except one , User is reporting he is not able to see the image even though it was loaded sucessfully , when i ch...