Tagged Questions

An HTTP module is an assembly that is called on every request made to your application. HTTP modules are called as part of the ASP.NET request pipeline and have access to life cycle events throughout the request. HTTP modules therefore give you the opportunity to examine incoming requests and take ...

learn more… | top users | synonyms

1
vote
1answer
100 views

How to automatically sign in user from HttpModule

If a request to a certain site collection comes in from an anonymous user, I want to do a sign in as a specific user. For this I would like to use a HTTP module. So basically I want to do something ...
0
votes
2answers
197 views

Get the current logged in user in sharepoint added HttpModule

How can I get the current logged in user in SharePoint in an added module? I have tried the following codes but I always get the system account SPUser user = null; using (SPSite site = new ...
0
votes
0answers
94 views

Sharepoint 2010 | Authentication & Authorization

We have a windows application based on .NET framework 2.0. It uses windows authentication. It also maintains the user details like userid, valid from date, valid to date, active/inactive flag in its ...
2
votes
1answer
184 views

SPWebConfigModification adding child nodes in undesired order

I have some code that uses SPWebConfigModification to add a couple of nodes to the system.webServer/modules section. What I want to do is add a <remove name="MyModule" /> and then an <add ...
2
votes
0answers
53 views

Get a httpModule before SPRequest

I am currently supporting an application running on SharePoint 2007 and have run in to a problem with the order of httpModules. I've written a module that initiates context needed by our role ...
8
votes
2answers
1k views

What is the correct way to block all HTTP Headers (ASP.Net and SharePoint) from a particular web application extension?

I have been involved in two projects recently which have required the removal of all HTTP Headers which can identify the site as either an ASP.Net site or as a SharePoint site. This is normally as a ...
0
votes
0answers
46 views

Javascript errors while using Custom HttpModule in sharepoint 2007

I am using a custom HttpModule in SharePoint 2007. Its deployed and doing its required functionaly correctly. But every page is throwing javascript errors[Done, but with errors], such as Message: ...
0
votes
1answer
115 views

Global.asax requires AllowPartiallyTrustedCallers on assembly with child class of SPHttpApplication

In my class NinjectSPHttpApplication I have inherited SPHttpApplication class in order to use Ninject as IOC container. When I set global.asax to inherit from this class it throws an exception that ...
0
votes
1answer
115 views

When is SPHttpApplication class created and destroyed/disposed?

I would like to know when exactly is the SPHttpApplication class created and when destroyed/disposed. Does it last for the whole user session or only for a single request?
1
vote
1answer
100 views

Logging document library views with HttpModule in SharePoint 2010

I am really new to SharePoint and got an assignment of logging Document Views into an external database in SharePoint 2010... While searching over the web, I have got lot of articles on the auditing, ...
0
votes
1answer
161 views

Authorization against a user's membership in certain SharePoint groups via HttpModule

I'm trying to restrict access to certain pages of a SharePoint Web Application based upon a user's membership in certain SharePoint groups (restricting access to specific pages and functions, while ...
0
votes
2answers
219 views

SharePoint HTTPModule to redirect

Thanks for your help. I have one requirement where I need to redirect users based on group membership when the user first browses to the site. I have been trying to implement a httpmodule and handling ...
3
votes
1answer
744 views

Connecting with a java client to sharepoint with NTLMv2

I am using MAC and LINUX, java6 and apache http-client 3.1 to connect to sharepoint with NTLM auth. I connect to ntlm using http://jcifs.samba.org/ and it worked fine until I had to connect to ...
0
votes
2answers
338 views

Strange error in sharepoint IHttpModule.(Custom 404 page)

I have custom IHttpModule to redirect users to my 404 aspx page. This example was found somewhere in the internet and this part looks like working well but today administrators reports next problem: ...
1
vote
1answer
84 views

Why FileNotFoundPage is null or is null by default

I just tried to access property "FileNotFoundPage" for a web application and its coming up as null, I wonder if its null by default or if something changed it to null. I would also like to know what ...
2
votes
3answers
953 views

Error using current SPWeb from HttpModule

Is it allowed to access SPWeb and specifically SPWeb.ID from PreRequestHandlerExecute ? Writing an HttpModule [SharePoint2010] and trying to access current web ID using this line of code : private ...
2
votes
1answer
236 views

HTTP Handler not working for MS office extensions

I am trying to map a custom HTTP handler for *.pptx files and for some reason this is not working. My HTTP handler does nothing else other than sending an email when a powerpoint file is accessed. I ...
0
votes
2answers
333 views

Registering scripts with HttpModule

I'm trying to add a javascript link to my Sharepoint page via a HttpModule, using the 'OnPreRequestHandlerExecute' event. However nothing is happening and the script link is not added but i'm unsure ...
4
votes
2answers
1k views

Add custom error handler at beginning of modules section in web.config (not manually)

Is there a way to put an error handler HTTPModule at the beginning of the modules section in web.config without doing this manually? I've tried the supplemental web.config approach like this: ...
1
vote
1answer
409 views

Sharepoint 2010 alternate access mappings and HttpModule problem

I have encountered an interesting problem recently. I have a HttpModule, which i have added in modules runAllManagedModulesForAllRequests="true" node , by hand. The main site collection is at http: ...
1
vote
1answer
556 views

deploying an HttpModule for just a site collection

Is there anyway to deploy an HttpModule using a site-level feature (WSP) and for it to be active for that specific site collection only?
1
vote
2answers
2k views

Access denied in Sharepoint 2010 HTTP handler (.ashx)

I've developed a Visual Web Part for Sharepoint 2010 that includes an HTTP handler for some AJAX functionality. I followed this guide to accomplish this. I've createad a brand new SP 2010 web ...
1
vote
0answers
311 views

Custom HttpModule behaves differently with classic site pages and publishing pages

I have a custom HttpModule which purpose is to check the presence of a specific cookie. If the cookie is not present, an error message should appear in place of the page. The http module works as ...
6
votes
2answers
1k views

404 HTTP Module causes an authentication popup in Manage Content & Structure page

We build an HTTP Module to handle 404 errors on a public SharePoint 2010 project. We found the new functionality in SharePoint 2010 that sets the FileNotFound property of the Web Application very ...
1
vote
2answers
381 views

Strange problem with newdocset(Document set) with SPContext.Current.Web while using HttpModule

newdocset doesnot seems to work with SPContext.Current.Web I have a HttpModule below is a sample code using System; using System.Collections.Generic; using System.Linq; using System.Text; using ...
1
vote
3answers
2k views

HttpModule does not register

I recently need to register a custom HttpModule to intercept the mobile redirection feature. I followed this tutorial. At one point, I need to register my HttpModule in the web.config and put my DLL ...
0
votes
2answers
432 views

ThmxTheme Error

I wrote a ASP.NET Handler module for sharepoint 2010 web application. it is running .But I added this code, occured error Code: string tema = "/_catalogs/theme/Classic.thmx"; ThmxTheme tm = ...
0
votes
2answers
275 views

How to detect when user goes from one site collection to another in the same web application?

I have a several site collections in the same web application and I need to handle events when user goes from one site collection to another. I need it for specific actions, like setting "lcid" cookie ...
3
votes
1answer
2k views

How do I set CallStack=“false” but still get the exception in a custom error handler?

I've got a pretty custom SharePoint 2010 Server solution. We have a custom HttpModule setup for error handling (relevant code provided below): public class ErrorHandlerModule : IHttpModule { ...
1
vote
0answers
986 views

Why isn't the session_end event in my HttpModule firing?

I deployed an HttpModule that needs to do something in session_start and session_end events. I think everything's just fine, because I enabled the session state and set it to "InProc" mode and defined ...
1
vote
0answers
658 views

why im getting error “404 NOT FOUND” when adding HttpModule in Sharepoint 2010?

I developed a httpmodule that inherits from IHttpModule to use "Session_Start" event, add the output dll to GAC and adds the "add" tag into web.config in "modules" section. All things seem to be ok ...
1
vote
1answer
3k views

Why am I getting this error? “The given assembly name or codebase was invalid.”

I have created and implemented the IHttpModule interface in order to use the Session_Start event in SharePoint 2010 (like global.asax in asp.net). I have added the add tag into my web.config file in ...
6
votes
2answers
2k views

Where should i put my custom HTTP Module that Implement “IHttpModule” interface to SharePoint 2010 and make it functional?

I create my httpmodule base on this article Global Exception Handling in SharePoint but he didn't said how can i use this in sharepoint 2010 and where should i put this and make it functional. as far ...
5
votes
2answers
2k views

Logging document library downloads with HttpModule

I'm stuck with a problem here that leaves me stupefied. I am writing an HttpModule which examines the URL of all HTTP requests in order to log which users have downloaded each document in a document ...
2
votes
1answer
2k views

SPWeb.CurrentUser gives wrong result when called from HttpModule

I am trying to get the current logged-in SharePoint username through SPWeb.CurrentUser. This usually provides the results I am expecting, except in one instance. I am logged into my development ...
2
votes
3answers
876 views

How to get SPWebApplication for current request in HttpModule?

How can I get the SPWebApplication for the current request from Init method in a HttpModule?
0
votes
0answers
430 views

HTTPModule Filter returns corrupt data when reading file from SharePoint Document Library

Let's prove how much better the SharePoint Overflow community is as on Stack Overflow there is a big silence when things become difficult, at least for this question. I'll omit the wall of text, for ...
0
votes
2answers
649 views

Change document icon in document library?

I would like to change document icon in document library at runtime. Icon should be changed based on some condition I have in code. There is no difference what extension of file is (txt, doc, pdf, ...
3
votes
2answers
848 views

What to watch out for developing an HTTP Module in SharePoint 2007

Has anyone created a custom HTTP Module for SharePoint 2007? If yes, what should I watch out for? I need to add a course grain authentication check to SharePoint (can a user see this app), so I need ...