httpmodule

How to protect application pools from session serialization exceptions?

守給你的承諾、 提交于 2019-12-09 06:02:09
问题 We're using an Out-of-Process Session Provider ( ScaleOut ) for an ASP.NET application and we've noticed that when an object that's not correctly setup for de-serialization inadvertently makes its way into session it will eventually cause the entire process to terminate . Reproducing and handling this scenario is where it gets even more interesting. The exception that terminates the process is raised in AnyStaObjectsInSessionState whose implementation is pretty straightforward: internal

Activate form authentication for CSV files in IIS7

谁说我不能喝 提交于 2019-12-08 12:56:21
问题 I have a website on IIS 7. This website has a HttpModule with an AuthorizeRequest event handler. This event does not fire for CSV files and I can access the file without logging in, I guess this is because IIS7 is not configured to require form autentication for CSV files. How can I set this? 回答1: This will impact all files, but you can add a mapping to your server configuration: Go to the properties of your website and click on "Handler Mappings". In the upper right corner click, "Add Module

jQuery Ajax Stop is not invoked (No error; 200 OK)

落爺英雄遲暮 提交于 2019-12-08 10:54:20
问题 I have a working ASP.Net 2.0 code in my development server that uses jQuery Ajax. The result of the ajax call is used to load dropdown values. But when this code is deployed to a new DMZ server, the result is not getting populated in dropdown – though I am getting 200 OK as response. One obvious thing is that the Type is different in the response. It is expected as application/json but coming as text/plain . I have success call back and error callback codes. Along with this I have handlers

Change English numbers to Persian and vice versa in MVC (httpmodule)?

别来无恙 提交于 2019-12-08 09:48:46
问题 I wanna change all English numbers to Persian for showing to users. and change them to English numbers again for giving all requests (Postbacks) e.g: we have something like this in view IRQ170 , I wanna show IRQ۱۷۰ to users and give IRQ170 from users. I know, I have to use Httpmodule , But I don't know how ? Could you please guide me? Edit : Let me describe more : I've written the following http module : using System; using System.Collections.Specialized; using System.Diagnostics; using

Why isn't my machine.config HttpModule running in my web app?

左心房为你撑大大i 提交于 2019-12-08 09:12:19
问题 I wrote a HttpModule in .NET 3.5, 32 bit Win 2003, IIS 6 that worked great. Its assemblies were in the GAC and the config was in the machine.config . Everything has been great for years. I just brought it all over to a new .NET 2-4, 64 bit Win 2008 R2, IIS 7.5 machine and put the same, old configuration in the machine.config . Unfortunately, the module isn't listed as those that are running on the site. When I put the configuration directly into a site's web.config , then it runs as expected.

File Uploads Not Working When Deployed To Server

北城以北 提交于 2019-12-08 03:15:18
问题 I recently embarked on the endeavor of creating my own asynchronous file upload components for ASP.NET. I took lessons learned form Darren Johnstone's FileUpload project and created an HttpModule for extracting the files from the submitted data. I got everything working as it should in testing with VS 2008 using the Development Server. I even went so far during my testing to ensure that the request was being intercepted by the module before the files began uploading. After I was satisfied

HttpModule Init method were not called

佐手、 提交于 2019-12-07 18:17:00
问题 Recently I was implementing a HttpMoudle. and stuck with the error which is said System.NullReferenceException: Object reference not set to an instance of an object. Here is my code . public class MyHttpModuler : IHttpModule { private static IAuthProvider authProvider=null; #region IHttpModule members /// <summary> /// Disposes of the resources (other than memory) used by the module that implements <see cref="T:System.Web.IHttpModule"/>. /// </summary> public void Dispose() { authProvider

How do I attach Visual Studio 2010 to IIS 7 to debug a custom HttpModule written for an existing 3rd party web application

萝らか妹 提交于 2019-12-07 12:44:28
问题 First a little background on what I am trying to achieve. I have a client application that is utilizing REST services served by ArcGIS Server and IIS 7. I want to be able to modify the response (remove or add parameters) before the response is sent to the client. Therefore, I am developing a custom HttpModule using Visual Studio 2010 and .NET 3.5 to intercept and modify the response. However, I am having difficulty debugging my custom HttpModule. I can attach to the IIS process using Visual

IIS seems like to sleep until the next request

限于喜欢 提交于 2019-12-06 13:15:43
I have created a httpModule for my Web Application which basically is triggered by a timer on specific schedules, it runs fine and the method I want is invoked after I publish it in IIS but what happens if there is no request it seems like the Web Application stops to a stand still making any scheduled events not to run, It will only run again only if I make a new request. What am I doing wrong? Can I make my website not sleep so that during times where there is no request the schduled httpModule would run as required? I hope I made this clear. You should check you Application Pool setting

Custom IIS module conflicting with gzip

家住魔仙堡 提交于 2019-12-06 08:03:40
As an experiment I’ve been toying with an idea of creating an IIS managed module to modify CSS files on fly. The backstory is that all out web applications keep a shared and common version number which we append to each JS, CSS and image reference (in HTML) and I wanted to modify the actual content of the CSS to also append the version number to image references in CSS. So, for instance: span.warning { background-image: url(warning-icon.png) } should become: span.warning { background-image: url(warning-icon.png?123) } Now, I know that there are many different approaches to this problem (and