httphandler

Can an assembly in an ASP.NET Bin folder automatically register HTTP handlers?

Is it possible for a .NET assembly in an ASP.NET web site's Bin folder to automatically respond to certain incoming HTTP requests, as if it had an httpHandlers entry in the web site's web.config file, but without actually having to add that entry? For example an assembly may contain the following metadata to get some embedded static res...

ASP.NET HttpHandler authentication problem in non-IE browser

Hi, i have written a http handler for uploading multiple files from flex application. In explorer it works properly, but in other browsers i have problem obiously with forms authentication.. this is log of the request from Firefox, Opera, etc..: /admin/UploadProductImage.axd?User=a6s55d4as6&Id=33 status: 302 (Found) /admin/log...

How do get clean URLs like Stackoverflow?

On some .NET driven sites URLs don't end with asp.net page names, like default.aspx, instead they use a pattern http://sitename.com or http://sitename.com/subdirectory/subdirectory. The site is mapped as sub directories off the root, ie. /tags, /users, /badges, the URLs would be /tags, /users, /badges respectively. StackOverflow, to use...

AJAX implementation for ASP and ASP.NET hybrid

A little setup: Our shop has a mixture of different platforms. Almost all of our web development is done in classic ASP. We have a WinForms application in development that is being written using the .NET 3.5 framework. The problem: I am writing a webservice for updating information to this enterprise application. Most of the classes an...

What's the best component for compressing javascript files with GZip, Deflate?

I have just created Javascript & CSS handler for optimization file size using both YUI Compressor & GZip or Deflate compressor depend on request header. The following code is used to compressing file by GZipStream class. But I found that it can reduce JQuery 1.3.2(YUI compressed) file size from 58KB -> 54KB only. public void GZipCompres...

C#, Debugging an HTTPHandler

I have an HTTP Handler that is the entry point for 90% of our app. Basically it gets a request, process a lot of data and returns a very specific file depending on the client & web page it is embedded on, etc. I have setup the Application Mappings so that all .kab extensions point to *C:\Windows...\aspnet_isapi.dll*. I added my HttpHa...

How can one programmatically reorder Handler Mappings in IIS7?

We have an installation that creates a handler mapping for a website. Using the IIS7 Admin pack, I've come up with some jscript that sets this up successfully. However, our developers have the requirement that this particular handler mapping be at the top of the ordered list of handler mappings. I discovered that you get to this view ...

How to use ASP.NET Session State in an HttpHandler?

I have an HttpHandler that is run on a client page (cross domain, not on our IIS server, etc) and when they click on our embedded link it fires off the Handler on our server. So far everything is working normally. I am now trying to use the System.Web.HttpContext.Session object but it is null. I am thinking it is null because we don't...

What is the difference between ICallBackEventHandler and HTTPHandler?

When we write our own custom HTTPHandlers aren't they behave the same way as ICallBackEventHanlder does? we use both to make ajax calls from our web page, isn't this correct? or my understanding wrong, I wont doubt if it is :( Obviously HTTPHandlers are more broader concept since a web page (.aspx) etc are also http handlers. ...

Asp.Net Mvc Can Not Log Out

Here is My Code To Log In var expire = DateTime.Now.AddDays(7); // Create a new ticket used for authentication var ticket = new FormsAuthenticationTicket( 1, // Ticket version username, // Username to be associated with this ticket DateTime.Now, // Date/time issued expire, // Date/time to...

HttpHandlers and HttpHandlerFactories.

I would like to route incoming requests for different resources, some returning files such as css, others returning responses generated by the server, and others being redirected to aspx pages for AJAX functionality. The current configuration uses an HttpModule to remap all requests to one handler, where urls are parsed and dispatched, ...

SharePoint - Open Document Library PDF in New Window

I want PDF files in MOSS 2007 Publishing site document libraries to open in a new window. Is it possible to achieve this by creating a custom HttpHandler? I don't want to mess with a site definition for something as basic as this... ...

How to get trace output added to context.response in httphandler?

I've enabled trace pageoutput="true" in my web.config and I like the easy way it provides of seeing all this stuff at the bottom of the page. I'd like to get the same output from trace at the bottom of the output from my httphandler. Is there a way to dump out the same trace info via code that would follow this code: public class Uplo...

Set sqlAuthCookie for SSRS Execution Service

I am trying to execute a report as a pdf in asp.net c#. I have everything working great, except for the sqlauth cookie. If I use an iframe and render a dummy report, then use that sqlAuthCookie cookie (set by report server) in the code-behind, it works, so I know my syntax and method , etc is correct. What I need to do is add the sqla...

How do you debug ASP.net HTTPHandler

I have set a breakpoint in an HTTPHandler in visual studio. The HTTPHandler is an .ashx file I am trying to debug by running my application in the VS development web server. My breakpoint is NOT getting hit. How can I step through it? EDIT: My breakpoint is NOT getting hit ...

HttpHandler Path Issue ASP.NET

I've written an HttpHandler that works fine when I test it on the ASP.NET development server. In my Web.Config I have: <add verb="*" path="Files.zip" type="MyNamespace.Zip, App_Code" /> And in my Handler in my App_Code folder I have the code below. Unfortunately, since the ASP.NET development server dumps everthing in the root -- ht...

implementing rewrite for http://site/NICK => http://site/profile.aspx?nick=NICK

hey guys, like the title says, how can i accomplish this sort of a rewrite as simple as possible? is it with httphandlers or perhaps the asp.net routing? i am using version asp.net 3.5. the problem is that i want any other requests to be ignored, like requests to .aspx files, images, folders and such for example: i want these to get ha...

Best way to return a string from an HTTPHandler to a page that POSTs this .ashx file

I have an ASP.Net HTTPHandler that gets POSTed from a ColdFusion web page whose FORM looks something like: <form name="sendToHandler" action="http://johnxp/FileServiceDemo2005/UploadHandler.ashx" method="post"> <input type="hidden" name="b64fileName" value="fileservice.asmx.xml" /> <input type="hidden" name="strDocument" value="Document...

Is it possible to skip a HttpHandler if there is no querystring?

I wrote a dynamic image resizer as a HttpHandler. It's automatically called on anything with an image extension, so for example: http://www.mysite.com/picture.jpg?width=200&amp;height=100 will run the handler and return a thumbnail image with the proper response headers. However, I want the handler to let a request 'pass through' if it...

ASP.NET Request.Url is repeating the URL 3 times

I have a HttpHandler that is called whenever an image extension is accessed. This is what I have in the HttpHandler as a simple test: public void ProcessRequest(HttpContext context) { context.Response.Write(context.Request.Url.ToString()); context.Response.End(); } According to Firebug, the first time the page is refreshed...