i have a couple of xml files in my asp.net web application that i don't want anyone to access other than my server side code. this is what i tried..
<add verb="*" path="*.xml" type="System.Web.HttpForbiddenHandler" />
i wrote this inside the <httpHandlers>
it works well on the localhost but not in the server... the server without any...
I have a IHttpHandler that acts as a source to a jQuery Autocomplete input field. In the constructor of the handler I generate an index that remains fairly static between request (needs to be rebuilt maybe once a day).
How can I cache the the index between calls? Debugging indicates that the constructor is called for each request. I've ...
I have 2 asp.net web applications.
http://app1.local/
and
http://app2.local/
App2 has a httpHandler that takes in some credentials, and logs the user in using forms authentication.
FormsAuthentication.SetAuthCookie(cookieUserName, createPersistentCookie);
HttpCookie authCookie = context.Response.Cookies[FormsAuthentication.FormsC...
So i have a custom CMS running under .Net 3.5 written entirely in c#. The engine is optimized to render for mobile devices, but also server to normal web browsers. It also supports cookieless sessions. Great...
I've chosen not to cache anything (including browser data) in order to control the rendering completely from data. This has bee...
I have a httphandler that is fitred for all .png files. I would to be able to rewite the name of the file into the html. Is this possible? So if test.png comes into the handler I want to write test.png?V=1
So far I have found the following:
context.Response.AddHeader("content-disposition", "inline; filename=" + context.Request.FilePath...
Is there a way I can dynamically register an IHttpHandler in C# code, instead of having to manually add it to the system.web/httpHandlers section in the web.config.
This may sound crazy, but I have good reason for doing this. I'm building a WidgetLibrary that a website owner can use just by dropping a .dll file into their bin directory,...
I know that if I want to have requests for MyPage.aspx go to the class called MyHandler in the assembly called MyAssembly, I can add this to my web.config file:
<configuration>
<system.web>
<httpHandlers>
<add verb="*" path="MyPage.aspx" type="MyHandler, MyAssembly"/>
</system.web>
</configuration>
This works for any MyP...
I am having trouble getting dynamic content coming from a custom handler to be compressed by IIS 7.
Our handler spits out json data (Content-Type: application/json; charset=utf-8) and responds to url that looks like: domain.com/example.mal/OperationName?Param1=Val1&Param2=Val2
In IIS 6, all we had to do was put the edit the MetaBase.x...
I have a web service which runs with a HttpHandler class. In this class, I inspect the request stream for form / query string parameters. In some circumstances, it seemed as though these parameters weren't getting through. After a bit of digging around, I came across some behaviour I don't quite understand. See below:
// The request co...
I'm trying to use a single HTTPHandler to authenticate a user's open id and receive a claimresponse. The initial authentication works, but the claimresponse does not. The error I receive is "This webpage has a redirect loop." What am I doing wrong?
public class OpenIdLogin : IHttpHandler
{
private HttpContext _context = null;
p...
I am in the process of moving all of the images in my web application over to a CDN but I want to easily be able to switch the CDN on or off without having to hard code the path to the images.
My first thought was to add an HttpHandler for image extensions that depending whether a variable in the web.config (something like ) will serve ...
Since ASP.NET response filtering and post-cache substitution are not compatible, I need an alternative way of filtering output. Reference: http://support.microsoft.com/kb/2014472
Is there any way to change the markup without using response filter?
...
I have a MS SQL view that I want to make available as a CSV download in my ASPNET Web Forms app. I am using Entity Framework for other views and tables in the project. What's the best way to enable this download?
I could add a LinkButton whose click handler iterates over the view, writes its CSV form to the disk, and then serves that fi...
Question 1
We would like to generate a site map for our CMS site
We have multiple front end servers with approx a million articles.
Environment
multiple MS SQL servers
multiple front end servers (load balanced)
ASP.net - and IIS 6
Windows 2003
To have the site maps (the site map index file, and the site map files) physically on t...
Our Silverlight 3.0 Client consumes Images stored/retrieved on the File System thorough ASP.NET HttpHandlers successfully.
We are trying to store and read back Images using a SQL Server 2008 Database. Please find the stripped down code pasted below with the Exception. "Bitmap is not Valid"
//Store document to the database
private...
We have encountered this difference in file creation while using a HttpHandler Versus a Code Behind Aspx page.
We are reading a saved jpg/png picture as byte array from a 'Image' field in sql server database and create a physical file in the server.
Both the Aspx Page and Httphandler use the same code pasted below.
//Begin
int docID ...
I'm having a bit of a play around with IIS7, just trying to catch events manually in global.asax and skip the ASP httphandler pipeline entirely. To this end, I've set
<httpHandlers>
<clear/>
</httpHandlers>
<httpModules>
<clear/>
</httpModules>
but when I call the server I get a YSOD
[HttpException]: No http handler was fo...
I want to track whenever an email is viewed, so I figured creating a httphandler that reacts to an image, say whenever acme.gif is viewed.
is this straight forward?
Is it just a matter of putting the correct config setting like:
<add verb="*" path="/images/track/acme.gif" ... />
Is this correct?
...
When your vs.net project is type website, what's the namespace/dll you reference in your handler web.config setting?
you normally have to do:
"YourNameSpace.Class, Class"
...
Hi All,
I am trying to view Google charts in a site using SSL.
Google Charts do not support SSL so if we use the standard charts, we get warning messages.
My plan is to create a ASHX handler that is co9ntained in the secure site that will retrieve the content from Google and serve this to the page the user is viewing.
Using VS 2008 S...