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
1 answer

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…
k0ni
  • 2,417
  • 4
  • 22
  • 25
0
votes
1 answer

How to pass string value from javascript to function in ASHX

I'm used this code to pass parameter from jQuery to ASHX, actually I want to upload file using Uploadify Plugin and send Parameter named 'Id' to ASHX function CallHandler() { $.ajax({ url: "PIU.ashx/MyMethod", contentType:…
Rasool Ghafari
  • 4,128
  • 7
  • 44
  • 71
0
votes
0 answers

generic handler ashx bind vars instead of string concatenation for SQL

I have a C# ashx handler I am running into issues with, i have two queries that build on top of each other, the first query takes a parameter, while the second query takes the original query, wraps around it and takes two parameters to return row…
Jay Rizzi
  • 4,196
  • 5
  • 42
  • 71
0
votes
1 answer

NHibernate with ASHX and TransactionScope

Have a IHttpModule setup to open and close, begin and commit NH isession and transaction etc. Have a piece of code in a ASHX handler similar to this, that is called by some ajax: using (var transactionScope = new TransactionScope(...)) { // Do…
TheITGuy
  • 722
  • 4
  • 15
0
votes
2 answers

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({ …
hazimdikenli
  • 5,709
  • 8
  • 37
  • 67
0
votes
1 answer

ashx Handler not behaving as expected

I have an issue with my ashx handlers which are triggered via an update panel postback and a javascript call. Long story short, there are two handlers in the application. Regardless of what URL I call, I always end up in the same handler (the older…
Morn
  • 191
  • 1
  • 4
  • 14
0
votes
0 answers

IRequiresSessionState in Windows Phone internet explorer

I have ASP.NET website that checks rights to access some files with ashx handler. So i give the user link to ashx and the handler checks if session was created and there are some values in it - it returns some response with file stream. To make…
0x49D1
  • 8,505
  • 11
  • 76
  • 127
0
votes
2 answers

asp.net C# download file in ashx from external link

need some help in downloading file with ashx i'm trying to download large file (about 2-4GB) from external link (file not stored on webserver) here is my code context.Response.Clear(); context.Response.ContentType =…
Jaztingo
  • 570
  • 1
  • 5
  • 15
0
votes
1 answer

Proper way to use Context.Response.Write() on a very long Json string

I am using iis and asp.net with c#. I have a JSON string which I build using JavaScriptSerializer, with MaxJsonLength set as Int32.MaxValue, now I want to return this using response.write, like this Response.Write(myJsonString), but I am wondering…
black eyed pea
  • 427
  • 1
  • 7
  • 16
0
votes
1 answer

Cache an object in a .ashx handler

I'm not sure of the best way to approach this, but here is my scenario. Let's say I have an ashx handler that feeds out some data to an ajax request from the client. Something simple like: public class Handler : IHttpHandler { private…
mikeds
  • 187
  • 3
  • 11
0
votes
1 answer

Pass A Javascript Object Into .ASHX

I have an object I built in Javascript that I want to pass into a .NET .ASHX file and then parse out the various object properties. Here is the object I built in Javascript: function passSelection(prop1, prop2, prop3, prop4, prop5, prop6)…
Todd Krueger
  • 137
  • 1
  • 2
  • 10
0
votes
3 answers

how to get Physical path of working folder in javascript or jquery?

How to get Physical path of working folder in jscript or jquery? What i need is when a dropdown is selected or if a button is clicked i need to get complete path of the working folder. ex: var x="path" here x should be …
SHIVA P.
  • 17
  • 1
  • 4
0
votes
1 answer

How can I apply CDATA in XML for webservices in asp.net?

How can I apply CDATA here in such XML of web services in asp.net, as in data I have some symbols like '&', which resist me to parse it to Android. Here is my code: for (int iBookResponse = 0; iBookResponse <…
Qadir Hussain
  • 8,721
  • 13
  • 89
  • 124
0
votes
3 answers

Test for valid JSON in .NET

Is there a way in .NET that I can test if a JSON string I am about to send back to the client is valid? I am using an ASHX handler that accepts a bunch of form variables and returns a chunk of JSON that gets interpreted by the client. One of the…
QFDev
  • 8,668
  • 14
  • 58
  • 85
0
votes
2 answers

string causes "reference not set to instance of object"

I have this code, which is reading data from a databse, then assigns a url from the web.config file to a string. bool isRequestCI = false; if (context.Request.QueryString["RequestCI"] != null) { isRequestCI =…
john
  • 3,949
  • 7
  • 34
  • 56