Wednesday, December 29, 2010

Cannot open log for source ‘Custom_Web_Part’. You may not have write access

In a SharePoint site, When I logged in as an administrator, all pages accessed successfully. But as a regular user it scolded me with Access denied Error :-)


Enabled the stack trace and Turned off custom error message page to get the actual error.

Error detail: System.ComponentModel.Win32Exception: Access is denied. Below it, in the stack trace, another exception popped: InvalidOperationException: Cannot open log for source ‘My_Web_Part’. You may not have write access.
 
Cannot open log for source My_Web_Part. You may not have write access.

This is because non-administrators do not have the permission to write on the event log. So for this problem, just grant non-administrator users permission to write on the event log.

  1. Open registry editor by typing "regedit" in run box.
  2. Navigate to: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Eventlog\Application
  3. Look for CustomSD, it should contain string:
     O:BAG:SYD:(D;;0xf0007;;;AN)(D;;0xf0007;;;BG)(A;;0xf0007;;;SY)(A;;0x7;;;BA) (A;;0x7;;;SO)(A;;0x3;;;IU)(A;;0x3;;;SU)(A;;0x3;;;S-1-5-3)

    The string is formatted as an SDDL, you can find more information about the format at Microsoft’s site.
  4. Now change the value to give the event log’s read-write permission to all authenticated users. To do this, append the string (A;;0x3;;;AU) to the entry CustomSD, So it becomes:

        O:BAG:SYD:(D;;0xf0007;;;AN)(D;;0xf0007;;;BG)(A;;0xf0007;;;SY)(A;;0x7;;;BA) (A;;0x7;;;SO)(A;;0x3;;;IU)(A;;0x3;;;SU)(A;;0x3;;;S-1-5-3)(A;;0x3;;;AU)
Always, Its a best practice to Backup registry before you do any change.


You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Monday, December 27, 2010

How to Add Banner image in SharePoint - Simple way

Banners are the great way to add branding to SharePoint site. There are lot of ways to add banner in SharePoint, Here I'm going to illustrate a easy way to add Top banner in SharePoint.

In SharePoint 2010:
In SharePoint 2010, CSS class you have to pick and modify is: .s4-title
.s4-title
{
background-image: url("/_layouts/images/banner.png") #FECF2C no-repeat;
}

For MOSS 2007:
In SharePoint 2010, the CSS class you have to pick and modify is: .ms-globalbreadcrumb
So, override this class as:

.ms-globalbreadcrumb
{
background-image:url("/_layouts/images/banner.jpg");
padding:2px 10px 80px 5px;
}


You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Sunday, December 26, 2010

You may be trying to access this site from a secured browser on the server. Please enable scripts and reload this page.

Internet explorer displays the message at top "You may be trying to access this site from a secured browser on the server. Please enable scripts and reload this page."?
You may be trying to access this site from a secured browser on the server. Please enable scripts and reload this page.

Fix is: This is because Internet Explorer Enhanced Security Configuration. So simply disable IE ESC to fix this issue.

Go to "Start >> Administrative Tools >> Server Manager >> Configure IE ESC >>Select Off for Administrators and click OK.
Configure Internet Explorer Enhanced Security - IE ESC
This may happen you you have IE developer tool and disabled scripts! just uncheck "Scripts" under Disable Menu to rectify. Adding site to Trusted Sites zone on Internet Explorer also fixes the problem.

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Thursday, December 23, 2010

Exclude SharePoint Folders from Antivirus

In SharePoint servers, some of the SharePoint, IIS, SQL Server folders should be excluded from anti-virus protection in order to avoid performance hits!

such as: (C:\ may be other drive as well)
  • C:\Program Files\Microsoft Office Servers\14.0\Logs 
  • C:\Program Files\Microsoft Office Servers\14.0\Data.
  • C:\Program Files\Microsoft Office Servers\14.0\Bin
  • C:\Program Files\Microsoft Office Servers\14.0\Synchronization Service, 
  • C:\Documents and Settings\Default User\Local Settings\Temp,
  • etc
There are many First party/third party products offers Antivirus plug-in for SharePoint:
http://www.microsoft.com/forefront/sharepoint/en/us/product-overview.aspx
http://us.trendmicro.com/us/products/enterprise/portalprotect/index.html

