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


Post New Web Links

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

Posted By:      Posted Date: November 25, 2010    Points: 0   Category :SharePoint
 

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


View Complete Post


More Related Resource Links

Adding Search Refinements in SharePoint 2010

  
I have been playing around with SharePoint 2010 Search this morning. I love the new UI. The search refinements panel is just begging to be messed with. In my case I wanted to add the file extension JPG as an Image Type refiner.

Video: Adding SharePoint 2010 Project Items to a C# or VB.NET Project

  
Each project is either a C# or VB.NET project that contains particular initial project items. In addition Visual Studio 2010 includes SharePoint project items that you can add to any of your projects. (Length: 18:53)

HTTP Error 500.19 - Internal Server Error after SharePoint 2010 In-place upgrade

  
Hello We have done an SharePoint 2010 In-Place Upgrade. After the upgrade, we can access the Central Administration page without problems. However, when accessing the standard http port 80 site, the following error appears: Error Summary HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.   <fieldset><legend>Detailed Error Information</legend> Module IIS Web Core Notification Unknown Handler Not yet determined Error Code 0x80070032 Config Error The configuration section 'system.web.extensions' cannot be read because it is missing a section declaration Config File \\?\C:\inetpub\wwwroot\wss\VirtualDirectories\80\web.config Requested URL http://coolsharepoint:80/ Physical Path   Logon Method Not yet determined Logon User Not yet determined </fieldset> <fieldset><legend>Config Source</legend> 534: </location> 535: <system.web.extensions> 536: <scripting> </fieldset>

User permissions in SharePoint 2010 act differently in http and https

  
I installed SharePoint 2010, created a site (complete with a document library), and assigned user permissions.  Additionally, I set up certificate authentication for all users.  Two problems occur: 1. As the system administrator, when I access the https site, I no longer have permissions to add/edit users 2. When user's, who have permissions to edit/add a document/folder click on "Add document" or the folder icon to add a new folder, they get an error. Any help is much appreciated.

HTTP 500 After Sharepoint 2010 Install on Win 2008 R2

  
Environment specifics: Windows 2008 R2 SQL 2008 (Version: 10.0.2746.0) No internet connection so I installed all the prerequisite software. I have two domain accounts: SPAdmin and SPFarm SPAdmin is what I use to install Sharepoint. SPFarm runs the app pool, timer service etc. Domain: Development domain. Scenario: After the SP Setup Wizard, Central admin is inaccessible and gives a HTTP 500 error. I checked the recommended permissions for both accounts and they both appear to be in the correct groups. The only way I can get it to work is to add the SPFarm account as a local admin. So it appears to be a permissions issue. But I can't figure out what the issue is or even where to start. Any advice would be greatly appreciated.

Adding a custom control to the SharePoint 2010 Team Site Wiki Page Template ( wkpstd.aspx ) programm

  
Topic This is maybe my last post about the Team Site Wiki Page customization with the aim of exceeding its limitations. This time we are going to customize the unique template ( wkpstd.aspx) by replacing the control that renders the editable content by a custom one. In this post example, we will take advantage of the use of this custom control to render not editable additional contents, for instance, a header and a footer that could be the same for a specific Wiki Page Library. Of course, we are not going to really customize the template, but we are going to use a delegate control to replace the control at runtime. Here are the screen shots of the result: We can see a non editable Header and Footer on the Team Site Wiki Page In edit mode these additional contents are not rendered, but we can add new content as usual And of course, after having saved the page, the new content is rendered wtih the non editable Header and Footer. Steps required   If you look at the Team Site Wiki Page template, wkpstd.aspx, you can see the control that is rendering the editable content/ <SharePoint:EmbeddedFormField ID="WikiField" FieldName="WikiField" ControlMode="Display" runat="server" /> We are first going to create a custom EmbeddedFormField control Then, we are going to use a delegate control to replace the native EmbeddedFor

Create site template and adding subsite using site template is broken in sharepoint 2010

  
I am trying to create a site template base on an existing site and try to use the new site template to generate other sub-sites.  It sounds simple and the code is not that difficult to follow; however, Microsoft has made it impossible to accomplish by having a bug in their template creation process.   //Generate web template from existing website using (SPSite site = new SPSite("http://localhost")) { SPWeb web = site.OpenWeb("/barrington/accounting"); web.SaveAsTemplate("NewDepartmentTemplate", "NewDepartmentTemplate", "NewDepartmentTemplate", true); }   //Generate sub site using the new template using (SPSite site = new SPSite("http://localhost")) { SPWeb web = site.OpenWeb("/barrington/accounting"); SPWebTemplate tp = null; foreach (SPWebTemplate wt in web.GetAvailableWebTemplates((uint)1033)) { if (wt.Title == "NewDepartmentTemplate") { tp = wt; break; } } if (tp != null) { SPWeb newWeb = web.Webs.Add("NewDepartment", "NewDepartment", "NewDepartment", (uint)1033, tp, false, false); } } Error: Microsoft.SharePoint.SPException was unhandled   Message=The content type name '$Resources:_FeatureId367b94a9-4a15-42ba-b4a2-32420363e018,DataSourceContentTypeName;' cannot contain: \  / : * ? " # % < > { } | ~ & , two consecutive per

