Thursday, April 18, 2013

Delegation tab in Active Directory User Console not available until a SPN is set

Recently, I configured Kerberos for SharePoint 2010.

As part of the configuration, I was trying to set values under delegation table for the user account.

I don't find the delegation tab for the user/service account.

Solution:  We have to set SPN for the user account. Then only, we will see delegation tab for the user account in Active Directory for Users.

Here are few blog posts referring to:
http://blogs.msdn.com/b/mattlind/archive/2010/01/14/delegation-tab-in-aduc-not-available-until-a-spn-is-set.aspx

http://social.technet.microsoft.com/Forums/en-US/winserverDS/thread/589e153f-f8a0-4aa2-a371-8e77ffa216dd/


Tuesday, July 10, 2012

SharePoint 2010 : Master Pages Basics

In SharePoint 2010, the site pages and application pages could link to the same master page. This is a nice enhancement in SP 2010 whereas in SP 2007 had limitations that made it difficult to support linking site pages and application pages to the same master page.


SharePoint Foundation provisions the following three master page instances:


a. v4.master
b. minimal.master
c. default.master

v4.master: This is the primary master page used as the standard master page in SharePoint 2010 sites. This common layout (also known as Chrome) contains elements such as Site Actions menu, the breadcrumb trail, the Ribbon, the Welcome menu, the Site Icon, the TopNav bar, and the Quick Launch. This master page provides the default layout for SharePoint 2010 sites.


minimal.master: This provides a page layout without any of the chrome that is included in v4.master. The minimal.mnaster page is used by several of the standard site page templates and application pages that are distributed along with SharePoint Foundation and SharePoint Server 2010.


default.master: This master page designed to support a feature known as Visual Upgrade, which assists companies that are upgrading SharePoint 2007 sites to run within SharePoint 2010 farms.


Visual Upgrade process:

Default.master contains the standard HTML layout and chrome of a SharePoint 2007 site. When a site is upgraded from SharePoint 2007 to SharePoint 2010, SharePoint Foundation has its pages initially link to default.master instead of v4.master. The idea is that companies can upgrade from SharePoint 2007 to SharePoint 2010 without forcing their users to switch to the new SharePoint 2010 user interface immediately.


Important Note:


a. default.master is involved only when upgrading SharePoint 2007 sites to SharePoint 2010. If we are not involved in upgrade scenarios, yours sites will never use default.master.


b. The master pages in the Master Page Gallery is that they are created initially in a ghosted state ie., every SharePoint 2010 site gets a copy of v4.master that is processed using a master page template that exists on the file system of the front-end Web server.
A customized master page runs in Safe Mode, which means that it cannot contain inline code.

Tuesday, October 18, 2011

"SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM."

Today, I come across with a situation. I am writing a WCF service which uses LINQ to talk to database tables for DML operations.

One of the table column is of DateTime format. I mapped this with System.DateTime in Csharp. When I ran the WCF service and tried to perform insert operation, it throws following error:

"SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM."

I found a fix at http://geekswithblogs.net/AzamSharp/archive/2008/01/10/118446.aspx

It worked great.

Friday, April 16, 2010

Default Web Part

When we create any list or document library, it gets created with few default aspx pages like AllItems.aspx, NewForm.aspx, EditForm.aspx and DispForm.aspx.

I generally preferred to customize these forms or by creating new views.

When we do it, the default web part in these pages is the biggest blocker to perform our work.

If we delete the default web part, god knows or Microsoft knows about the problems you will run into. So, NEVER EVER delete default web part from above pages. Better keep this web part hidden and closed. You can do it in the designer by right-clicking on the web part and go to web part properties. For NewForm.aspx and other aspx pages, we will see Edit Page link under Site Settings is disabled. Also, you are not allowed to user designer to remove/close/hide the web part when the application is in DEV/TEST/Production servers.

So, what is the alternative?

For the above pages, append "contents=1" at the end of the url.

Note: If the url has no parameters, then add "?contents=1". If the url has # at the end, then delete the character "#" and then add "&contents=1".

I ran into this issue during my deployment of sharepoint application.

Thursday, March 11, 2010

How to hide search control on default.master

Summary:

This post describes how to hide the search control on default.master. The steps described below are applicable for other master pages, as well.

Resolution:
Open SharePoint Designer 2007. Go to File | Open Site and connect to SharePoint site.

Expand out _catalogs -> masterpage -> open default.master. Check out file, if necessary.

In Code View, search for "PlaceHolderSearchArea". After id="PlaceHolderSearchArea", add the following property: Visible="false". In all, the code should look something like:


<asp:ContentPlaceHolder id="PlaceHolderSearchArea" Visible="false" runat="server">
<SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox"/>
</asp:ContentPlaceHolder>


Save master page, check in (if necessary), and publish major version.

NOTE: To reverse the changes, simply set Visible="true" on the placeholder.

I decided to write this post as we've seen several support cases with questions on how to hide / manipulate the search control on master pages. This post just covers hiding the search box. There are multiple ways to hide the search control, to be sure, including using CSS (ex: "display:none;").

NOTE:
You can see the original post

Wednesday, January 20, 2010

Newline breaks in XSLT (SharePoint DataForm Web Part)

Scenario: In a custom sharepoint .aspx page, I placed a dataform web part for display page of an item. The item has a column called "Contents". This is a field contains data as paragraphs. When I created a new item, entered data into "Contents" field with spaces between paragraphs. I want to see the data as I entered earlier in the EditForm.aspx & DisplayForm.aspx pages.

When I used , the contents field showed the data without newlines between the paragraphs.

Example:

I entered the data in NewForm.aspx as below:
"
aasdflasdf asdf asdf asdf asdf asdf.

234234aefase5asfgasdfa
asdfasdf
asdf
asdf
a

asdfasdfas"

Note: You can see spaces between the above statements. When I tried to display above content in DisplayForm.aspx, it showed without spaces & special characters as below:

"aasdflasdf asdf asdf asdf asdf asdf.234234aefase5asfgasdfaasdfasdfasdfasdfaasdfasdfas"

Solution:

Add following attributes to xsl:value-of tag:
a. select="ddwrt:AutoNewLine(string(@Contents))"
b. disable-output-escaping="yes"

Note:
1. You can find information about ddwrt:AutoNewLine at Microsoft Site.
2. disable-output-escaping="yes" attribute is meant for showing all special characters like quotes and so on.

Friday, January 15, 2010

Cannot add attachment to custom list form in SharePoint 2007

The problem is that whenever you customize a list form—for example, remove assignment and status fields from a form to submit new issues—you break the ability for the user to add attachments to the list item from that form. In most cases, we got an "Error on Page" at in the status bar with the following message shown in the Error Details:

Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus.

We finally have a resolution now, although it does take code modifications to each customized list form. See the complete details here:

http://support.microsoft.com/kb/953271

**Pay careful attention to the code. For new item forms, there are SEVERAL changes required to the code and the changes must be made in multiple places.

Source: https://staceybailey.securespsites.com/blog/Lists/Posts/Post.aspx?ID=13