Thanks to: http://vspug.com/bobbyhabib/2008/04/22/moss-anti-virus-guidelines/

Microsoft KB addressing this issue: http://support.microsoft.com/kb/952167
For SQL Server: http://support.microsoft.com/kb/309422
IIS: http://support.microsoft.com/kb/821749 

For SharePoint 2013, Exclude these folders from Anti-Virus: http://support.microsoft.com/kb/952167

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Wednesday, December 22, 2010

Log Errors to Windows Event Log or SharePoint Log Programmatically

Using Windows Event - Logs
During development its worth to log errors either in Windows Event log or in SharePoint log files for further troubleshooting.

try
{
//Do something
}
catch (Exception ex)
{
SPSecurity.RunWithElevatedPrivileges(delegate
{
System.Diagnostics.EventLog.WriteEntry("My Custom Solution", ex.Message + " Inner Exception: " + ex.InnerException + " Call Stack: " + ex.StackTrace, EventLogEntryType.Error);
});
}

Beside this you can also use Trace.write or Debug.write



Use SharePoint Log Files:
try
{
//Do something
}
catch (Exception ex)
{
 //In SharePoint 2010
 SPDiagnosticsService.Local.WriteTrace(0, new SPDiagnosticsCategory("My Custom Solution", TraceSeverity.Unexpected, EventSeverity.Error), TraceSeverity.Unexpected, ex.Message, ex.StackTrace);
  
 //In MOSS 2007
 Microsoft.Office.Server.Diagnostics.PortalLog.LogString("Exception Occurred: {0} || {1}", ex.Message, ex.StackTrace);
 
}


You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Sunday, December 19, 2010

All People Link in SharePoint 2010

"All People" is really helpful if you want to see who are all the people have access to site and if you want to delete the user from site completely in SharePoint 2007, as shown below.

All People Link in SharePoint 2010

But in SharePoint 2010 All People Link is missing!!!  Don't panic. We can get it back by a simple trick.

So What is the trick? 
The trick is: Navigate to : "http://Your-SharePoint-site/_layouts/people.aspx?MembershipGroupId=0"

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Saturday, December 18, 2010

Extract line by Line in Nintex workflow

Through lazy approval in Nintex workflow, I had to extract the approver's comment line by line. Using Regular expressions in Nintex workflow we can accomplish that.
Extract line by Line in Nintex workflow

Regular expressions:

Regular expressions in Nintex Workflow

 Here the "ApproverComments" is a collection variable. You can extract from the collection and update the list using For-each & Run-If conditions

Get the 3rd line:


You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Thursday, December 16, 2010

Fix for SharePoint Datasheet Error: The list cannot be displayed in Datasheet view for one ore more of the following reasons

When I try to open a SharePoint 2010 list in Datasheet View, It scolded me by throwing below error:

The list cannot be displayed in Datasheet view for one ore more of the following reasons:
   - A datasheet component compatible with Microsoft SharePoint Foundation is not installed.
   - Your Web browser does not support ActiveX controls.
   - A component is not properly configured for 32-bit or 64-bit support.
The list cannot be displayed in Datasheet view for one ore more of the following reasons - SharePoint Datasheet Error
Or you may face the similar issue:
"The list is displayed in Standard view. It cannot be displayed in Datasheet view for one or more of the following reasons: A datasheet component compatible with Microsoft SharePoint Foundation is not installed, your browser does not support ActiveX controls, a component is not properly configured for 32-bit or 64-bit support, or support for ActiveX controls is disabled."
The list is displayed in Standard view. It cannot be displayed in Datasheet view for one or more of the following reasons
First, you need to have an Office installation in order to use the datasheet view.

Yes, You may have Ms-Office installed. but the Edit in Datasheet view functionality is not supported if you install 64-bit Office 2010. However, the functionality is available if you install 32-bit Office 2010. The ActiveX control needed for the datasheet view is incompatible with the 64 bit version of Office.

Fix: Install Office 2007/2010 Access Runtime - Data Connectivity Component:

KB: http://support.microsoft.com/kb/2266203

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Sunday, November 14, 2010

Stsadm -o activatefeature gives Access to the Path Denied Error

When trying to activate a feature using stsadm -o activatefeature, It gave me: Access to the Path <feature path> is denied." Error
Stsadm -o activatefeature Access Denied