Adding Flexibility to SharePoint 2010 Workflows Using the Windows Workflow Foundation Rules Engine

  
Learn about Windows Workflow Foundation rules engine capabilities and benefits to automate business logic and processes for workflows in SharePoint 2010 applications.

SharePoint 2010 search crawl error: The SharePoint item being crawled returned an error when request

  
SharePoint 2010 search crawl error:
The SharePoint item being crawled returned an error when requesting data from the web service. ( Error from SharePoint site: Specified argument was out of the range of valid values. )

This error is for both document and folder. The document and folder were created/uploaded via SharePoint User Interface only. Later these doc/folder were deleted. And we found the search result showing the documents that were deleted from the doc library resulting in '404 page not found error' upon clicking. Ofcourse we did an incremental crawl after  deleting the file/folder. The error is same even after full crawl.

Environment details:
1 server - WFE role
1 server - App server role
1 server - index server role

Another information if helpful: We used some third party tool to migrate few sample data in the same server but on different site collection, different content database but on the same web application. The tool migrated the data and set unique permissions too for the migrated files. We tried deleting them via SharePoint interface and that files too gave a similar error!

Adding Multiple hyperlinks to form connected to SharePoint 2010 list

  

I have a SharePoint 2010 list and am using an InfoPath 2010 form to create items. I am trying to allow users to reference other list items by inserting a hyperlink to other items in the same list. I have created a column in the list containing each items URL. I then created a drop down list in the InfoPath form that queries this column, so that it contains all the items URL’s. I also created a button and a hyperlink field in the InfoPath form. I would like the user to be able to choose an item from the drop down list, click the button and have the hyperlink inserted into the form. Then be able to choose another item from the drop down list, click the button and have another hyperlink inserted. I added a rule on the button that when clicked, sets the value of the hyperlink field to the value of the drop down item picked. This works, however, only allows for one hyperlink to be inserted.

I have also tried to use the multiple selection list box, by querying the URL column as the choices. This allows for multiple selections, however it shows up as text a

Adding Multiple hyperlinks to form connected to SharePoint 2010 list

  

I have a SharePoint 2010 list and am using an InfoPath 2010 form to create items. I am trying to allow users to reference other list items by inserting a hyperlink to other items in the same list. I have created a column in the list containing each items URL. I then created a drop down list in the InfoPath form that queries this column, so that it contains all the items URL’s. I also created a button and a hyperlink field in the InfoPath form. I would like the user to be able to choose an item from the drop down list, click the button and have the hyperlink inserted into the form. Then be able to choose another item from the drop down list, click the button and have another hyperlink inserted. I added a rule on the button that when clicked, sets the value of the hyperlink field to the value of the drop down item picked. This works, however, only allows for one hyperlink to be inserted.

I have also tried to use the multiple selection list box, by querying the URL column as the choices. This allows for multiple selections, however it shows up as text a

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){
         

Force SharePoint 2010 Webapplications to use https intead of Http

  

Guys,

Environment :

Sharepoint 2010 server enterprise, Website uses host headers, impleted wild cart cert and reqeusts over http and https are both working fine.

i want to force user to use https instead of http so that any request comming in over http is automatically redirected to https, i have tried the following but did not work for me :

1. IIS>SSL Settings>  select Require SSL, but with this option all requests with http are dropped.

2. IIS>http Redirect> enter the same url but with HTTPS, this bring the IE request in a loop, might be becuase i am using host headers but IE keeps thinking forever.

Can any one suggest what is the best way to handle this issue.

thanks

sameer


Error in adding new link in summary link webpart after upgrading to sharepoint 2010

  

hi,

I have a weird error after upgrading my portal from sharepoint 2007 to sharepoint 2010 using attach database approach.

The error occurs when creating a new link in the summary link web part, so a pop up screen will show up, then if I click on Browse Button to link for an item an error occur, on the other hand if i click Browse Button to link an image then everything is working normally.

I checked the event viewer and here what I got, any Ideas?

Event code: 3005

Event message: An unhandled exception has occurred.

Event time: 23/10/2010 3:44:56 PM

Event time (UTC): 23/10/2010 12:44:56 PM Event ID: b74e380e0f6c4d3499feae1176557bcd Event sequence: 403 Event occurrence: 5 Event detail code: 0

 

Application information:

Can we specify ChromeType Property of a web part when adding in SharePoint Designer 2010

  
Is it possible that with all other properties, we can specify ChromeType Property of a web part while adding it on the page using SharePoint Designer 2010? If yes, any example / syntax?
http://farhanfaiz.wordpress.com

Adding dynamic watermark to SharePoint 2010 document when open? (on browser view)

  

hi all,

In Sharepoint 2010, how to adding dynamic watermark to word 2010 when opening?

I thinking,

may be just need configure in sharepoint 2010?

or need sharepoint develop?

 

What you guys think? Any thoughts are welcome!

Thank you!

 


Sharepoint 2010 - Stuck Programmatically Adding a SharePoint Calendar Entry because of type "Person

  

How obscure is my question? I've had 40 reads without responses. Makes me feel better that I couldn't figure it out :-)

Programmatically Adding a SharePoint Calendar Entry

That is my goal and I am close. I am new to SharePoint and I am using the new approach with DataServiceContext.

Everything works except for adding "Person or Group" types. Can't find any good notes on this.

 

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