httpmodule

Validate request before Application_BeginRequest?

▼魔方 西西 提交于 2019-12-23 02:58:21
问题 I trying to perform aditional validation before application start reading the input of the request, to end suspicious request, based on headers and form data or something like that. Is there it possible? [Update] I'm focusing in prevent a zero day vunerability that occurs before BeginRequest and ins't catch by ASP .net validation. If I could control the creation of the HttpWebRequest object I could detect this attack. [Solution] It can be solved using a native module. Information about a

What is the Java equivalent to ASP.NET Http Modules?

泄露秘密 提交于 2019-12-22 13:57:05
问题 I'm considering rewriting a small Http Module i made in ASP.NET in Java. Based on a specific URL, the Http Module inserts some HTML on an empty HTML layout, do some basic reformatting, and finally returns the rendered HTML. Being new to Java web development, what is the equivalent to ASP.NET Http Modules? 回答1: The equivalent of HTTP Modules in ASP.NET would be Filters in Java Servlet API 2.3+. 回答2: Make sure to take a look at the following frameworks if you intend to apply styles and

How can I perform XSLT transformations in an HttpModule?

我与影子孤独终老i 提交于 2019-12-22 10:43:17
问题 I've been trying to implement server-side XSLT transformations as an IIS HttpModule. My basic approach is to install a new filter at BeginRequest that diverts writes into a MemoryStream, and then at PreSendRequestContent to transform the document using XSLT and write it to the original output stream. However, even without performing the transformation I'm clearly doing something wrong as the HttpModule appears to work for the first page load and then I get no response from the server at all

Process html files with HttpModule to catch 404 errors on IIS7

*爱你&永不变心* 提交于 2019-12-22 08:28:24
问题 I am having another problem with my HttpModule that handles exceptions. (cfr. my previous post: Custom HttpModule for IIS 7 for integrated) All works well, but only for aspx pages. The main reason we wanted to use this HttpModule is to handle 404 exceptions that occur when someone tries to go to a html page that doesn't exist. But my HttpModule only works for .aspx pages and it isn't triggered when a html file doesn't exist. This is the configuration that I have set up in my web.conf file:

How to fix HTTP Error 500.22 - Internal Server Error An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode

做~自己de王妃 提交于 2019-12-22 05:29:41
问题 I'm learnig about Http modules and during last try I received: HTTP Error 500.22 - Internal Server Error An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode. One of the suggested solution is: from the IIS Express install directory, run appcmd migrate config "Default Web Site/". So from Command prompt I went to C\Program Files\IIS Express and then I executed: appcmd migrate config "Default Web Site/" I received command "Migrate" is not supported on

Exclude HttpModule from running for static content on IIS7

主宰稳场 提交于 2019-12-21 02:41:44
问题 I have a problem with my Authentication HttpModule. The problem is that it obviously runs for every single request I get on my web server (IIS7). Because it also uses Session variable, it fails to work properly on CSS, JS files and similar. I tried to use: <add name="AuthModuleName" type="..." preCondition="managedHandler" /> but to no avail. It still runs on every request regardless of its extension or mime type. I should also add, there's a setting <modules

IIS7 ISAPI Filter Module & HttpModule Events - How do they line up?

落花浮王杯 提交于 2019-12-19 08:54:41
问题 So IIS7 in Integrated Pipeline mode uses a IsapiFilterModule to shim ISAPI filter DLL's and fire off the correct "events" on the filters, which is quite different than previous versions of IIS or IIS7 in classic mode because this means that HttpModules fire off right along side ISAPI filters in Integrated Pipeline mode. So does anyone happen to know how ISAPI events (http://msdn.microsoft.com/en-us/library/ms524855.aspx) and the HttpModule events (http://msdn.microsoft.com/en-us/library

Can .NET intercept and change css files?

醉酒当歌 提交于 2019-12-19 05:16:21
问题 UPDATE 1: I have now setup IIS6 so .NET can handle calls to .css files. What do I have to do now to get it to change css files based on the referal url? So if the referal url is http://intranet/ , it should continue calling the old style sheets. If the referal url is http://intranetv2/ , it should call the new style sheet. ORIGINAL QUESTION: The background: I have 2 search engines. 1 is old and the other is brand new (development stage). Search engine 1 is on domain1.com and search engine 2

Large File Upload Using HttpHandler or HttpModule?

空扰寡人 提交于 2019-12-18 18:35:49
问题 I have a webform application. It required to be able to upload large file (100MB). I intended to use httpHandler and httpModule to split the file to chunk . I also had a look at http://forums.asp.net/t/55127.aspx But it is a very old post and I've seen some example on the internet using httpHandler. e.g. http://silverlightfileupld.codeplex.com/ I'm not sure httpModule is still better then httpHandler. Since httpModule apples to the request of the whole application, and I just want it apply to

HttpModule not running with Visual Studio

只谈情不闲聊 提交于 2019-12-18 12:12:34
问题 I am using an HttpModule to do some URL shortening on my site. I am using Visual Studio 2008 and IIS 7, and .Net 3.5. When the module is specified in the system.webServer element of web.config, and the site is run in IIS, it works fine. The config looks like this: <system.webServer> <modules> <add name="MinimizeModule" type="ClipperHouse.UrlMinimizer.MinimizeModule" /> </modules>... My module attaches to the BeginRequest event, everything works. However, I can't get it to run using the built