HttpHandlers / Modules :: Images Are Not Rendering In Firefox?
Nov 20, 2010
I have a website [URL] . When you click on any thumbnail image Safari renders the images but in Firefox show up as binary garbage. (safari does not render gif images but does .jpeg images)
in my .cs file for the gridview itemtemplate I supply the following string
I've been trying to get image caching working for the last 8 hours and I keep the same problem time and time again, I'm trying to cache Images at the moment and then when thats succesful, apply this to cache my js and css files. I have at the moment Sql Dependancy caching working on my dynamic pages but the page still takes to long due to images not caching.
What I have tried is going to IIS7 Management and adding HTTP Response Header for the images folder and setting various things for the cache control.i dont care how long it caches it on the client or on the proxy servers i just would like it to check when the file was modified and compare it with the one in the client or proxy cache and if they are different then fetch the new image which has been ftp up. i could solve this by changing the image name but the thing is the image name is generated when they are ftp'd to the site by an application and the name is a direct reference to the product so i cant change the name each time, as it would mean making a lot of otherpages accross the board.
so What i would like, is to set and expiry date of lets say 32 days or more on the images and then check to see if they have changed by date modified or some other way of checking(Etags maybe) I'm not sure, if they have changed on the server then redownload and recache them, I tried using post-check and pre-check together but that just permantly cached them, so when i change the image the only way it would display the new image is to just hit F5.
In Brief, how can i Cache images, on the client machine/ proxy cache and recache them when the modified date of the file has changed.
This seems as good a place as any for this question. It has to do with an .ASHX handler.
I have written a generic file serving handler in asp.net/vb.net - it has been working great. I recently moved to a windows 7 box and am now debugging under IIS7, and this is where the problems occure.
Whenever I serve a file to either FireFox or Chrome (IE8 works fine) from IIS 7, the download will fail.
- In FireFox the error is "[some file name and path].part could not be saved, because the source file could not be read." - In Chrome the error is "Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown error." - In IE8 it works fine
If I run the same code in IIS6, it works fine. If I run the same code in the Visual Studio virtual web server, it works fine (on windows 7 or XP).
I am rather concerned about this as our production web server will soon be IIS7; which I'm starting to really love, and would hate to revert to IIS6 just because this won't work in IIS7.
Here is the code I'm using..I've tried a number of different patterns. It seems to always fail on the Flush() line with the error "System.Web.HttpException = {"The remote host closed the connection. The error code is 0x80070040."}"
One thing I have noticed, if I move the flush statment to the finally clause or remove it all together; firefox will attempt to read the entire file - it appears to be looping through the entire block of code just fine, until it hits the flush statement. If I remove the flush statment I still get an error and it still tries to read the entire file before asking me to save it.
--Edit: I removed the flush and tested again; firfox thinks it downloaded a zero byte file.
I'm assuming I just have some sort of header issue going on here, but I'm at a loss at this point as to what that would be.
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.
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?
the project i'm working right now, client wants to make url seo friendly, if any event would enter from the admin section the url should show the name of the event itself.
right now it shows www.--------.com/eventdetails.aspx?id=879878
I have 2 asp.net apps, each on a different server and with its own SS2005 db.
What I need is to grab the data entered in a form in app1 and insert that "behind the scenes" into the app2 db.
I suppose I have to do a POST in app1 and intercept that in app2, but since I've not done much http handling yet, I could use some hints or even examples if possible.
I am looking for the solution of how do I get the html of a web page through proxy. I have an input of proxy server name, port number, url of web page and accelerated_pac_base.pac file which contains FindProxyForURL(url, host) method. [URL] has more information about PAC file. How do I do this in c#.
I have a form with a server side button, clicking on which session variable is added Session.Add("ABC","123")After this (in same postback event), I redirect user to a site, which returns user back to my site. And I still have session "abc" available to me.NOW, In another scenario I am trying to do the same thing but in a handler. I.e.User clicks a clinet side button which redirects users to sameSite.xyz. Handler of xyz adds session variable like above and redirects user to the other site. But, this time when user returns back from other site, my session is lost. How can I imitate scenario 1 with handlers?
I have a website running on IIS7 in integrated mode (framework 4). I have added a <handler> to deal with page requests.
my web.config
[Code]....
my dll
[Code]....
When i run site.aspx in my browser, it loads for about 20 seconds, and then I get "Connection was reset" / "Webpage cannot be displayed". Google Chrome returns "Error 101 (net::ERR_CONNECTION_RESET): Unknown error".
It works well in the VS2010 development webserver. It works on IIS if the handler is an appcode cs file, but as soon as I move to a DLL, i get this error. After attempting to load the page a few times, the app pool crashes and has to be restarted.