Tuesday, November 20, 2012

Error connecting to TFS 2010 using VS BIDS 2008

Hi All,

If you are experiencing an error when connecting to TFS 2010 using Microsoft Visual Studio Business Intelligence Development Studio (BIDS) while you don't have this problem connecting using VS 2010 so follow below steps to fix it.

1) Close your VS 2008 instance if you have it open.

2) Install VS 2008 SP1 if you don't have it already.
http://www.microsoft.com/en-us/download/details.aspx?id=10986

3) Install Team Explorer Forward Compatability Update:
http://www.microsoft.com/en-us/download/details.aspx?id=10834

4) From the start menu, Open Run window and type: regedit
we need to update the default entry of your Team Explorer for TFS server url.

Navigate to:
HKEY_CURRENT_USER -->Software -->Microsoft-->VisualStudio-->9.0 -->TeamFoundation -->Servers

Right click on Server and click on add string:
set the name to: tfsservername
set the value to: your tfs server url, for example:
http://TFSServer:8080/tfs/CollectionName

Collection Name: is the project collection you want to connect to in TFS.

5) Close registry editor window and open VS 2008 BIDS.

6) You will automatically be connected to the project collection you previously specified and be able to bind your projects to the TFS 2010.

Enjoy Coding!

Hope this helps.

Regards,
Mostafa E.


Sunday, November 04, 2012

Error When activating Windows 8 Code 0x8007007B

Hi Folks,

If you are facing a problem activating your windows 8 machine this is because there is a bug till this point that won't allow you to activate or even change the product key from the  user interface. The solution for this problem is to change the key using the command line. you will be able to do this in 2 simple commands.

The Error Code when trying to activate your windows 8:




1) Open Command Prompt as Administrator
From the Metro Desktop, Hover the top right corner to get the menu; then search for "Command Prompt" and then hit enter. you will get the command prompt tile. then right click on this tile and click on Run As Administrator.

Below Figure shows the appearance before you click on Run as Administrator.


 


2) Type in this command to uninstall the product key

slmgr /upk


Once you enter this command you will get this popup window.




3) Install your product key

slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX



Once you install the new key you will get this message



Once you installed the new key, you will notice that if you go back by typing Activate Windows in the search menu from Metro Desktop you will be noticing that the windows is activated.

Congrats and have fun with Windows 8!

Hope this helps.

Regards,
Mostafa E.

Friday, November 02, 2012

Getting Started Windows 8 Store Apps Resources

Hi Folks,

I'm writing this post to share the resources that every software engineer or developer needs to get started with Windows 8 Store App development.

First, Before heading out and install Development resources (SDK) to start playing and exploring with windows 8 store app tools looks like. here is some sites you need to read to have a basic understanding about windows 8 store apps principles, design and concepts:

1) Windows Store Apps development center:
This site is the main site that contains all materials you want to get or read about Windows Store Apps design and development.
http://msdn.microsoft.com/en-us/windows/apps

2) First document i suggest to read, Windows 8 Product Guide for Developers, find it here:
http://msdn.microsoft.com/en-US/windows/apps/hh852650

3) Spend some time understanding the API reference for Win Store apps using JavaScript, C#,C++ or VB.NET:
This source shows how to use,understand & explore Windows 8 API using different programming languages. Using C# or JavaScript to build HTML Store Apps is different than using Traditional JavaScript in some manner.
http://msdn.microsoft.com/library/windows/apps/br211369

4) Get some basic understanding of Metro Style Store apps guidelines and principles:
Even if you are not a designer, it is crucial to have basic understanding of designing Views and pages.
http://msdn.microsoft.com/library/windows/apps/hh779072

After the previous four steps, you should be able to build your development box with Windows 8,VS 2012 Express, Blend and SQL 2012 Express, so you proceed to the following resources.
Downloads link:
http://msdn.microsoft.com/en-US/windows/apps/br229516

5) Getting started with development tutorials:
Get some samples, tutorials to get dirty hands working with VS 2012, Blend and All windows Store necessary tools to get up to speed in development.
http://msdn.microsoft.com/library/windows/apps/br211386