Then I used -name switch instead of -filename and it worked!


You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Wednesday, November 10, 2010

How to Enable Anonymous Access in SharePoint 2010

How to enable anonymous access in SharePoint 2010? To Enable Anonymous access in SharePoint 2010, We need to do the change in Central admin & Site collection:

Central Administration Change:
Go to: Central Administration > Application Management > Manage Web Applications , and Select your web application by highlighting it.
enable anonymous access sharepoint 2010 web application

 click "Authentication Providers", Click on "Default" link
Enable Anonymous Access - Authentication Providers

Check "Enable Anonymous Access" under Anonymous Access Section > click "Save"
Enable Anonymous Access in SharePoint 2010

Site Collection Change:
Now, W need to Do the change in Site collection level. Click on "Site Actions >  Site Permissions
enable anonymous access sharepoint 2010 site

Click "Anonymous Access" , Select "Entire Web Site" at Anonymous Access Section
enable anonymous access sharepoint 2010 list or Library



You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Friday, November 5, 2010

Page Redirect using CEWP JavaScript in SharePoint

There are some situations, where we need to place re-directs in SharePoint pages. OK.. How to do that?

Simple! We can redirect using content editor web part in SharePoint. Just add a content editor web part, and place the below JavaScript code:

<script type="text/javascript">

// <![CDATA[
alert("This application has been moved to replaced with an another version, please update all existing bookmarks.  You will be redirected momentarily.");
// ]]>
</script>

<meta http-equiv="refresh" content="0;url=https://MyNewURL/default.aspx">
This will redirect to another page. You can use SharePoint's native method also:

SharePoint redirect page in 5 seconds
 <script type="text/javascript">

  function redirect() {
    //sharepoint 2010 redirect page 5 seconds
    setTimeout("location.href='https://www.NewSite.com'", 5000);  
  }

  _spBodyOnLoadFunctionNames.push("redirect");

 </script>

OK. How do I edit this page again? Because It doesn't me to allow editing, it redirects me on the fly... Well you have to  go to the web part maintenance page( Just append ?contents=1 at the end of the URL in browser!) and remove this web part, edit again add the web part with changes!

Generally, for performance reasons, its a good idea to place redirects at ISA/Publishing server level. or at least in IIS Level.

SharePoint redirect before page load
The main disadvantage over the above methods is delay! We've to wait until the web part loads. What we can do to mitigate the delay is: Take-off all content from default.aspx and place the below code in it (via SPD):
<%@ Page language="C#" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" %> 

<script type="text/javascript">

window.location.href = "http://www.sharepoint.crescent.com/sites/salesv2/default.aspx";

</script> 
If you want a entire site to be redirected, consider: Redirect to another site collection in SharePoint

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Monday, November 1, 2010

Trick to Edit SharePoint List Forms to Add webpart (NewForm.Aspx, EditForm.aspx, AllItems.aspx, etc) in browser

By default, SharePoint doesn't allow us to edit the List forms in browser. See the Edit Page from Site action is greyed out! However, Its possible to edit SharePoint list form pages!
Edit SharePoint List forms in browser

Here is the trick to edit SharePoint List Forms (like DispForm.aspx, NewForm.aspx, EditForm.aspx) in browser. Just append: &toolpaneview=2 in the URL
Trick to Edit SharePoint List forms in browser

Now, you will get editable page, You can Add web parts!

Add Web Part to SharePoint List form Pages
This trick works on even SharePoint 2010 and in SharePoint 2013 also!

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Saturday, October 23, 2010

Extract Assembly DLLs from GAC

Want to access GAC assembly folder's file system (say for Copying a DLL). Here is the shortcut to copy/extract GAC assemblies:

Go to Start >> Run >> type "c:\windows\assembly\gac_msil"
Extract Assembly DLLs from GAC
Now, You can get the GAC Files in File system. You can Extract the DLLs from here.
copy extract gac assemblies


You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Wednesday, October 13, 2010

Creating Custom Menu with Sub-Menus under Site Actions in SharePoint

We can add custom menu in site actions with our most accessed URL's like "Quota Increase", "Owner change", etc. like the below screen.

