Questions tagged [ashx]

ASP.NET Web Handler file extension

Just as ASPX files can be compiled on the fly (just-in-time), so can handlers. Generic handlers have an extension of ASHX. They're equivalent to custom handlers written in C Sharp or Visual Basic.NET in that they contain classes that fully implement IHttpHandler. They're convenient in the same way ASPX files are convenient. You simply surf to them and they're compiled automatically.

Reference

ASHX usage example

Creating a Synchronous HTTP Handler on MSDN

Creating an Asynchronous HTTP Handler on MSDN

HTTP Handlers and HTTP Modules Overview

Significance of bool IsReusable in http handler interface

621 questions
0
votes
2 answers

Save object in Session on a ashx handler and get the object in another ashx handler. How?

I have two handlers. In Authentication.ashx Handler i save a object on session like this: HttpContext.Current.Session["ConnectionUserSession"] = userCache; Then, i have another Handler, Send.ashx and i want to get the object saved in…
mrodriguez
  • 91
  • 12
0
votes
3 answers

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)) { …
Keith Barrows
  • 24,802
  • 26
  • 88
  • 134
0
votes
2 answers

In a .NET web-application, what is the difference between the following?

I'm mainly trying to understand this. What is the purpose for all of these classes with similar names in a .NET application ? Also, in which of these will I see more implementation-details?. I assume the .ASPX one is the actual web site? Thanks!
Caffeinated
  • 11,982
  • 40
  • 122
  • 216
0
votes
2 answers

My ImageHandler doesn't work

I am trying to code a simple handler that should return an image URL so that I can display it on my website. This is how my handler looks like: <%@ WebHandler Language="C#" Class="KameraHandler" %> using System; using System.Web; public class…
Cute Bear
  • 3,223
  • 13
  • 44
  • 69
0
votes
1 answer

asp.net ashx image simple example not compiling

I am trying to get this simple example working from http://www.dotnetperls.com/ashx. When I add the '<%@ WebHandler Language="C#" Class="Handler" %>' first line the compiler highlights every line and gives two errors as per screenshot. I have tried…
John
  • 1,820
  • 20
  • 30
0
votes
1 answer

Play MP3 file from ashx handler in iPhone's web browser

I have ASP.NET WebForms project with online player. When i click "play" player asks web handler for mp3 using such code: public void ProcessRequest(HttpContext context) { context.Response.Clear(); …
0x49D1
  • 8,505
  • 11
  • 76
  • 127
0
votes
1 answer

ASHX Image Handler randomly showing/hiding images

I built the ASHX Image Handler which extracts the Images stored in the SQL Server. It works beautifully, if I show the image separately. But If I try to show them in the Grid and show many pictures simultaneously, some of the pictures are not…
TTCG
  • 8,805
  • 31
  • 93
  • 141
0
votes
0 answers

HTML Ouput from ashx handler

When trying to write HTML ouput in my handler i get an error. How am i supposed to generate the output? Maybe your not supposed to be able to write output from here but send the output to a aspx page? public void ProcessRequest(HttpContext…
Daarwin
  • 2,896
  • 7
  • 39
  • 69
0
votes
2 answers

Calling an ashx handler with jquery causes form action to post back to it

I'm calling an ashx handler with jquery ajax: $.ajax({ type: "GET", url: "handlers/getpage.ashx?page=" + pageName, dataType: "html", success: function (response) { $('.hidden-slide-panel').append(response); }); However…
User101
  • 748
  • 2
  • 10
  • 29
0
votes
1 answer

Accessing XML via Web Handler results in 302 redirect

I'm trying to access an XML file via web handler. I am running into an infinite redirect (302) issue though. This is because cookies are not enabled. I'm not entirely certain what is causing it, but need some help figuring out what to do. var url =…
mrtsherman
  • 39,342
  • 23
  • 87
  • 111
0
votes
1 answer

jQuery serializeArray + ajax.post IE (only) occasionally does not pass form elements to ashx Handler

My .ashx Handler called from a jQuery AJAX post occasionally does not receive form elements in the HttpContext.Request. When this happens, the Request contains either only ViewState elements or has no elements at all. It has failed OCCASIONALLY only…
SAF
  • 1
  • 2
0
votes
1 answer

Umbraco Log table is getting filled with At /keepalive/ping.ashx (Referred by: ):

I am getting the following error log entry in every few seconds into one of the website UmbracoLog table... At /keepalive/ping.ashx (Referred by: ): Trying to find the solution for the issue for few days without any success.. please see my post in…
Ansar Muhammad
  • 1,238
  • 5
  • 25
  • 45
0
votes
2 answers

update the value of the city combo box dynamically based on the value of the state combo box

Possible Duplicate: how to implement a dynamic combo box selection system I got this question as one of the written test for the company: Using HTML / JQuery write code that updates the value of the city combo box dynamically based on the value…
0
votes
1 answer

jQuery autocomplete searching within columns and order

I have jQuery Autocomplete (not jQueryUI) to search for fname and lname in my database. Right now it is great that it can search for first name and then filter it out and search for last name. But is there a way to get it the other way around…
user1512593
  • 381
  • 3
  • 6
  • 16
0
votes
1 answer

Request ASP.NET handler through javascript

So I'm trying to teach myself asp.net along with javascript. I downloaded a website template and converted it to an asp site. It has a contact form which the javascript called a php function to send an email. I can't use php to send email on my…
CSharpDev
  • 869
  • 1
  • 13
  • 22