Hello all,
In an ASP.NET 3.5 application, I have created an ashx handler as below:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.IO;
using System.Web.Services;
namespace TestWebConfig
{
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfil...
All literature I see on creating custom handlers deals with associating an extension with a handler, e.g. if I wanted a handler for Ajax requests, I could implement the IHttHandler interface in an AjaxHandler class.
Now, to have individual instances of AjaxHandlers, e.g. DocAjaxHander, PersonAjaxHandler etc. how would I derive the base ...
I have a HttpHandler called Handler that I compile into a DLL and put in the /bin folder of my ASP.NET app. Then I have a .ashx file:
<% @ webhandler language="C#" class="Handler" %>
but I get a cannot create type 'Handler' error.
However, if I wrap Handler in a gratuitous namespace, say foo, and change the .ashx to
<% @ webhandler ...
I'm implementing a custom controller in ASP.NET MVC and really want to be able to use a colon in the urls, so that I can identify class/column names and their values, like so:
http://mysite.com/user:chaiguy
...but apparently ASP.NET or IIS doesn't allow colons in urls. I did some digging and apparently it's considered a security issue,...
Is it possible to map all file extensions in a folder to a specific HttpHandler (assuming that their file extensions are mapped to aspnet_isapi.dll in IIS) ?
I've got the FLV extension mapped to ASP.NET in IIS, and have a folder named Static in my web application with the following files:
Static/Index.htm
Static/MyFile.flv
The index...
I generate an XML/Google sitemap on the fly using an Http Handler, so that I don't need to maintain an XML file manually.
I have mapped my Http Handler to "sitemap.xml" in my web.config like this:
<httpHandlers>
<add verb="*" path="sitemap.xml" type="My.Name.Space, MyAssembly" />
</httpHandlers>
It works nicely. Now, www.mywebsite....
A Book showed an example where ( when using IIS7 ) the following module was configured such that it would be used by any web application ( even by non-asp.net apps ) running on a web site. But:
A) if this module is invoked for non-asp.net application, then how or why would HttpApplication object still be created, since non-asp.net apps ...
Hello,
IIS enables us to also configure Asp.Net file mappings. Thus besides aspx, IIS also invokes Asp.Net runtime, when requests have the following file extensions:
a) .ascx --> .asmx extension is used to request user controls.
Since user controls can’t be accessed directly, how and why would anyone send a request to a user con...
I have an mvc app developed and tested with Cassini. Deployed to my site on GoDaddy, and the default page comes up fine. Click to log in, and I get a 404.
I'm running under IIS 7 there, so this is unexpected. My routes are pretty plain:
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Def...
I am trying to create a custom error handler in iis 7.
web.config httpErrors section:
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/path/to/handlerwebservice" responseMode="ExecuteURL" />
</httpErrors>
web.config httpHandler to handle error:
<add path="*/...
I would like to register an HttpHandler to include all subfolders of a root folder regardless of how far down they are nested. I would have expected the behavior with the below code to do just that but in fact it only includes items directly in the root folder.
<httpHandlers>
<add verb="*" path="root/*" type="HandlerType, Assembly" /...
Installed Mono 2.4 on Ubuntu using the instructions here:
http://www.nabble.com/forum/PrintPost.jtp?post=22841086
When I run xsp and try to run http module (http://192.168.1.6:8080/album.ashx), I get the following errors:
Compilation Error
Description: Error compiling a resource required to service this request. Review your source fi...
Hi guys, ive got a stupid problem.
My Custom handler is working 100% on Asp.NET Development server but when i publish the site to IIS 5.1 whenever i try to run Comment/Find (which finds a user via an AJAX call) (i know the naming of my handler sux!!! :)
I get this error:
The page cannot be displayed
The page you are looking for canno...
In an HttpModule, I put an Item in the Context, like this:
HttpContext.Current.Items.Add("MyKey", "Hello world!");
Directly under this code (still inside the module), I can retrieve this string from the collection, so I know it got added.
Fast forward to my actual handler (a Web form -- .aspx). I try to get this item back:
string my...
A few weeks ago, I posted a question saying that Update Panels had empty responses. I was unable to resolve it.
However, today I noticed that webservices, and HttpHandlers also return nothing, IE this:
public class Handler1 : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType ...
Hello,
Q1:
A) I assume web form passes rendered html to HttpResponse object, and in turn HttpResponse object passes these rendered data back to IIS?
B) I also assume that regardless of which Asp.Net http handler processes the request, all Http handlers eventually pass data back to HttpResponse?
Q2 - When request is received by...
My question is simple (although the answer will most likely not be): I'm trying to decide how to implement a server side upload handler in C# / ASP.NET.
I've used both HttpModules (IHttpModule interface) and HttpHandlers (IHttpHandler interface) and it occurs to me that I could implement this using either mechanism. It also occurs t...
I have a web site that serves only one page from the root. The page (call it stuff.htm) is generated by a custom handler, and doesn't physically live on disk.
I'd like stuff.htm to be the default doc for the site, but the standard configuration method of making it the default doc fails since the regular ASP.Net DirectoryListingModule is...
I have a requirement on my new project to serve up some "hidden" assets (actually just stashed in the App_Data directory) after a certain date. Before then, they should act like they aren't there.
I've done this kind of thing a hundred times with Page object, but as I started work on this, I thought I'd look into handlers. Having neve...
Hi there,
I'm building a website referencing an assembly that contains several js scripts as embedded resources, some controls which use those scripts and a 'HttpResourcesHandler' that knows how to retrieve those embedded scripts when asked for them.
In web.config I have an entry in the section that reads
<add verb="*"
path="...