Hello,
I'm trying to send a file in chunks to an HttpHandler but when I receive the request in the HttpContext, the inputStream is empty.
So a: while sending I'm not sure if my HttpWebRequest is valid
and b: while receiving I'm not sure how to retrieve the stream in the HttpContext
Any help greatly appreciated!
This how I make my r...
Hi guys
very simple question for you..
To serve Images is better a web service or a HttpHandler in asp.net c# ?
what is the difference ?
Why I should prefer one instead another ?
thanks
...
I'm using ASHX file to creating images in a dynamic way.
I added a line of code to throw an exception in my ashx file. if I browse to ashx file directly, my application_error in global.asax is working fine to handle the error.
my problem is application_Error is not working when I use this handler in another page. like in show.aspx if I...
I'm trying to write out to the response stream - but it is failing, it is corrupting the data somehow...
I want to be able to write a stream stored somewhere else to the HttpWebResponse so I can't use 'WriteFile' for this, plus I want to do this for several MIME types but it fails for all of them - mp3, pdf etc...
public void ProcessR...
Anyone got an idea of how to render an aspx page inside of an HttpModule and stream it back to the browser?
...
So i have a couple of custom Http Handlers for different file types. I have implemented the IRequiredSessionState marker, but still recieving context.Session as null?
Do you need to initialize the Session somehow?
...
QA and Dev enviroments work perfectly.
Handlers all implement the IRequiresSessionState marker.
Config File contains:
<pages enableSessionState="true">
and
<sessionState cookieless="AutoDetect" mode="InProc" timeout="20" />
IIS has session state enabled in application properties and Application is running in its own Application Po...
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?
...
Maybe a strange question, but where would you put HttpHandler classes in a n-tier architecture? I have a service layer, a domain model layer and a data layer. Should I create a separate class library for the HttpHandlers?
...
In an aspx file you can set the CacheProfile to a certain profile defined in Web.Config. How do you do this in a HttpHandler?
I know you can use Cache but can you use Cache Profiles from Web.Config?
...
I'm using a HttpHandler to upload an image asynchronously and need access to the SAME session as the rest of the application.
I'm using IRequiresSessionState and can read and write to the session fine, but existing session values from the application that should be available aren't and so on.
Is this possible?
Thanks
Dave
...
Hi All,
I am dynamically creating images and need to show those images to users.
For that i have created a ashx file but the problem is this ashx file is never getting called not sure why path issue or need add any tags in web.config ..
while debugging its not going .. might be its not finding
please advice.
EDIT: When i directly ...
Hi,
Assuming the code below:
public class DynamicAspxHandler : IHttpHandler {
bool IHttpHandler.IsReusable { get { return false; } }
void IHttpHandler.ProcessRequest(HttpContext httpContext) {
string aspxContent = PlainASPXContent();
Page page = CreatePage(httpContext, aspxContent);
page.ProcessRequest(...
Hi there,
What will be faster:
Generate a thumbnail then write the stream to the Http response using an Http Handler.
Generate a thumbnail in a http module on one of the earliest events and let IIS handle the rest of the request.
Thanks,
Ash.
...
So I'm using the awesome jquery plugin -- jQuery Ajax Upload
and after a file is uploaded, this code is run:
// Called when upload completed successfully (puts success details into hidden fields)
upload_success_handler: function(file, response) {
$("input[name$=_filename]", container).val(file.name);
$("input[name$=_guid]", con...
I'd like to create a PHP image generator that takes several query string parameters and generates an image on the fly. I've done this before in ASP.NET via a handler but now I'd like to in PHP. For example, I'd like a call to image.php?img1=foo.jpg&img2=bar.jpg to render the concatenation of foo.jpg horizontally next to bar.jpg. Later on...
how to set the http headers when sending http request to a server so that the server thinks the requests are coming from firefox
...
I'm playing with http handlers. When adding an http handler to the web.config, in order to make it process special extensions on IIS 7, you need to register it under the system.webServer/handlers element.
The add element there has an allowPathInfo attribute and I can't understand what is it for...
MSDN says:
Specifies whether the ...
Just playing around with our Less HttpHandler for CSS preprocessing using Visual Studio 2010 and ASP.NETMVC 2 and I am unable to serve the .Less file type how I'd like to.
I have added a handler section to the web.config which is all that was previously required with VS 2008 when using Cassini:
<httpHandlers>
<add type="dotless.Core....
Passing an id though the querystring to an httphanlder was not so hard in a bindable control like a gridview. I put an imagebutton in the gridview and set its Imageurl Property as such....
ImageUrl='<%#"~\Handlers\ImageHandler.ashx?id=" & Eval("ID")
However, now I am trying to just use a standard Imagebutton control just sitting there...