Since I'm a C# guy, here is the Get Started Development resources for C# Developers:
http://msdn.microsoft.com/en-us/library/windows/apps/hh974581.aspx

Once you reach this step, you should be able to build your first windows store app. now the time for deployment/licensing and selling your application.

6) Selling you application:
Get to know the available markets, languages and how to get paid.
http://msdn.microsoft.com/library/windows/apps/hh694064

I will keep updating this post as i find good resources to read  for early adopters!

Hope this helps,

Regards,
Mostafa E.

Thursday, November 01, 2012

Microsoft Surface - Product Review

Hi Folks,

I'm writing this blog post to share with all my blog readers and friends my experience in using Microsoft Surface. I was eager and waiting till it is available to pre-order it online and i ended up getting it from the store right away with no waiting LONG lines...lucky me!



I have been using Microsoft Surface for 6 days, and i want to share with you my personal insights from technical point of view and not from the marketing aspect! So, Let's start by answering basic questions:

1) Why did i buy Microsoft Surface ?
Since my wife has an iPad and we are using it for quite long time, I have much deeper experience using my iPhone and iPad or in general Apple Products. Before i bought MS Surface; I watched few reviews about mini iPad which is the latest and greatest from Apple. After comparing the 2 products i found that the mini iPad was over priced in comparison to the MS Surface, doesn't have Office, OS is locked not as Windows 8 and it serve the purpose as a E-Reader and a handy PC with fully featured Windows OS including IIS, Control Panel and Services. In addition to that, Fully fledged SDK for Developers to build Windows Phone Apps, Surface Apps and Web Apps for different platforms using HTML 5 and JavaScript!

If i would buy an E-Reader tablet my choice will be Kindle Fire from Amazon for 199$ and not min iPad for 329$.

All above was enough for me to go with the Surface!




2) What you can do with the Surface ?

a) Metro Style Experience: With Windows RT, You would have the same experience when you have Windows 8 on your PC. Very intuitive Tiles and fluid touch experience for what's in the start page, Pin to Task bar, and switch to Desktop Mode (You regular Windows Experience). The User Experience is fresh and new and this is a winner for The surface over iPad.

b) Cloud Connected Device: With the surface as for iPad, you will be able to sync up all you files to SkyDrive - Cloud Service from MS and they offer you to upgrade with extra 3GB for free when you purchase it! This is really cool. I have all my files linked to my Microsoft Account and i access it wherever i want and using any machine. MS is little behind since Apple introduced iCloud long time back, but here we are now we have it for both.

c) Store: Windows RT comes with the store where you can install all your applications as AppStore for Apple. The MS store still doesn't have lots of applications as Apple AppStore but it is growing tremendously!

d) MS Office: You have Word, PowerPoint, Excel, Access, OneNote, InfoPath for Free when you have Surface unlike iPad. Microsoft Office price is included and you don't need to pay extra for Office, this is a big plus!

e) Kinect: If you have XBOX 360, you will be able to play XBOX from the Surface, this is really cool! I tried it to surf internet and run Netflix and other applications in my XBOX and it was amazing experience.

Note: This feature requires you to have Windows Live Gold Membership to fully utilize all your applications in XBox.

f) People Hub: Connect & Read all your social media network notifications including: Facebook, Twitter, Windows Live and Mail notifications all through one place.

g) For Developers: If you are a geek and likes to develop apps for the surface. you can have all development environment for free from Microsoft. SDK,VS 2012 Express with Blend and SQL 2012 seamless integration for building Windows 8, Windows RT application with the ability to test your applications against these platforms. check out Windows Store Dev Center for details:
http://msdn.microsoft.com/en-us/windows/apps/br229512.aspx

-- Updated 11/13/2012
h) Connect the Surface to your TV: I bought a mini-HDMI cable from Amazon and now i'm able to stream any shows and vidoes i'm watching to my TV. here is what you can search for: mini HDMI to HDMI cable and you can get it for only 5$ from Amazon.

This is all what i have been seeing and experiencing during my last few days using the Surface!

Hope you like it and see it useful!
Drop me a line if you have any other questions or a feedback!

Thanks.

Mostafa E.





