Mostafa Elzoghbi - C# MVP

B.Sc. of Computer Science from faculty of computer and information sciences -Ain Shams Univ,Cairo,Egypt. I have MCAD.NET,MCSD.NET,MCTS (SQL 2005) Early Achiever ,MCT & C# MVP. I'm INETA User group lead & DotNet Boom supportive development manager for www.dotnetboom.net community as well. I'm working as Consultant as well as Technical Lead. I like to learn more and more about new technologies.I like also to help & share information with others,Keep your eye on my blog.

Wednesday, December 09, 2009

Cannot open a closed file error in asp.net ajax / SharePoint Site

Hi Folks,

I was developing a webpart in sharepoint ( consider it as a asp.net usercontrol for ASP.Net Developers) and in the webpart i was uploading a document using AsyncFileUpload control in AJAX Toolkit.

And it was working fine, but for some files i was getting this error : "Cannot open a closed file" and i was thinking that the problem from the file or it is a code behind issue.

I figure out the problem was because of the file size threshold in the web.config, the default web.config is:

<httpruntime maxrequestlength="51200" />

I added this attribute:

<httpruntime maxrequestlength="51200" requestLengthDiskThreshold="4096" />


The resolution for the problem is: Set the length disk threshold to 4M ( or any other number in KB as per your application business rule) because by default the value is 80K.

Hope this helps.

Happy SharePointing.... or .Netting :)

Regards,
Mostafa arafa

Tuesday, December 08, 2009

SharePoint Error : Retrieving the COM class factory for component with CLSID {BDEADEE2-C265-11D0-BCED-00A0C90AB50F} failed

Hi,

If you are trying to open your sharepoint 2007 site one day and you got this error message with yellow asp.net page:

"Retrieving the COM class factory for component with CLSID {BDEADEE2-C265-11D0-BCED-00A0C90AB50F} failed due to the following error: 800703fa."

The fix for this problem is to do iisreset for your IIS webserver and this will resolve the error.

Hope this helps.

Regards,
Mostafa arafa

Monday, December 07, 2009

Installing SharePoint 2010 on Windows 7 Tip

If you are planning to install sharepoint 2010 on Windows 7, here is an excellent article in MSDN, just follow the steps and you will end up successfully installing SharePoint 2010 beta on windows 7.

http://msdn.microsoft.com/en-us/library/ee554869(office.14).aspx

My Tip is: even if you follow the steps, and run the SharePoint Configuration wizard, the wizard might be failed , what you have to do is just to re-run it and it is going to work. the problem for that when you run in low of memory and the exception is saying failed provisioning central administration website.


Thanks.

Regards,
Mostafa arafa

Wednesday, December 02, 2009

Installing SharePoint 2010

Hi Folks,

I'd like to share with all of you how to install SharePoint 2010 on your current platform and to remove any dilemma or milestones you might face or heard from others.

First Question : How can i install SharePoint 2010 on my 32 bit machine ?
Now, you can use either VM Ware Workstation (requires License) or Virtual Box (Free).
Till Today, MS Virtual PC doesn't support to build your 64 bit machine on a your host 32 bit machine.

Now, you don't have any problem to build a VM using either of these software.

I used Virtual Box, and this is my first experience with it, easy and you can use your experience with VPC with it.

[Updated 6/12/09]: VMWare Server is also free, you can try it and its performance is better than Virtual Box.

Once you build and start your VM, here is the steps you have to do:
1- Mount your Windows 2008 R2 64 bit to your VM software.
2- After installing Windows, Install all the updates before start installing the SharePoint 2010.

3- I Prefer to install Office 2010 before installing SharePoint 2010 since you are going to use it with SharePoint.

4- Run Your SharePoint installer and click on install your software prerequisities, this step will go with no errors as mentioned on other posts.

5- The installer will prompt you to run SharePoint Products and configuration wizard, At the end, you will get a failure message : "Failed to create sample data".
FYI: SharePoint is working without installing the hotfix, To download the hotfix:

http://blogs.msdn.com/sharepoint/archive/2009/11/19/installation-notice-for-the-sharepoint-server-public-beta-on-microsoft-windows-server-2008-r2-and-microsoft-windows-7.aspx

After installing the hotfix, restart the machine and run the SharePoint configuration wizard again to fix un-provisioned services-WCF.

** Some Other Error cases - Differ from one installation to another:

a) If you got this error :"failed to register sharepoint services", open stsadm tool and type this command:

stsadm -o spsearch -action stop

Then re-run the configuration wizard.

b) If you get this error message :"failed to register sharepoint services- search service" - step 5 in the configuration wizard.

Open the command prompt and type : regedit and navigate to the following key and delete it:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web ServerExtensions\14.0\WSS\Services\Microsoft.SharePoint. Search.Administration.SPSearchService

6- Done, Start exploring your sharepoint 2010 instance.

Hope this helps.

Mostafa Arafa
Twitter : @mostafaelzoghbi

Tuesday, December 01, 2009

The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again.

Hi,

"The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again." This error message in sharepoint 2007 you will get it because of different actions you may perform on the site level:

-If you are trying to check out a document in Document library.
-If you are trying to add some columns in a custom list in sharepoint.
-If you are trying to call update() method in the object mode.
-And other actions....

The reason behind this error is when you enable anonymous access to a site with other authentication method such as basic authentication.

The solution or workaround for this problem is to open the central admin, then :
- Select application management.
- Under SharePoint Web Application Management, select Web Application general settings.
- Select your web application first.
- Under web page security validation turn it off.
- Reset your IIS.

Hope this helps.

Regards,
Mostafa arafa

Wednesday, November 25, 2009

My Interview in Microsoft Feed Website

I'd like to share with all my blog readers this article, it is my interview with Microsoft Feed website team.

Read it, I think it will inspire you to do more in your career and to the community.

http://microsoftfeed.com/2009/meet-mostafa-elzoghbi-visual-c-mvp-from-egypt/


Regards,
Mostafa arafa

Thursday, November 19, 2009

SharePoint 2010 BETA is available now to download

Hi Folks,

SharePoint 2010 BETA is now available to download for Public, download link :

http://www.microsoft.com/2010/en/

SharePoint 2010 resources:

Devs: http://msdn.microsoft.com/en-us/sharepoint/ee513147.aspx

IT Professionals: http://technet.microsoft.com/en-us/sharepoint/ee518660.aspx

Read more :

http://blogs.msdn.com/sharepoint/archive/2009/11/18/sharepoint-2010-public-beta-is-now-available-for-download.aspx


Regards,
Mostafa arafa