How to Redirect Users from One SharePoint Site to Another Using the Content Editor Web Part

Do you want to redirect users from one site to another in SharePoint?
Maybe you’re migrating from SharePoint 2007 to SharePoint 2010 and you want users who have bookmarks to receive a notification before you completely pull the plug.

Well, this post will give you a way to use the Content Editor Web Part to prompt users with a dialog informing them the site is being moved, and then automatically redirect users from one site to another.

Step 1:
Go to the source site that you would like users to be redirected from.
On this site, click 'Site Actions' > 'Edit Page'

Step 2:
Add the 'Content Editor Web Part' to any zone on the page. Click 'Add a Web Part'

You should now see the 'Add Web Parts' Windows where you can choose the Content Editor Web Part as shown below:

Select 'Content Editor Web Part' and click 'Add'.

Step 3:
Next, we need to modify the web part by clicking 'Edit' > 'Modify Shred Web Part'.

Once we have clicked the modify button a window opens on the right hand side of the browser with various options for the web part. We want to add our code to the webpart that does the redirect when a users lands on the page.

Click the 'Source Editor' button

In the window that opens up, we need to enter the code for the redirect as follows:
*Note: Change MYSITEURL to the site you will redirect your users to. This is your destination site.
You can also customize the message text below if desired:

<script type=""text/javascript"">// <![CDATA[
alert("This site has been moved to another location, please update all existing bookmarks. If you have questions or concerns, please contact the Help Desk. You will be redirected momentarily.");
// ]]></script>
<meta http-equiv="refresh" content="5;url=http://MYSITEURL/Pages/default.aspx">



Click the 'Save' button, and publish the page, then you're done!

Users who navigate to this page will be greeted with a popup and redirected in 5 seconds (the default time). 
*Note: If you want to change the amount of time before the redirect simply change the number of seconds by editing the following number representing the time lapse:


<meta http-equiv="refresh" content="5;url=http://SITEURL/Pages/default.aspx">

How to Enable Code Blocks in Sharepoint 2010

So you may have started to configure Performance Point and come across an error when clicking on 'Start using PerformancePoint Services' in your new Business Intelligence Center, as shown below: 
Error: 'An error occurred during the processing of /sitename/Pages/ppssample.aspx. Code Blocks are not allowed in this file.

To resolve this issue, follow the steps below:

  • Backup the file then open the file and locate the section: <PageParserPaths>
  • In the <PageParserPaths> section, add the following lines shown in yellow below, making sure you substitute the 'sitename' for your specific site name, which could be found in your error message. In my example, the site giving me an error is 'bicenter':
<PageParserPaths>
<PageParserPath VirtualPath="/bicenter/*"
      CompilationMode="Always" AllowServerSideScript="true"  IncludeSubFolders="true"/>
</PageParserPaths>
  • Again, notice I used 'bicenter' as this is the site mentioned in my error screenshot shown above. I also added an asterisk after /bicenter/ to enable code blocks on all sub folders.
  • Once I saved the file, I refreshed my 'bicenter' site, no more error and my site opened just fine!

How To Increase the Default Throttle Size for BCS in SharePoint 2010

If you have received the Error Message:

"Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator."


There is a good chance you are experiencing the default 2000 item limit in place for the SharePoint 2010 BCS configuration. Follow the steps below to resolve:

1. Open the Microsoft SharePoint PowerShell Prompt as Administrator:

Go to 'Start' > 'All Programs' > 'SharePoint 2010 Products' Then Right Click on 'SharePoint 2010 Management Shell' to open 
SharePoint PowerShell as an Administrator.


2. Execute the following commands in SharePoint PowerShell:


Command 1:
$bdcProxy = Get-SPServiceApplicationProxy | where {$_.GetType().FullName –eq (‘Microsoft.SharePoint.BusinessData.SharedService.’ + ‘BdcServiceApplicationProxy’)}


Command 2:
Get-SPBusinessDataCatalogThrottleConfig -Scope Database -ThrottleType Items -ServiceApplicationProxy $bdcProxy | Set-SPBusinessDataCatalogThrottleConfig -Maximum 100000000 -Default 500000


Command 3:
Get-SPBusinessDataCatalogThrottleConfig -Scope Database -ThrottleType Items -ServiceApplicationProxy $bdcProxy


Now verify that the output looks like this and you're all set!


Scope : Database
ThrottleType : Items
Enforced : True
Default : 500000
Max : 100000000

SharePoint 2007 to 2010 Database Attach Upgrade Procedure

This guide will help you attach and upgrade a SharePoint 2007 content database to a SharePoint 2010 environment, step by step.


Before Starting, Confirm the following:
SQL version is at least SQL2005 SP3 and x64
Permissions for sharepoint install & sharepoint farm admin accounts in SQL have dbo.
Verify SharePoint 2007 is at least SP2.


Perform Pre-upgrade Checker to determine risks
A detailed article is located here: http://technet.microsoft.com/en-us/library/cc262231.aspx 


*This gives you a detailed report output of the installed elements, the upgrade ability and approaches recommended based on your customization. 


**FYI: After reviewing my report, I was notified to manually copy over a custom Workflow .ACTIONS file as recommended. The report actually gave detail which was surprising!


Attaching the Restored SharePoint 2007 Database to SharePoint 2010


The steps for doing the database attach are as follows; please see this TechNet article for a more comprehensive step-by-step: http://technet.microsoft.com/en-us/library/cc263299.aspx 
  1. In SQL, create a backup of the current SharePoint 2007 database.
  2. Once completed, restore the full backup to a new database; remember what you named it as you’ll need that later.
  3. In the new SharePoint 2010 environment, ensure you have the web application that you’re going to target setup. (ex. blank Team Site created on the default site, port 80)
  4. On the SharePoint 2010 server, open the SharePoint Management Shell as an admin
  5. (Optional, but a good exercise) Execute the following powershell command: 
Test-SPContentDatabase -Name NEW_SP2010_DBNAME -WebApplication http://siteurl


*Note: on the Test powershell command, you will probably see some missing features, and in a lot of cases, these are the FAB40 templates. Install what you can, then proceed.


      6.  Next run the following command to Upgrade and Mount the content database to the new SharePoint 2010 environment:


Mount-SPContentDatabase -Name NEW_SP2010_DBNAME –DatabaseServer DBSERVERNAME -WebApplication http://siteurl


During this process, you will see an upgrade status in the powershell command prompt window. Alternately, you can view the upgrade status in Central Admin as well under the Database Options > Upgrade Status.


Once it’s all done (this may take a while depending on your database size), remove both of the content DB’s from Central admin, then run the Mount command once again and test!

Resolving 'Windows cannot find the local profile and is logging you on with a temporary profile' in Windows 2008 R2


So you noticed an error in your Event Log stating 'Windows cannot find the local profile and is logging you on with a temporary profile. Changes you make to this profile will be lost when you log off.'


Details
Event ID: 1511
Source: User Profile
Message: Windows cannot find the local profile and is logging you on with a temporary profile. Changes you make to this profile will be lost when you log off.


Explanation
Windows could not log you on with your local profile and has issued you a temporary profile.


Possible reasons include:
Your local profile is corrupt.
You no longer have adequate privileges to the profile folders.
All changes made to the temporary profile will be lost when you log off.


Resolution


1. Add the 'DOMAIN\app_pool_account' account to the “Domain Admins” groups.
2. Reboot the server into safe mode.
3. Log in as a Domain Administrator.
4. Deleted the temporary profile of the service account using User Profiles. Right Click 'My Computer' then click 'Properties' and go to 'Advanced System Settings' and on the 'Advanced' tab, click 'Settings' in the 'User Profiles' section:




5. Log-off Domain Administrator.
6. Logon as the problematic service account.
7. Reboot normally.
8. Removed service account from “Domain Admins” group.

Uploading User Profile Pictures into SharePoint 2010

This guide will show you a step by step process to upload user profile pictures into SharePoint 2010. The tool automatically re-sizes the pictures and stores them in the three different sizes used by SharePoint.

Items Needed on Local Computer
-Profile Image Upload Tool - Available here: http://spc3.codeplex.com/wikipage?title=ProfileImageUpload
-Folder with user profile pictures with the naming convention ‘domain_username.jpg’
  1. Launch the Profile Image Upload Tool Executable.
  2. Fill out the fields in the tool as shown in the picture below, and enter the password:

    3.  For the option ‘Import Directory’, click ‘Browse’ and choose the folder on your local computer where the user profile pictures you wish to upload are stored.

*Remember, these pictures need to have the naming format of ‘domain_username.jpg’. Example: contaso_bgates.jpg

4        4.  Click ‘Upload’ to begin uploading the images to SharePoint.
          5.  When the tool has completed uploading the pictures, the status box will show ‘Done’.

Possible Issues

During the upload process, you may see red text in the status box during upload and the tool will stop. Most of the time, the issue is because of a typo or the user profile is not found.

In some cases it could be a former employee, or the active directory account does not use the most common, first initial last name format.

In any case, just verify the error in the window, and make sure the username is correct and exists in Active Directory.