But, Why we need to do this?
  1. Well, It's a good user friendly addition, they don't need to search for a link to raise a quota increase or ownership change or etc.
  2. Security trimming - This will avoid incorrect persons raising the request and rejections.
  3. Mistyped URLs – This will avoid  wrong URL's being entered.  On clicking the link, we can direct them to the request form with auto filled URL's of the site.
Creating custom menu with sub menus under site actions

Here is the code:

using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI.WebControls;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint;

namespace Crescent.SharePointSupport
{
public class SiteActionsMenu : WebControl{
protected override void CreateChildControls()
{
SPContext.Current.Site.CatchAccessDeniedException = false;
base.CreateChildControls();
try{
SPContext.Current.Web.CheckPermissions(SPBasePermissions.ManageSubwebs);
//MenuItemTemplate siteCollSettings =
//GetNewItemTemplate("Top Level Site Settings", "/_layouts/settings.aspx", "/_layouts/images/crtsite.gif", "Manage site settings for top level site.");
//siteCollSettings.Sequence = 399;
//this.Controls.Add(siteCollSettings);
}
catch (UnauthorizedAccessException)
{
// Do nothing}
AddSharePointSupportMenus();
}


private void AddSharePointSupportMenus()
{
try{
SPContext.Current.Web.CheckPermissions(SPBasePermissions.ManagePermissions);
}
catch (UnauthorizedAccessException)
{
return;
}

SubMenuTemplate userAndPermissions = GetNewMenuTemplate("SmartTools.EnhancedSiteActions.UserAndPermissions", "SharePoint Support", "Access SharePoint Support Links.", "/_layouts/images/menuprofile.gif", 402);

string url = string.Format("{0}/_layouts/people.aspx", SPContext.Current.Web.Url);
MenuItemTemplate peopleAndGroups = GetNewItemTemplate("Quota Increase", url, "/_layouts/images/PPEOPLE.GIF", "Raise a Request for increasing the site quota.");
userAndPermissions.Controls.Add(peopleAndGroups);

url = string.Format("{0}/_layouts/user.aspx", SPContext.Current.Web.Url);
MenuItemTemplate advPerm =
GetNewItemTemplate("Ownership Change", url, "/_layouts/images/menupersonalize.gif", "Raise a request to change the site owners.");
userAndPermissions.Controls.Add(advPerm);


url = string.Format("{0}/_layouts/user.aspx", SPContext.Current.Web.Url);
MenuItemTemplate Deletesite = GetNewItemTemplate("Request to delete Site", url, "/_layouts/images/manageuser.gif", "Raise a request to delete the current site.");
userAndPermissions.Controls.Add(Deletesite);

url = string.Format("{0}/_layouts/user.aspx", SPContext.Current.Web.Url);
MenuItemTemplate ChangeURL =GetNewItemTemplate("Request to change Site URL", url, "/_layouts/images/LISTSET.GIF", "Raise a request to change the current site's URL.");
userAndPermissions.Controls.Add(ChangeURL);

url = string.Format("{0}/_layouts/user.aspx", SPContext.Current.Web.Url);
MenuItemTemplate Genquery =GetNewItemTemplate("General Query to Support", url, "/_layouts/images/menuprofile.gif", "Send a question to SharePoint Support.");
userAndPermissions.Controls.Add(Genquery);

url = string.Format("{0}/_layouts/user.aspx", SPContext.Current.Web.Url);
MenuItemTemplate FAQLinks =GetNewItemTemplate("Frequently Asked Questions(FAQ)", url, "/_layouts/images/NEWSPG.GIF", "Access Frequently asked questions section");
userAndPermissions.Controls.Add(FAQLinks);

url = string.Format("{0}/_layouts/user.aspx", SPContext.Current.Web.Url);
MenuItemTemplate Learning =
GetNewItemTemplate("SharePoint Learning", url, "/_layouts/images/Home.gif", "Access SharePoint Learning section");
userAndPermissions.Controls.Add(Learning);
 

this.Controls.Add(userAndPermissions);
}

private static MenuItemTemplate GetNewItemTemplate(string text, string url, string imageUrl, string description)
{
MenuItemTemplate item = new MenuItemTemplate();
item.Text = text;
item.ClientOnClickNavigateUrl = url;

item.ImageUrl = imageUrl;
item.Description = description;
return item;
}

private static SubMenuTemplate GetNewMenuTemplate(string id, string text, string description, string imageUrl, int sequence)
{
SubMenuTemplate menuTemplate = new SubMenuTemplate();
menuTemplate.Text = text;
menuTemplate.Description = description;
menuTemplate.ID = id;
menuTemplate.ImageUrl = imageUrl;
menuTemplate.Sequence = sequence;
return menuTemplate;
}
}

Don't forget to add a safe control entry.

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Sunday, October 10, 2010

Manage Blocked File Types in SharePoint

Recently another user came to me saying, He got the below error while he tried uploading a file to SharePoint:

"The following file(s) have been blocked by the administrator"

This is because: The user tried uploading .OCX files, which were in the blocked file type. Here is what I did to allow the OCX files. Blocked File types option in SharePoint is a great security/governance feature.  You don't want your users to upload executable or Movie files to SharePoint libraries, Isn't it?

Unblocking Blocked File Types: Manage blocked file types SharePoint
  • Open central administration site.
  • Go to Operations tab.
  • Find a section named "Security Configuration".
  • Under this section, you can find a link for "Blocked file types".
Blocked File Types in SharePoint
Select the Web Application that you would like to modify from the drop down list
remove blocked file types sharepoint
You will now have a large list showing all of the blocked file extensions, allowing you to add and remove them from the list. In this case you want to allow OCX files so they could shared through SharePoint, Just Remove the file type OCX and click "OK".

Configuring Blocked File Types in SharePoint 2010

For SharePoint 2010, You can navigate to: Central Adminstration >> Security >> Define blocked file types.

Change blocked file types SharePoint 2010 
Define Blocked File Types
Is SharePoint blocking Files Based on File Extension or actual file type?
Remember, SharePoint blocks file based on its extensions and not by the actual file type. Which means, You can rename the blocked file type (E.g. Rename "Program.exe" to "Program.txt") and still upload them to SharePoint. To mitigate, you need to have Forefront Security for SharePoint, which can block files based on its type and not just extension.

SharePoint blocked file types global list

Blocked file types Central are configured in Central Administration, are applied per web application, not globally throughout your farm. Internally, SharePoint keeps a file in 14 hive (or 12 hive in MOSS 2007) Config folder docextflt.xml So, When you create a new web application, blocked files list getting populated from this xml file.

However changing this file will not affect any existing web applications created already. But this will impact the default blocked files list, when you create a new web application.
Glogal Blocked Files List docextflt.xml

Manage SharePoint blocked file types with PowerShell.

Write-host "Enter the Web Application URL:"
$WebAppURL= Read-Host
$WebApplication = Get-SPWebApplication $webAppURL
$Extensions = $WebApplication.BlockedFileExtensions
#SharePoint list blocked file types  
write-host "Blocked File Types:"
$Extensions | ForEach-Object {Write-Host $_}

#To Add a Blocked File type
$Extensions.Add("dlg")
$WebApplication.Update()
write-host "DLG File type has been Blocked"

#To Remove a Blocked File type
$Extensions.Remove("dlg")
$WebApplication.Update()
write-host "Blocked File type DLG has been Removed"

You can remove Blocked File Types in SharePoint Object Model(C#) programmatically:
Collection<string> be = webApplication.BlockedFileExtensions;
if (be.Contains("ocx")) be.Remove("ocx");
webApplication.Update();

For reference:  SharePoint 2010 default blocked file types:
ade
adp
app
asa
ashx
asmx
asp
bas
bat
cdx
cer
chm
class
cmd
cnt
com
config
cpl
crt
csh
der
dll
exe
fxp
gadget
grp
hlp
hpj
hta
htr
htw
ida
idc
idq
ins
isp
its
jse
ksh
lnk
mad
maf
mag
mam
maq
mar
mas
mat
mau
mav
maw
mcf
mda
mdb
mde
mdt
mdw
mdz
msc
msh
msh1
msh1xml
msh2
msh2xml
mshxml
msi
msp
mst
ops
pcd
pif
pl
prf
prg
printer
ps1
ps1xml
ps2
ps2xml
psc1
psc2
pst
reg
rem
scf
scr
sct
shb
shs
shtm
shtml
soap
stm
svc
url
vb
vbe
vbs
ws
wsc
wsf
wsh

Technet Article: http://technet.microsoft.com/en-us/library/cc262496.aspx

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Tuesday, October 5, 2010

List Aggregation-Rollup across site collections (Even across Farms) using Dataview, Web Services in SharePoint

With SharePoint web services and dataview web part, You can aggregate the lists/document libraries/etc between sub-sites/site collections/web applications/even across forms.

So, Here I'm going to walk through how to achieve this using a simple example. Lets say I've two sites namely:  Site1  and Site2 and I've a Announcement List 1 in Site 1 and Announcement List 2 in Site2.

Now, What I want to create is: in my portal, I would like to create a consolidated view which has both the announcements from site 1 and site2. Follow the below steps.

1. Open the SharePoint designer and Create a Aspx page
list aggregation sharepoint

2. Go to Dataview >> Click on "Manage data sources"
list aggregation sharepoint 2007
3. Expand the "XML Web Services" node in Data source Library" and click on Connect to a web service

4.  Enter the web service URL:  http://sitename/_vti_bin/lists.asmx , click on "Connect Now" then, select the GetListItems Method. Enter the List Name. Supply the Login parameters.
Specify the web service URL and pick: GetListItems operation.

5. Do the same for all other lists you would like to connect. Finally you will have the data sources like this:
sharepoint list rollup

6. Now expand the "Linked sources" in data source Library and add the web services sources you have created.
List rollup SharePoint

7. Insert a dataview into the Aspx page you created.
 sharepoint cross list rollup

8. Drag and Drop the z:row From Linked source to Dataview webpart.
Combine List Data in SharePoint

 9. Finally you will get the merged data.
Merge Data from Multiple Lists SharePoint
10. Do the cleanup, change the column headers, apply the master page, Filters!

Here is my another post on comparing third party tools for the same purpose:
List Aggregation/Rollup In SharePoint -Third Party Products Comparison

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Saturday, October 2, 2010

Add Favicon for SharePoint sites

What is FavIcon? Favicon appears next to the URL in the address bar and in bookmarks menu next to the site name will show with the icon. In SharePoint Favicons are good way to add some additional branding to SharePoint sites.
sharepoint 2010 branding favicon

How to create a FavIcon?
Simple. Take your company logo or image, convert it to .ICO format, upload to Images folder in 12 or14 hive, Edit the master page.

you can try the free sites to create your favIcon as well:
  1. http://tools.dynamicdrive.com/favicon/
  2. http://www.favicon.cc/

Here are the detailed steps to add FavIcon in SharePoint:
Copy the favicon.ico file in your SharePoint WFEs "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES\" or you can upload to a SharePoint library even. For SharePoint 2013, FavIcon located at: C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\IMAGES
Add FAV Icon in SharePoint 2010

Edit the master page (typically default.master or V4.master):
For SharePoint 2010: Find and update this code:  
<SharePoint:SPShortcutIcon ID="SPShortcutIcon1" runat="server" IconUrl="/_layouts/images/myfavicon.ico"/>


You can edit the master page using SharePoint Designer to change favicon or you can directly edit it from File system: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\GLOBAL\V4.master

In case you are uploading your icon to a sharePoint library, then change the path to: <SharePoint:SPShortcutIcon ID="SPShortcutIcon1" runat="server" IconUrl="<% $SPUrl:~SiteCollection/Style%20Library/Images/myfavicon.ico %>"

In some browsers you may need to place the <link rel="shortcut icon" href="/_layouts/images/myfavicon.ico" />  attribute right before </head> tag.

For SharePoint 2007: Change favicon
To Change Favicon in SharePoint 2007, Right before the closing head tag, add the following line :

    <link rel="shortcut icon" href="/_layouts/images/myfavicon.ico" />

Do IIS reset, clear browser cache/temporary internet files. Close the browser and reopen then browse the SharePoint site.
    
That's all!

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Saturday, September 25, 2010

How to find the SharePoint Site Template being Used

How to find the site template of an existing SharePoint site? There are many ways to find the site definition being used for a site, Here are some:

1. Use SharePoint Manager to find SharePoint site template. Navigate thru the site, and look for "Web Template" as in the below picture.

2. Stsadm: Get current site template in SharePoint
stsadm.exe -o enumallwebs -databasename <content-db-name> > Template.txt
Now, Open the template.txt file and check for template. This trick can be used to find site template name for SharePoint 2010 even.
sharepoint find site template id

3. Sql Server: SQL Server is the back-bone of SharePoint, So lets use the SQL Query to determine SharePoint site template used:
SELECT Title, WebTemplate FROM dbo.Webs WHERE Title='Your Site'

4. You can programmatically use SharePoint Object Model to find site template of SharePoint site. Just query  SPWeb.WebTemplateId. Here is the reference table for SharePoint 2007:
Template IDCodeDescription
1 STS  "windows SharePoint Services Site", "Team Site", "Blank Site", "Document Workspace"
2 MPS  "Basic Meeting Workspace", "Blank Meeting Workspace", "Decision Meeting Workspace", "Social Meeting Workspace", "Multipage Meeting Workspace"
3 CENTRALADMIN  "Central Admin Site"
4 WIKI  "Wiki Site"
7 BDR  "Document Center"
9 BLOG  "Blog"
20 SPS (OBSOLETE)  "SharePoint Portal Server Site"
21 SPSPERS  "SharePoint Portal Server Personal Space"
22 SPSMSITE  "Personalization Site"
30 SPSTOC (OBSOLETE)  "Contents area Template"
31 SPSTOPIC (OBSOLETE)  "Topic area template"
32 SPSNEWS (OBSOLETE)  "News area template"
33 SPSNHOME (SubWebOnly)  "News Home template"
34 SPSSITES  "Site Directory area template"
36 SPSCOMMU (OBSOLETE)  "Community area template"
38 SPSREPORTCENTER  "Report Center Site"
39 CMSPUBLISHING (SetupPath=SiteTemplates\PUBLISHING)  "Publishing and Team Collaboration Site"
40 OSRV (SetupPath=SiteTemplates\OSRV)  "Shared Services Administration Site"
47 SPSPORTAL  "Corporate Intranet Site"
50 SRCHCEN  "Search Center"
51 PROFILES  "Profiles"
52 BLANKINTERNETCONTAINER  "Internet Presence Web Site"
53 BLANKINTERNET  "Publishing Site", "Press Releases Site", "Publishing Site"
54 SPSMSITEHOST  "My Site Host"
90 SRCHCENTERLITE (SetupPath=SiteTemplates\SRCHCENTERLITE)  "Search Center Lite"
6221 PWA (SetupPath=SiteTemplates\PWA)  "Project Web Access Site"
6215 PWS (SetupPath=SiteTemplates\PWS)  "Project Workspace"
14483 OFFILE  "Records Repository", "Records Repository"

5. SharePoint 2010 - Find template used create site: Get SharePoint site template id using PowerShell:
In SharePoint 2010, You can get the list of site templates by using a PowerShell Cmd-let:
Get-SPWebTemplate

Here is the reference table for SharePoint 2010:
Site Template IDSite Definition
STS#0Team Site
STS#1Blank Site
STS#2Document Workspace
BLOG#0Blog
SGS#0Group Work Site
VISPRUS#0Visio Process Repository
MPS#0Basic Meeting Workspace
MPS#1Blank Meeting Workspace
MPS#2Decision Meeting Workspace
MPS#3Social Meeting Workspace
MPS#4Multipage Meeting Workspace
ACCSRV#1Assets Web Database
ACCSRV#3Charitable Contributions Web Database
ACCSRV#41Contacts Web Database
ACCSRV#6Issues Web Database
ACCSRV#5Projects Web Database
BDR#0Document Center
OFFILE#1Records Center
BICenterSite#0Business Intelligence Center
SPSMSITEHOST#0My Site Host
SPSMSITE#0Personalization Site
SRCHCEN#0Enterprise Search Center
SRCHCENTERLITE#0Basic Search Center
SRCHCENTERFAST#0FAST Search Center
ENTERWIKI#0Enterprise Wiki
BLANKINTERNETCONTAINER#0Publishing Portal
CMSPUBLISHING#0Publishing Site

6. Last but not least: Go to the view source of the SharePoint page >> Search for "SiteTemplateID" to find site template name SharePoint 2010.
find template used sharepoint site


You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


You might also like:

Related Posts Plugin for WordPress, Blogger...