Monday, September 10, 2012

Product Review: Zoomph

 Hi Folks,

This is a product evaluation blog post about a product evaluation & review for a social media service called: Zoomph.

Zoomph is a social media product that provides moderation, analytics, feed management & Social Media mash up information from Facebook and Twitter into one set of displays for all your twitter and social media activities.

Zoomph primarily provides a twitter moderation capabilities though setting up a feed moderation team in the product to moderate your feeds in your account. Setup a feed in few seconds by setting the hash tags, keywords or users you are looking to pull the information from Twitter and the rest will be done for you!

The intelligence set of real-time services in Zoomph pulls Twitter tweets based on the keywords, hash tags and other set of configurations and gives the ability to the feed’s moderators to approve and reject tweets content from Twitter in few clicks!

The product is supported by intuitive user interface that makes it easy for real time moderation that can be used in your conferences and events on the spot! In addition to that, the product pulls your content from your Facebook fan pages into the system.
Zoomph contains set of analytics and reporting capabilities that provide each account manager to analyze all data that have been captured and provides more insights such as: geo-location information, top influencers, and top tweets.
Last and most important features in Zoomph, the product provides set of displays with different dimensions that you can use to display your moderators’ approved tweets on big display screens with creative nifty designs that you can customize and brand it as you want!
What about the price? The service is not expensive at all! You setup your feed for only 9.99$
Check out all features of Zoomph in below URL:
This product is fully designed and developed on Microsoft Windows Azure cloud platform.
Hope this post helps in evaluating Social Media products in the market and specially Zoomph and gives you insights about why would you sign up for Zoomph…
Feel free to provide your feedback!
https://www.zoomph.com

Tuesday, July 24, 2012

SharePoint 2013 Training Materials

Hi Folks,

This post is to list all what you need as resources to get up to speed for SharePoint 2013. Either as Developer or ITPro you can check out below links and hopefully will be useful.

Feel free to drop comments with more resources you are using to learn about SharePoint 2013.

1) SharePoint 2013 Developer Training Videos:
http://msdn.microsoft.com/en-us/office/apps/fp123626.aspx

2) SharePoint 2013 ITPro Training Videos:
http://technet.microsoft.com/en-us/sharepoint/fp123606

3) SharePoint 2013 TechNet KB url for all topics:
http://technet.microsoft.com/en-us/library/cc303422(v=office.15).aspx

A free ebook for SharePoint 2013 Deployment guide:
http://www.microsoft.com/en-us/download/details.aspx?id=30384

Hope this helps.

Happy SharePointing!

-ME

Friday, July 20, 2012

Fixing SharePoint 2013 Errors when running SP configuration products wizard

Hi Folks,

I was installing SP 2013 Preview on Windows 2008 R2 SP1. After i installed SP 2013 i was trying to run SharePoint Products Configuration Wizard to configure my farm before i start using it and i was getting this error message on step 2:


when i checked the logged file, this is the actual error:

Exception: System.Management.Automation.CmdletInvocationException: ErrorCode:SubStatus:Service running under Network Service account in workgroup environment is not supported. ---> Microsoft.ApplicationServer.Caching.DataCacheException: ErrorCode:SubStatus:Service running under Network Service account in workgroup environment is not supported.
   at Microsoft.ApplicationServer.Caching.Configuration.Commands.RegisterAFCacheHostCommand.BeginProcessing()

I was trying to understand why i'm getting this error ? As i see, it is because there is one of the services is using Network service which is not supported. But Which component that i can change without uninstalling and reinstalling SharePoint 2013 ? As highlighted in red, the configuration wizard is trying to setup AppFabric Chaching while creating the configuration wizard! 



I started to change the AppFabric Chaching service service account which was using Network service and rerun the configuration wizard but still same error!

I googled the problem and i found that i can skip this step using the command line. The command runs the psconfig "Configuration wizard" in console mode with option to skip configuring the AppFabric Cache.

1) open 15 hive folder:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\BIN
2) open command line as administrator.
3) write down this command and hit enter!

psconfig -cmd Configdb create SkipRegisterAsDistributedCacheHost

4) The configuration database will be created.




