Archive

Posts Tagged ‘sharepoint server’

Form Based Authentication

April 15th, 2009

While configuring sharepoint server 2007 for form based authentication, I have came across a lot of issues. One site that was really helpful while configuring was:

http://www.codeproject.com/KB/sharepoint/FBA.aspx

After going through all the steps, whenever I try to access the site that was configured for form based authentication. The page just refereshes to itself and do not produce any errors. I read through a lot of blog items to find the result but none of them worked for me. 

While trying different options, I came to know that the user provider database which contains all form users should have a windows local account in order to access the users. Once I had configured that, the login page started functioning

:)

SharePoint , , , , ,

Modify the View Sorting Order

September 14th, 2008

After creating a list, we may create views on it. Different views give us the desired look and feel we want. You may encounter a problem as listed below:

Problem

You click on your list and select a view to open up. You edit an item and when you return back either by clicking OK or Cancel, you will be navigated to a default view instead of the view you were in. This issue arises primarily when you access your sharepoint site out of the network i.e., through internet.

Solution

The solution is that you modify the sorting order of views in the drop down list. In order for that, you need to select your view as default view. By doing so, your view will be listed first in the drop down. The order will be modified.

In order to make your view default, goto Site Settings, then select your list and click on your view that you wanted to mark as default. In your view, you will see a checkbox saying “select this view as default”. Check that option and you are done.

SharePoint , , , , , , ,

Working with Ajax on MOSS 2007

September 11th, 2008

Working on ajax sucks at times even now. Now means using SP1 for MOSS 2007. For instance, if you develop a custom page and using the update panel for asp.net calendar control will not produce partial page post backs. I have came across this issue and spent a lot of time figuring out the issues. Finally, the following seems to make everything work for me. Try your luck :)

Working on ajax sucks at times even now means even with SP1 of MOSS 2007. Facing issues with some of the controls not producing partial page postbacks will take you to this MS knowledge base:

Microsoft Knowledge Base Article

The above knowledge base may help you a little bit, it is regarding creating updatepanel and controls dynamically meaning programatically instead of going for design time controls.

Apart from above solution, the following is a solution that really works. If you have put your controls in update panel and partial page postbacks are not working for some of the controls specially for controls like link button. The following solution surely works.

Follow these steps to make it work:

Step 1

Modify web.config <authorizedTypes> section to include all related assmebly references, so that it looks similar to that:

<authorizedTypes>
<authorizedType Assembly=”System.Workflow.Activities, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35? Namespace=”System.Workflow.*” TypeName=”*” Authorized=”True” />
<authorizedType Assembly=”System.Workflow.ComponentModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35? Namespace=”System.Workflow.*” TypeName=”*” Authorized=”True” />
<authorizedType Assembly=”System.Workflow.Runtime, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35? Namespace=”System.Workflow.*” TypeName=”*” Authorized=”True” />
<authorizedType Assembly=”System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089? Namespace=”System*” TypeName=”*” Authorized=”True” />
<authorizedType Assembly=”System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089? Namespace=”System*” TypeName=”*” Authorized=”True” />
<authorizedType Assembly=”Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” Namespace=”Microsoft.SharePoint.Workflow” TypeName=”SPWorkflowActivationProperties” Authorized=”True” />
<authorizedType Assembly=”Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” Namespace=”Microsoft.SharePoint.Workflow” TypeName=”SPWorkflowTaskProperties” Authorized=”True” />
<authorizedType Assembly=”Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” Namespace=”Microsoft.SharePoint.Workflow” TypeName=”SPWorkflowHistoryEventType” Authorized=”True” />
<authorizedType Assembly=”Microsoft.SharePoint.WorkflowActions, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” Namespace=”Microsoft.SharePoint.WorkflowActions” TypeName=”*” Authorized=”True” />
<authorizedType Assembly=”System.Workflow.Activities, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35? Namespace=”System.Workflow.*” TypeName=”*” Authorized=”True” />
<authorizedType Assembly=”System.Workflow.ComponentModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35? Namespace=”System.Workflow.*” TypeName=”*” Authorized=”True” />
<authorizedType Assembly=”Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” Namespace=”Microsoft.SharePoint.Workflow” TypeName=”SPWorkflowActivationProperties” Authorized=”True” />
<authorizedType Assembly=”Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” Namespace=”Microsoft.SharePoint.Workflow” TypeName=”SPWorkflowTaskProperties” Authorized=”True” />
<authorizedType Assembly=”Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” Namespace=”Microsoft.SharePoint.Workflow” TypeName=”SPWorkflowHistoryEventType” Authorized=”True” />
<authorizedType Assembly=”Microsoft.SharePoint.WorkflowActions, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” Namespace=”Microsoft.SharePoint.WorkflowActions” TypeName=”*” Authorized=”True” />
<authorizedType Assembly=”mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089? Namespace=”System” TypeName=”Guid” Authorized=”True” />
<authorizedType Assembly=”mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089? Namespace=”System” TypeName=”DateTime” Authorized=”True” />
<authorizedType Assembly=”mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089? Namespace=”System” TypeName=”Boolean” Authorized=”True” />
<authorizedType Assembly=”mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089? Namespace=”System” TypeName=”Double” Authorized=”True” />
<authorizedType Assembly=”mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089? Namespace=”System” TypeName=”String” Authorized=”True” />
<authorizedType Assembly=”mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089? Namespace=”System.Collections” TypeName=”Hashtable” Authorized=”True” />
<authorizedType Assembly=”mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089? Namespace=”System.Collections” TypeName=”ArrayList” Authorized=”True” />
<authorizedType Assembly=”mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089? Namespace=”System.Diagnostics” TypeName=”DebuggableAttribute” Authorized=”True” />
<authorizedType Assembly=”mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089? Namespace=”System.Runtime.CompilerServices” TypeName=”CompilationRelaxationsAttribute” Authorized=”True” />
<authorizedType Assembly=”mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089? Namespace=”System.Runtime.CompilerServices” TypeName=”RuntimeCompatibilityAttribute” Authorized=”True” />
<authorizedType Assembly=”mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089? Namespace=”System” TypeName=”Int32? Authorized=”True” />
<authorizedType Assembly=”mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089? Namespace=”System” TypeName=”TimeSpan” Authorized=”True” />
<authorizedType Assembly=”mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089? Namespace=”System.Collections.ObjectModel” TypeName=”Collection`1? Authorized=”True” />
</authorizedTypes>

Step 2

You will need to modify the master page, edit master page using Sharepoint designer. A javascript method will be called on onload. You need to remove this call so that your body tag looks like:

<body>

instead of:

<body onload=”javascript:if (typeof(_spBodyOnLoadWrapper) != ‘undefined’) _spBodyOnLoadWrapper();”>

Step 3

We will need to modify javascript method _spFormOnSubmitWrapper() which is called on Form post in your master page, this method is found in init.js file. init.js file is  installed with MOSS 2007 on server. The file is located at: Drive:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033.

Open the file and go to method _spFormOnSubmitWrapper(), the following code will be found in the file:

if (_spSuppressFormOnSubmitWrapper)
{
return true;
}
if (_spFormOnSubmitCalled)
{
return false;
}

Replace the above code with the following code:

if (_spSuppressFormOnSubmitWrapper)
{
return true;
}
if (_spFormOnSubmitCalled)
{

}

Note that “return false” statement has been commented out. This will make ajax calls to work properly. This line is commented out because if the page is already posted back, sharepoint does not post it back again. For ajax to work properly, it is required to disable it so that partial postbacks work for every server call.

SharePoint , , , , , , ,

Accessing Sharepoint site on Internet

September 9th, 2008

If you are planning to access your sharepoint website on internet, you will be posed with different problems. I will address all of these problems.

Problem 1:

You wanted to access your sharepoint site on internet.

Solution

Just go to Operations -> Alternate Access Mapping link. Click on “Edit Public URLs”. You will see a GUI similar to the following:

alternate access mapping

Select your we abbplication and provide a url for internet, for this url you will need to write a rule in ISA Server. Once it is done, you will be able to access your sharepoint site on internet.

Problem 2

You have accessed your sharepoint site on internet successfully but you will face a problem that whenever you access your second level or third level links, you will get “Page cannot be displayed” error.

Solution

  • If you are using ISA Server 2004, edit your rule. Edit HTTP of the Rule and unmark “Verify Normalization” option.
  • If you are using ISA Server 2006 in order to define a rule, define a rule for “sharepoint website” instead of “website”. It will automatically unmark “Verify Normalization” option.

Problem 3

You have successfully accessed all your pages on the internet. But still you may face an issue if you have developed a custom page to be opened on clicking “New Item” on a list. The custom page will open as required on intranet but when accessed through internet, you will see the default sharepoint “new form” instead of your custom form.

Solution

In order to solve this issue, again go to Alternate Access Mapping and go to “Edit Public URLs”. In the Intranet box, remove the port number like if http://server_name:port was written, make it http://server_name with no port number. Now when you will access your site on internet, you will be able to see your custom form as required. This solution is true if you are using ISA Server 2006. For earlier versions, this solution won’t work.

SharePoint , , , , , ,


Copyright © 2006-2011 W@rfi