HttpHandlers / Modules :: Using HTTPHandler To Resize / Save And Insert Record Into Sql Db?
Mar 1, 2010
I am using uploadify for a photography site I am building. I have an HTTPHandler that I'm using to save the posted file. What I am wondering is if I can resize images, insert a record of the image into a db and save the image from the HTTPHandler? This is my first experience with HTTPHandlers so forgive me if there is an obivious answer for this.
I am using Httphandler to access my pages. Have Loginstatus Control on the master pages.
OnLoggingOut for the Loginstatus control I am doing a Session.abandon()... But My session_end
does not get called in the Gobal.asax.I tried link button and everything. but when I take out the httphandler the Session_end gets executed in global.asax
I can handle the full session end on my own but is there any way to call Session_end in global.asax?
I am using a handler to pull an image from the database and I need to resize the image while maintaining the aspect ratio.I have seen a few examples, but they were all pulling the image from the filesystem and not a database. This is the code I am using inside the handler to pull the image from the database: [Code].... Can someone point me in the right direction?
I'm trying to secure my web application so XML files it contains can't be downloaded. I thought it would be as simple as adding these to the "httpHandlers" section of web.config:
This failed - the XML files could still be downloaded easily. I tried different browsers in case they were caching, but everything could download the XML files without any trouble. I thought this might be due to some special handling of XML, so I tried mocking up an alternative based on ".txt123" files. I added this file with some dummy content:
We have a handler to deal with .dat files.. everything is already setup and server is acknowledging the file type and doing its thing to handle it..
But the handler requires 1 bit of information along with the HTTP request which is a physical file path.. the file name it knows based on the file we call , but how can i pass a custom header along with the request so that the handler will use that when the request is made?
Basically when on our player.aspx page, i will have a button, when you click that button a request is made to the .dat file, but along with that request i need to send the physical file path.. how can i do that?
I need to access image files (.jpg) on a server other than the web server my app runs on. I would like to use an httphandler to do this but I am unsure of the syntax to specify the path. I have tried mapping a drive on the web server to the file server but that didn't work. I have tried using a UNC path but that did not work either.
I have a problem with large respones and IIS7, the server runs out of memory. I've written the test code below that works pretty much like my real code... When i start to download the file i can se the memory usage rise until it hits 100% and Firefox complaints about lost connection to server, looks like IIS7 does not release cache or something.. Works in IIS6 by the way
I've tried to implement two different solutions that use either and HttpModule or and HttpHandler to do URLRewriting for me. These work great on IIS 7 within my local development environment in Integrated and Classic modes. Currently the production server is running IIS 6.0 on a shared hosting environment. It appears that the request at least hits both the Module and Handler as the URL above redirect to the particular friendly url, but it doesn't redirect and hit hte Module or Handler again. Instead I get a 404 error for the friendly URL.
I have an application that uses an Asynchronous HttpHandler for retrieving images from a fileshare It appears the performance of this is quite poor. I have two questions:1. Does it make sense to use an IHttpAsyncHandler for this or will an IHttpHandler work fine? I have four images on a page that need to be loaded this way and it seems that they all load sequentially instead of in parallel. Since we have some JavaScript in the body onload event, it doesn't get excuted until all four images are finished loadingy bearing on this.
How do we findout the whether the application is using any HTTPModules and httphandler in the applicaion?Is there anyway to findout from the url without checking the web.config file?
I got a website [URL] and I want to redirect http://www.example.com/folder to http://folder.example.com so if folder has a page called example1.aspx [URL]
It should be called in this way:
http://folder.example.com/example1.aspx Is that possible that using IIS 7 and asp.net 4.
eg: Folder/StaticPage.aspx?PageName=TestPage is re-written as
Folder/TestPage
This works fine on my local dev. machine on the Cassini server. But when its hosted in IIS (5.1 & 7.0) it fails to work, with the error as 404 Page Not Found.