5) Re-run the configuration wizard and you will be able to successfully configure your SharePoint 2013 Farm and you should be able to start using SharePoint 2013.

Note: If you got a message "Failed to create sample data" this doesn't have any functional problem of start using SP 2013 Preview. This should be fixed with later more stable versions.


Please let me know if you encounter any other issues and you would like to contribute in this post!

Appreciate it!
Happy SharePointing...!


Wednesday, July 18, 2012

Migrate SharePoint 2010 Lists,Libraries and Content

Hi Folks,

If you are trying to migrate content (Sites, Lists & Libraries) in SharePoint Foundation 2010 where we don't have content deployment feature or publishing features or SharePoint 2010 and you don't have the publishing feature enabled in your site collection since you need an automated easy way to move lists or libraries from one site to another, I will be introducing a tool called "Sharegate".

Sharegate allows you to deploy/copy sites from one site to another, copy lists, folders and libraries from one site to another, Migrate Physical Share Folders to SharePoint and provides a bulk Metadata Editor.

I have a wiki library where i want to move it to another site, and i want all Wiki pages to be migrated with versions! After i downloaded this tool i got the job done in few minutes.

Screen shot with all tool features in the home page:


When you want to copy content then you have to select one of the option in the second section "Content Migration", In my case i selected "Copy SharePoint Content".


You select your source and destination urls and then you select your list(s) or object(s) to be moved or migrated, as shown below screenshot.


I liked this tool because with the Free Trial software you can migrate up to 5 objects at a time! which is great for small migrations and content updates. and for large content deployment i suggest to buy a license of this tool since it helps a lot SP admins for migration tasks.

Download the tool "Sharegate" now!
http://en.share-gate.com/download


Hope this helps!

Happy SharePointing!!

v/r
Mostafa

Friday, July 13, 2012

What's New in VS 2012 & .NET Framework 4.5 RC

Hi Folks,

This post is my first blog post after i got back from my vacation in Egypt and getting married! I had a wonderful summer time with my family and here we go back to .NET life style!

After i installed VS 2012 RC on my Development VM and then started to play around with the new IDE. Here are what is called fascinating in the new VS 2012 RC & the framework 4.5.

1) Portable Class Libraries: Now you can develop portable class libraries that can be used to target different framework ranging from .NET framework, Silverlight and Windows Phone 7 or even XBOX 360!!.



Even this is a great option in VS 2012 but please note that also you don't have an option to add references that are not compatible with targeted frameworks.

For example, if you tired to add a .NET framework assembly in portable class library you will find very few assemblies are available, check out below screen shot.


Note: If you tried to add any references that is not compatible with your targeted platforms then VS 2012 will warn you with incompatibility warning!

Read more about Portable Class Library:
http://msdn.microsoft.com/en-us/library/gg597391(v=vs.110)


2) Asynchronous File I/O
Now you can develop code for intensive I/O operations without blocking the main thread!. with that being said, new keywords in C# and VB.NET have been added and supported by the compiler through using async and await keywords which are available in C# and VB.NET.


public async Task CopyFilesAsync(StreamReader Source, StreamWriter Destination)
{
    char[] buffer = new char[0x1000];
    int numRead;
    while ((numRead = await Source.ReadAsync(buffer, 0, buffer.Length)) != 0)
    {
        await Destination.WriteAsync(buffer, 0, numRead);
    }
}


Read more about Async File I/O in .NET 4.5:
http://msdn.microsoft.com/en-us/library/kztecsys(v=vs.110)

3) Web: Supports for HTML5,Async http request and response, WebSockets & support for CDN in Script Manager fallback.

4) Enhancements in WCF including: easier asp.net compatibility mode, HTTPs endpoints with IIS, Generate WSDL by appending ?singleWSDL, Simplification for generating configuration files and more.

5) Enhancements in Windows Workflow Foundation (WF).

6) Enhancements in Windows Presentation Foundation (WPF): A new Ribbon control, New INotifyDataError Interface and more.

Read more about what's new for WPF in .NET 4.5:
http://msdn.microsoft.com/en-us/library/bb613588(v=vs.110)

7) Metro Style Applications
You can now build Metro Style application using VS 2012, A subset of .NET 4.5 is available when building Metro Style Applications and its called .NET APIs.

To get an overview about Metro Style applications:
http://msdn.microsoft.com/en-us/library/windows/apps/br230302.aspx


- Reference:
What's new in .NET Framework 4.5:
http://msdn.microsoft.com/en-us/library/1d971dd7-10fc-4692-8dac-30ca308fc0fa(v=vs.110)


Have Fun with VS 2012 RC and hope this helps!

Have a wonderful weekend everyone.

Regards,
Mostafa Elzoghbi




Monday, April 30, 2012

Error when running .NET Application that is consuming CRM 2011 Services

Hi All,

I was trying to run a .NET application that consumes CRM 2011 WCF Services and i was getting this exception:

Could not load file or assembly 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

The cause of this issue is to due to missing dlls in your machine for Microsoft Identity framework that is required to have to run your application.

Install Microsoft Identity Framework in your computer that is compatible with your operating system.

For Windows 7 & Windows 2008 R2 you need to install Version 6.1

After you install this update re-run your application and will run with no exceptions!

Note: Make sure to stop your development web sever before rerun your application to reload all required assemblies.

**Download link:
http://www.microsoft.com/en-us/download/details.aspx?id=17331

Hope this helps!


Thursday, April 19, 2012

How to connect to Linux from Windows

Hi Folks,

I was looking into connecting from Windows to a Linux Server, After asking a coworker he advised me to use WinSCP. A free GUI tool to connect to Linux from windows.

WinSCP download link: http://winscp.net/eng/download.php

The tool is easy to install and use, once you install it it requires you to connect using your username/password and IP same as RDP in Windows.


You just need to write server IP,username and password.

Once you log in, you will have 2 panes in the Tool, one on the left is your local files and the one on the right the remote machine file systems.


Then you will be able to move files from the local to your remote sever.

Hope this helps.

Wednesday, April 18, 2012

Port your .NET projects into Linux

Folks,

I was searching for a tool i can use to port all my code i'm building on windows OS to linux. Since VS 2010 IDE doesn't provide this feature so i was looking for a tool or IDE to allow me to write,test and compile my code to be running in a Linux server.

I found this nice IDE called "MonoDevelop" and thought would be useful for all who are thinking to deploy .NET projects into Linux.

Read more about the tool in their website:  http://monodevelop.com/

Download link:  http://monodevelop.com/Download

You need to install GDK# before installing the IDE on your development box.

Have fun with MonoDevelop!

Monday, March 12, 2012

How to hide TFS web access tabs

Hi folks,

I was tasked to hide Source and Build tabs in TFS 2010 Web Access. I started to find out if TFS has any security groups that prevent users to view source or build tabs but with no luck!. TFS doesn't have security permissions to grant/hide tabs in TFS web application. To tackle this i wrote a javascript function which hides those tabs. After looking in the TFS web application in IIS i found that i can write this Javascript in "Content.master" Master page file for TFS web.

Just add this script in the header of Content.master file:


<script type="text/javascript">

window.onload = function() {

      // Search for the top navigation menu.

      var x= document.getElementById('ctl00_pghd_mainTabs');
       // Search for rows in this table.
       for(var i=0;i<x.rows.length;i++)
       {
                // only remove tabs in the first row. 
                        if(i==0)
                                {
                                  // Remove Source tab.                
                                  x.rows[i].cells[3].style.display='none'; 
                                  // Remove Build tab.
                                  x.rows[i].cells[4].style.display='none';          
                                }         
       }

                
}
</script>




To download the updated content.master file:


Also, To prevent any web users not to view any of source or build pages, Go to IIS and do the following:
1) Open TFS web site in IIS.
2) Expand tfs and then UI folder.
3) Select Build folder.
4) Double click on Authentication and disable Windows and Anonymous access to this folder.
5) Do the same for Scc folder which has all source tab pages.

With these 2 steps, we added security on the folder level in addition to hide Build and Source tabs.



Hope this helps!

UPDATE 03/13/2011: This workaround works after installing TFS SP1.

Thursday, December 01, 2011

