I have the following in my Web.config:
<httpHandlers>
. . .
<add verb="GET,HEAD" path="/" type="Vis.Web.BootHandler, Vis" />
</httpHandlers>
That HTTP handler returns a static HTML page, just to see if it works.
Now when I run my web application (which has no Default.aspx or the likes) I get the default directory listing inst...
I am building a web application framework in C# for Asp.Net. The framework consists of mix of dll files, aspx files with codebehind files, code files in App_Code, css files and images.
I've looked at the "Web Application" project in Visual Studio 2008. This helps to remove all code files and put them into one dll in the bin folder. But,...
I don't know if it is relevant that this is happening in an MVC website but thought I'd mention it anyway.
In my web.config I have these lines:
<add verb="*" path="*.imu" type="Website.Handlers.ImageHandler, Website, Version=1.0.0.0, Culture=neutral" />
in the Website project I have a folder named Handlers which contains my ImageHand...
Our hosting platform (running IIS6/ASP.NET 2.0) is configured to run under partial trust. In the machine wide web.config file we set the ASP.NET trust level to Medium (and lock to prevent overrides) and use a modified policy file.
When trying to add a custom HttpHandler to handle .aspx requests for a website running in this configurati...
I am sending a file to the user using a HttpHandler. On all browsers, after viewing/downloading the file at least once, the browser/application on subsequent views/downloads hangs. Here is the code:
private void TransmitFile(HttpContext context, string filePath, string downloadName, bool forceDownload)
{
if (File.Exists(...
I'd like to be able to create a simple PNG image, say of a red square using a c# web based service to generate the image, called from an <img src="myws.ashx?x=100> HTML element.
some example HTML:
<hmtl><body>
<img src="http://mysite.com/webservice/rectangle.ashx?size=100">
</body></html>
Is there is anyone who can cobble tog...
Hi
I have some dynamically generated XML data that will be consumed by a few consumers (An ASPX page, a flash file and maybe another one as well).
I have implemented it as a custom handler. I construct the XML in the handler and output it using response.write.
Now If I set the DataFile property of my XMLDataSource to the handler, it ...
I have a custom HttpHandler that invokes a webservice to get a file. In test, I invoke the production webservice and the HttpHandler returns the file correctly. When I test it in the production environment on the server, it works as well. However, if I invoke the HttpHandler from a remote client (not on the server) the filename and si...
Hi,
I am trying to send a large chunk of data over to a HTTP handler. I can't send it using GET because of the URL length limit so I decided to POST it instead. The problem is that I can't get at the values. context.Request.Form shows that it has 0 items. So is there a way that I can POST data to a HttpHandler?
...
I'm trying to create a custom ASP.NET HttpHandler to work with any requests to a WCF web services (*.svc) to return a simple predefined SOAP message.
However, after added the HttpHandler to the web.config as shown below. It seems that IIS doesn't pick up the handler to execute. But, the same handler seems to be working fine with *.aspx
...
I've created a sample project to simplify my problem. I have this simple handler:
public class HandleThis : IHttpHandler, IRequiresSessionState
{
public void ProcessRequest( System.Web.HttpContext context )
{
// Score.aspx just says "success"
context.Response.Redirect( "Score.aspx" );
}
public bool IsR...
Is there a good resource for the rules around how the httpHandler path property is used?
I am seeing mixed results for when my handler is called in different environments, so let me explain...
I want to allow for a URL such as:
http://mysite/_layouts/myCompany/rest/myservice.svc/param1/param2
I would like to invoke my handler only u...
Hi all!
I need to create something like proxy between IIS and Apache
So hostheaders I would like to set up on IIS because it's Windows 2003 Server but I have some applications that should be hosted under Apache.
In this case I think that I should set up something like proxy...
Any ideas?
...
I am trying to capture the .WMV file using the HttpHandler but for some reason the HttpHandler never gets fired:
<a href="http://www.somewebsite.com/videos/somevideo.wmv">
play the video
</a>
I have configured the handler in the web.config file as shown below: This editor is not allowing me to paste the web.config fi...
This may be a security issue...
I have an IFrame on my page w/ an .ashx src. The handler does something like
context.Response.ContentType = "text/html";
context.Response.Write(@"hello world");
If I navigate to the handler directly in a new browser window I see the "hello world"
If I try to open the handler in the IFrame it fails on ...
I have an app that pulls up an image for the given user ID. I have the image tag nested inside an update panel in an AJAX TabContainer control. I have the ImageUrl set to "~/ImageHandler.ashx" and the ImageHandler.ashx grabs the user's ID from the session variable userID.
My problem is this: When the first user is loaded the correc...
I have a Generic HTTP Handler (*.ashx) in my ASP.Net application which performs some basic but time consuming computations printing progress statements to the output as it goes to keep the user informed. Performing these computations involves reading some data files which are locked by the handler while using them, so it's important tha...
I have statiс files in website folder, but need to check permissions for every file.
I decided to use HttpModule for that purposes.
ASP.NET receives all the http-requests (I used wildcard mapping) and
The algorith is the following:
HttpModule receives the request
HttpModule checks permissions
If access is denied then the answer is ...
I am currently generating a sitemap file dynamically using a HttpHandler, with a path set to sitemap.axd. This then returns xml content. No one at my office is certain if all search engines accept this extension or if they need .xml to parse. I know that I can submit it to Google through the webmaster tools and use robots.txt to indicate...
I have seen how you can add custom routes to WebForms by using some code like this.
public class WebFormsRouteHandler : IRouteHandler
{
public string VirtualPath { get; set; }
public IHttpHandler GetHttpHandler(RequestContext requestContext)
{
// Compiles ASPX (if needed) and instantiates the web form
return...