.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

HOWTO Make a HttpModule for use with SharePoint 2010

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :C#
 
HOWTO Make a HttpModule for use with SharePoint 2010

I'm trying to make my own custom HttpModule for SharePoint 2010. The only steps I am aware of are as such:

1) Make a class derrived from IHttpModule. 2) Edit web.config, add the following:
  <httpModules>
    <add name="MyClassName" type="MyNameSpace.MyClassName, MyDllName" preCondition="integratedMode"/>
  </httpModules>

3) Edit web.config, add the following under <SafeControls>:
  <SafeControl Assembly="MyDllName" Namespace="MyNameSpace" TypeName="*" Safe="True" AllowRemoteDesigner="True" SafeAgainstScript="True" />

My HttpModule is not invoked at all. No error, even with SharePoint's logs all turned on. Nothing. What am I missing?



View Complete Post


More Related Resource Links

Is there an Sharepoint Server 2010 add-on download to make Adobe Acrobat Reader....readable?

  
I'd like to be able to make the occasional Adobe Acrobat Reader document available for viewing on our Sharepoint Server 2010.  How do I do this?

Using HttpModule to change master page dynamically on SharePoint 2010 site

  

I am trying to change master page dynamically on SharePoint 2010 site. I reviewed some documents (SharePoint: Dynamically Change Master Page: http://ranaictiu-technicalblog.blogspot.com/2009/10/sharepoint-dynamically-change-master.html) and I implemented IHttpModule, added it to GAC, modified web.config(safecontrol, httpmodule, module)
It works good! But I found some problems
1.Never catch the PreInit event for publishing pages
2."/_Layouts/RedirectPage.aspx" page occurred error
3.ContextMenu did not work

using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Web.UI;
using Microsoft.SharePoint;
using System.Configuration;
using Microsoft.SharePoint.ApplicationRuntime;

namespace MasterUtilModule
{
    public class MasterModule : IHttpModule
    {
        public void Dispose() { }
        public void Init(HttpApplication context){
         

How to make a PerformancePoint dashboard as a web part in sharepoint 2010

  

Hi,

I created a dashboard in PerformancePoint Dashboard designer 2010, now I want to use this dashboard as a web part in my SharePoint web pages with the tool SharePoint designer 2010. how can I make this?

In SharePoint designer, I can only find PerformancePoint report, PerformancePoint scoreboard etc, no web part for insert the dashboard.

waiting for your kindly response...thanks!!!

Regards,

Connie


How to make a PerformancePoint dashboard as a web part in sharepoint 2010

  

Hi,

I created a dashboard in PerformancePoint Dashboard designer 2010, now I want to use this dashboard as a web part in my SharePoint web pages with the tool SharePoint designer 2010. how can I make this?

In SharePoint designer, I can only find PerformancePoint report, PerformancePoint scoreboard etc, no web part for insert the dashboard.

waiting for your kindly response...thanks!!!

Regards,

Connie


How to make Custom SharePoint 2010 Webpart work on MOSS 2007 Environment

  

H

I've built a SharePoint WebPart in SharePoint 2010, using SharePoint Assembly version 14.0.0.0. Now i've to make this Webpart such that i should work on SharePoint 2010 and MOSS 2007. The version no for both the versions are different, so do i need to create separate web-part for both version or is there any other way?

My current webpart is built in env, which has

SharePoint 2010, Windows 7 64 Bit, VS 2010.

Reference is added to SharePoint DLL which is in 14 Hive ISAPI.

 

How can i make this generic, so that i should work on both version, i've not used anything specific which is only in SP2010, its just a simple webpart.

 


Thanks
Akhilesh Nirapure

Migrating Custom Site Definition to SharePoint 2010: Do i need to make any changes to existing site

  

Hi,

I am migrating from SharePoint 2007 to Sharepoint 2010.

We hae 2 custom workflows to be migrated.I have deployed the respective wsp which were used in Sharepoint 2007 site.But it did not help and i got errors.

Do i need to change my site definiton or my wso before deploying the same to Sharepoint 2010

Regards

Ram kiran


How to make my SharePoint 2010 site accessible from internet?

  

I have a sharepoint site on a production server here "http://servername:10500/sites/mysite" which accepts AD accounts - I'd need to make this accessible from internet; how could I do that?

Our admin has mapped our "http://subdomain.company.net" in DNS to point to the above url but I'm getting the following error message:

"Internet Explorer cannot display the webpage"

In SharePoint central administration of the "http://servername:10500" web application, I have added an internal url of "http://subdomain.company.net" for Internet Zone; not sure if I should have done that?

what else do I have to do?

Many thanks.

 

 


HTTP 401 when adding a HttpModule to SharePoint 2010 on RPC request

  

PROBLEM
----------
We need to add a HttpModule from .NET to capture some requests (including FrontPage ones). Everything works fine on the web UI side, but we encounter unexpected beahvior when trying to open a Word document : the user keeps being prompted for his credentials. Canceling the dialog boxes opens the Word document as read-only and we are unable to enter modification mode.

The server is a W2K8 running a Microsoft SharePoint Server 2010 (14.0.4763.1000). The site runs under II7, with its pipeline.

ANALYSIS
-----------
After digging a bit, we found out that this simple line in the HttpModule breaks everything :

void OnPostAuthorizeRequest(object sender, EventArgs e)
{
  HttpApplication application = sender as HttpApplication;
  string method = application.Request.Form["method"];
}

(as you may guess, we register to the OnPostAuthorizeRequest event).

If we comment out the 'string method = ...' line, everything works fine !

Activating IIS7 pipeline traces, we found out that the request which fails when the line is uncommented is on URL _vti_bin/shtml.dll/_vti_rpc and 2 warnings are recorded :
- ERR 403 (FORBIDDEN), Module : IsapiModule, Notification : EXECUTE_REQUEST_HANDLER
- followed by ERR 401 (Unhautorized); module : SPRequestModule, Notification

How do you make a a SharePoint 2010 site externally available?

  

I Have a Server 2008 R2 machine and I installed on it SP2010 now I want to make it available externally.

I've rooted the ADSL external IP on "a" port so I can have http://122.1.1.1:8*** external access. How can I now make the server display the content inside SharePoint Server...? I've tried with the Central Administration Mapping tool but did not work Can anyone help me?

Thank you in advance


How to make validation at userprofile picture at sharepoint 2010

  

Hello,

Any one please give me suggestion.

I want to make validation for userprofile picture at sharepoint 2010 when user upload their profile picture ...

I want t check the dimension of image ... i want user to upload 219*145 image.

at sharepoint, EditProfile.aspx and selectpicture2.aspx are used for image upload at profile.

the "view source" of the EditProfile.aspx, i see these


function SelectUserImage() {

var href = '\u002fmy\u002f_layouts\u002fSelectPicture2.aspx?Type=User\u0026accountname=cvpphg\u00255Cadministrator';

var dialogOptions = {width:460, height:240};

SP.UI.ModalDialog.commonModalDialogOpen(href, dialogOptions, SelectUserImageCallback, null);

}



function SelectUserImageCallback(dialogResult, ret)

{


if (!ret) return;

var img = document.getElementById('ctl00_PlaceHolderMain_PictureURLImage');

var clear = document.getElementById('ctl00_PlaceHolderMain_PictureURLClearImage');

var pictureVal = document.getElementById('ctl00$PlaceHolderMain$ProfileEditorEditPictureURL');

if(ret=='__RESET__')

{

img.src = '\u002f_layouts\u002fimages\u002fO14_person_placeHolder_96.png';

img.style.width = 'auto';

pictureVal.value = '';

clear.style.display = 'none';

}

Short Overview of SharePoint Features in Visual Studio 2010

  
As you probably know, Visual Studio 2010 was announced earlier this week and it contains a lot of cool features and project templates for SharePoint developers. Below is a short overview for some of the SharePoint development related features and project templates.

How to get more information about the exceptions that can happen in SharePoint 2010 projects?

  
In case there is an exception anywhere in the SharePoint 2010 project (most common place an exception would happen is during deployment of your SharePoint project, custom deployment configuration or custom deployment steps), there's a registry key EnableDiagnostics available for you to use.

InfoPath 2010 cannot connect to SharePoint 2010

  
You have installed Office 2010 beta and you are trying to connect to SharePoint 2010 from InfoPath but you get an error

Installing and configuring SharePoint 2010

  
The following steps show how to install SharePoint 2010 on VMware workstation 7.0. Host computer used during the preparation of this walk-through was a Vista (32-bit) machine and guest machine used was VMware workstation 7.0 with Windows Server 2008 Service Pack 2 (64-bit).

Content Query Web Part missing in SharePoint 2010

  
If you don't see content query web part listed in the web parts list, this is because you have not enabled "Search Server Web Parts" feature in site collection features. Enable this feature and content query web part will show in the list of web parts.

Developing on SharePoint 2010 Intro Tutorial

  
Folks, this is a exciting news for SharePoint Geeks that the availability of Developing on SharePoint 2010 Tutorial can be access here.

Accessing SharePoint 2010 Data with Server-Side APIs

  
Accessing SharePoint data in server-side solutions is one of the most common tasks that you will perform as a SharePoint developer. SharePoint 2010 provides powerful server-side APIs that enable you to retrieve, add, edit, and delete SharePoint data programmatically. SharePoint 2010 also includes the new LINQ to SharePoint technology that enables you to work with SharePoint data efficiently and easily.
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend