I was deploying a new release for a SharePoint project that i'm working on with my team, when i was try to backup and restore a site collection from my development to staging environment, I got this error:
Enterpreneur and Technology advocate, Founder of Hadafsoft , M.Sc. of Computer Science, Engineer, & Solutions Architect. Follow me on twitter for quick updates: @mostafaelzoghbi
Thursday, November 10, 2011
SharePoint Restore Error: Your backup is from a different version of Microsoft SharePoint Foundation and cannot be restored to a server running the current version. The backup file should be restored to a server with version '14.0.0.5050' or later
I was deploying a new release for a SharePoint project that i'm working on with my team, when i was try to backup and restore a site collection from my development to staging environment, I got this error:
Wednesday, November 02, 2011
Secure Store Service Error in SharePoint 2010 : Secure Store Service is not accessible
I have been noticed that one of our SharePoint 2010 installation has a problem when trying to click on Secure Store Service in central administration.
The problem is : Try to click on SSS service in Central Administration and you will get an error page.
How to check the exact problem: I checked the event log in my server and i found the following error:
The Secure Store Service application Secure Store Service is not accessible. The full exception text is: The HTTP service located at https://PORTALURL/b04c52908ae5479596745e86b13875d4/SecureStoreService.svc/https is too busy.
To cause of the problem: the SSS service is not provisioned correctly, and to fix it:
Select the secure store service and from the ribbon click on properties. Verify the information that you have and click on OK. this action will provision the required DB and other service application configuration for this service.
This action will take around 5 minutes or depends on the performance of your server.
You don't need to re-install or run the configuration wizard for this fix.
Hope this helps :) Happy SharePointing...
User Profile Synchronization in SharePoint 2010 Facts
I'd like to share with you some important facts about User Profile synchronization in SharePoint 2010. SharePoint 2010 has User Profile Service application which provides a two-way synchronization for users/groups from your directory services or any external system in sync with SharePoint 2010 users and groups profiles.
Terms used in this post:
* UP: User Profile.
* UPSSA: User Profile Synchronization Service Application.
* UPSS: User Profile Synchronization Service.
Here are some facts you should be aware when you start planning for user profiles in SharePoint:
1) SharePoint 2010 has User Profile Service Application which manage the synchronization process between SP and AD or any external system that contains users & groups.
2) SP 2010 provisions a version of Microsoft Forefront Identity Manager to participate in synchronization.
3) UPSSA can only have one user profile synchronization service.
4) A UPSS is associated with connections and mappings.
5) We divide connections in UPSS into two types: connections to directory services, and connections to business systems.
6) When you setup a connection in UPSS to connect to directory services, You specify which containers to be included in the synchronization. You can specify filters to exclude service or disabled accounts.
7) Mapping is a step to map SharePoint user profile fields to directory services/external system user profile master data fields.
8) Upon each synchronization, SharePoint deletes SP users who have been deleted from Directory services.
9) Upon each synchronization, SharePoint add and updates SP user profile's fields as configured in the UPSS.
10) IMPORTANT: If you have multiple directory services, each directory services MUST provide unique users. You can't synchronize a single user with multiple directory services.
11) IMPORTANT: You can populate properties from any existing business system. You can't create new user profiles from an external system, and you can't write data back to a business system.
12) To synchronize properties from external system, First you should create an external content type to bring data from the business system into SP 2010. Then you will be able to synchronize these users into SP.
13) You should have a key field to be used for mapping between SP user profiles and your external system. You can use employee's work email as the identifier of your external content type. In this case, SP will synchronize information which matches employee's email to be captured in your synchronization records.
14) You can build a custom solution using SP object model to create user profiles in SharePoint.
Hope this helps.
References:
1) Profile Synchronization overview in SP 2010:
http://technet.microsoft.com/en-us/library/gg188041.aspx
2) BCS Overview in SP 2010:
http://technet.microsoft.com/en-us/library/ee661740.aspx
Unable to use SQL Server because ASP.NET version 2.0 Session State is not installed on the SQL server. Please install ASP.NET Session State SQL Server version 2.0 or above.
I was deploying an asp.net website which configured to store session data in a custom databases in SQL Server 2008. After i scripted the whole DB and moved it to a new server and after deploying the website and try to run the application, I was getting this error:
Unable to use
SQL Server because ASP.NET version 2.0 Session State is not installed on the
SQL server. Please install ASP.NET Session State SQL Server version 2.0 or
above.
<system.web> <sessionState mode="SQLServer" cookieless="false" timeout="20" sqlConnectionString="data source=SERVERNAME; initial catalog=MYDB; user id=mostafa; password=mostafaelzoghbi" allowCustomSqlDatabase="true" /> system.web>
Friday, October 28, 2011
Best Practices for SQL 2008 in SharePoint 2010 Farm
In this post i'd like to share with you best practices for SQL 2008 R2 in SharePoint 2010 farm and the operations and configuration that need to be taken in place when installing, configuring and administrating SharePoint 2010.
1) Designing SQL 2008 servers in your SharePoint 2010 farm: When you decide which topology you will have in your SharePoint 2010 farm, the SQL Server 2008 should be in a dedicated server and shouldn't be having any other role in your SP 2010 farm.
2) After installing SQL 2008 R2, you shouldn't go and start SP 2010 installation with SQL 2008 R2 Default configuration, here is what you need to revise:
a) Don't enable auto-create statistics on SQL Server that's supporting SharePoint farm. You can enable/disable this feature on the DB level, here is the command you need to execute in your DB:
ALTER DATABASE dbname SET AUTO_CREATE_STATISTICS OFF
b) Set Maximum degree of parallelism to 1 for all SQL server instances that host SP 2010 DBs. The value behind this is that each request is served by a single SQL Server Process.sp_configure 'show advanced options', 1; GO RECONFIGURE WITH OVERRIDE; GO sp_configure 'max degree of parallelism', 1; GO RECONFIGURE WITH OVERRIDE; GO
3) Secure and harden your SQL 2008 server DB by blocking the default ports and block default SQL server default ports. Check Out ref #3.
4) Use SQL Server 2008 backup compression feature to speed up the SharePoint backup. This feature is available in SQL 2008 Ent. edition and SQL 2008 R2 standard edition too. This feature significantly reduces the backup file size and shipped logs. The only consideration you should know that this feature consumes more processing time that might affect the performance of your DB server if the server doesn't properly planned to have enough processing power. This feature you enable it on the server level under Database settings, you will find a check box to use DB compression.
Hope this helps and let me know if you have any additional notes or concerns.
Refereces:
1) Auto-Create Feature in SQL 2008:
http://blogs.technet.com/b/rob/archive/2008/05/16/sql-server-statistics.aspx
2) Set the maximum degree of parallelism in SQL 2008:
http://msdn.microsoft.com/en-us/library/ms181007.aspx
3) Harden & Secure SQL 2008 server DBs:
http://technet.microsoft.com/en-us/library/ff607733.aspx
http://technet.microsoft.com/en-us/library/cc262849.aspx
5) SQL 2008 Best practices in SharePoint 2010 Farm:
http://technet.microsoft.com/en-us/library/hh292622.aspx
Regards,
Mostafa Arafa
http://twitter.com/mostafaelzoghbi
Wednesday, October 05, 2011
Fix it: IIS Manager doesn't update web.config when you add HTTP Response headers in Azure
<system.webServer>
<staticContent>
<clientCache cacheControlMode="DisableCache" />
<staticContent>
<system.webServer>
Friday, August 26, 2011
Error occurred in deployment step 'Activate Features': 0x80070057 0 0
Wednesday, August 24, 2011
How to Open/Close Modal Dialogs in SharePoint 2010
Sunday, August 14, 2011
Building PPS solutions in SharePoint 2010
Tuesday, August 02, 2011
Fix It: The query could not complete because the data source is not in a performancePoint trusted location
Enable Non-Business Intelligence Center Sites with BI capabilities in SharePoint 2010
SharePoint Saturday "The Conference" DC 2011
Northern Virginia Community College
Annandale Campus, Annandale, VA
(Visit the website here.)
I will deliver a session under Dev/ITPro track with title :
| Building BI solutions using Performance Point Services in SharePoint 2010 |
| Speaker(s): Mostafa Elzoghbi |
| Session Level: 300 |
| Session Type: IT Pro / Developer |
| In this session I will cover PPS architecture & design fundamentals in SP 2010 and how to build BI solutions using SharePoint 2010 BI Center, BIDS, and Report Builder 3.0 with different data sources using DBs and Cubes. In addition to build, design, deploy Custom SSRS Reports within SharePoint. Tips in Configuring PPS application service in SharePoint 2010 and Reporting Services in SharePoint 2010. A demo driven session to create custom KPIs, Scorecards, Custom Reports and Dashboards. |
For more information, check out the website:
Friday, July 15, 2011
SharePoint Saturday NYC: PPS solutions in SharePoint 2010
In this session I will cover PPS architecture & design fundamentals in SP 2010 and how to build BI solutions using SharePoint 2010 BI Center, BIDS, and Report Builder 3.0 with different data sources using DBs and Cubes. In addition to build, design, deploy Custom SSRS Reports within SharePoint. Tips in Configuring PPS application service in SharePoint 2010 and Reporting Services in SharePoint 2010.
A demo driven session to create custom KPIs, Scorecards, Custom Reports and Dashboards.
Session Details page:
Don't miss this event and see you all there...
Download Presentation Url:
https://skydrive.live.com/?cid=4BC94054914A6469&id=4BC94054914A6469%213331&sc=documents
Thursday, June 02, 2011
Export ASP.NET Form to PDF
protected void ExportToPDF()
{ // Start exporting page contentstring attachment = "attachment; filename=MostafaElzoghbi.pdf";
Response.ClearContent();
Response.AddHeader("content-disposition", attachment); Response.ContentType = "application/pdf"; StringWriter stw = new StringWriter();
HtmlTextWriter htextw = new HtmlTextWriter(stw);
// We want to render the whole page, you can change this with the control name or portion you want to export. myDiv.RenderControl(htextw);
Document document = new Document();
PdfWriter.GetInstance(document, Response.OutputStream); document.Open();
StringReader str = new StringReader(stw.ToString());
HTMLWorker htmlworker = new HTMLWorker(document);
htmlworker.Parse(str);
document.Close();
Response.Write(document);
Response.End();
}
public override void VerifyRenderingInServerForm(Control control)
{ /* Do nothing */ }Monday, May 23, 2011
Upload Video to Facebook in C#
{ var mediaObject = new FacebookMediaObject
{ FileName = fileName,
ContentType = "video/3gpp" };
mediaObject.SetValue(fileBytes);
try { var fb = new FacebookClient(accessToken);
var parameters = new Dictionary<string, object>();
parameters["method"] = "video.upload";
parameters["caption"] = "video upload using rest api";
parameters["source"] = mediaObject; var result = (IDictionary<string, object>)fb.Post(parameters);
var videoId = (string)result["vid"];
Console.WriteLine("Video Id: {0}", videoId);
// Note: This json result is not the orginal json string as returned by Facebook. Console.WriteLine("Json: {0}", result.ToString());
return videoId; }
catch (FacebookApiException ex) {
// Note: make sure to handle this exception. throw; }
}
Codeplex discussion entry:Tuesday, May 17, 2011
Fix It: Sys.WebForms.PageRequestManagerParserErrorException when using update Panel in Facebook Apps
Given URL is not allowed by the Application configuration.Hope this helps.