How to create test accounts in Facebook

Hi All,

Facebook now doesn't allow you to test your facebook application without creating test accounts. When you try to test your non published Facebook application and try to post any update you will get this error message:

oAuthException #100 can only call this method on valid test users for your app

To create a test account in Facebook, here is the steps:
1) Copy and paste the following url in your browser:


https://graph.facebook.com/151284171604933/accounts/test-users?
  installed=true
  &name=MYNAME
  &permissions=read_stream
  &method=post
  &access_token=YOUR_FB_APP_ACCESS_TOKEN

Before hit enter, do the following:
a) Get the access token for your facebook application, to get it paste the following url in the browser:



b) Permissions: To grant certain permissions to the test account, read the full extended permissions from below link:

https://developers.facebook.com/docs/reference/api/permissions/

If you get an error when you specify a name, you can omit the name parameters and in this case FB will create a name for your test account.

Once you edit above parameters and hit enter in the browser, you will get a message like this showing that your test account has been created successfully.

{
   "id": "XXXXXXXXXXX",
   "access_token": "XCEWWEE#######EEEEEU8ffOT3VYD70ld0nYCiNlZB5Flmh59yfPksO5XfUdVxnZAhi0oEKvpJxACywhxsNgwGWfe6gH2B1DaxVUSXy2mCfo1jzf3TUk7",
   "login_url": "https://www.facebook.com/platform/test_account_login.php?user_id=3232334444444449&n=oWKUdwdw5xdLx0a2CBW",
   "email": "cqszpqv_smithwwwqitz_133222765997\u0040tfbnw.net",
   "password": "211212121233"
}

Try to log in with the username and password before run your application.




Hope this helps.

* References:
- How to create test users in Facebook:
https://developers.facebook.com/docs/test_users/



Wednesday, November 30, 2011

Change Sql Azure DB Size

Hi All,

I was trying to change my business edition DB to web edition in SQL Azure and i didn't find a sample TSQL to run to shrink the DB file size from 20 GB (Business) to 1 GB (Web) Edition.

Here is the TSQL you want to run after deleting the unnecessary data in your DB and make sure its size under the required new DB size.



Alter database YOURDBNAME

 modify (          
           maxsize=1 GB,
           Edition='Web'
        )

Hope this helps.

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

Hi Folks,

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:


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.


To fix this problem, follow these steps:

1) Make sure that both environments have the same updates and CUs. To do so, Open Central Administration and click on Upgrade and Migration link and click on "Check product and patch installation  status".
You will have list of updates and CUs that have been installed on your environment, make sure those updates are identical. Any missing updates, download and install it on the new environment if you haven't document this as a part of your release process that you have in place.

2) Then click on "Review database status" under upgrade and migration section and make sure you don't have "need upgrade" to any of your content databases.The status should be "No action required". If you have any upgrade required and specially if you have SP1 installed, this means you didn't run the SPConfig command post to your SP1 installation. To do so, follow these steps:

a) Launch an elevated (Run as Administrator) SharePoint 2010 Management shell :
(get-spserver $env:computername).NeedsUpgrade
If the result of this command is True, then you need to complete step (b) below. If the result is False then no further action (b) is needed.
b) In order to update the SharePoint databases, you must manually run the PSconfig utility. To run the utility:

  - Open an Administrative command prompt. 
  - Change directory to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN 
  - Run:
    PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures

Wait till the configuration wizard finishes all updates and then you will be able to backup and restore your site collection with no issues...


Hope this helps.

Wednesday, November 02, 2011

Secure Store Service Error in SharePoint 2010 : Secure Store Service is not accessible

Hi All,

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

Hi Folks,

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.

Hi Folks,

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.


My web.config configurations:

 <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> 


Since this error message is misleading, you don't need to run aspnet_regsql command since i was using a custom database and all stored procedures, tables, custom user data types and DB objects have been scripted and deployed too. the cause of this error if you didn't give enough permission to the user that accesses the database. User should have execute permissions or grant dbo.owner to it.

Hope this helps.

Friday, October 28, 2011

Best Practices for SQL 2008 in SharePoint 2010 Farm

Hi All,


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