Saturday, May 15, 2010

Error: 500 for All Web Application including Central Administration on SharePoint 2010 on WIN 7

Today I Came across 500 error with “"Could not load all ISAPI filters for site 'SHAREPOINT CENTRAL ADMINISTRATION V4'. Therefore site startup aborted” in the Event Log. This happened after I installed .Net Framework 1.1 (32bit) ( Wanted to test one application which was built on .Net Framework 1.1).


After installing .Net Framework 1.1, My none of sites were working including Central Admin. Event Log had below entries



1) ISAPI Filter 'C:\Windows\Microsoft.NET\Framework\v4.0.21006\aspnet_filter.dll' could not be loaded due to a configuration



,



2) Could not load all ISAPI filters for site 'SHAREPOINT - 80'.  Therefore site startup aborted.



and



3) Could not load all ISAPI filters for site 'SHAREPOINT CENTRAL ADMINISTRATION V4'. Therefore site startup aborted.



After Searching and looking at log I could understand that my ISAPI setting had conflict with .Net Framework 1.1 installation (32 bit and 64 bit).

Resolution:



1) Un-Installed the .Net Framework 1.1 ( any how is it not required now)



2) re-register Asp.net 2.0 as default by running below command




aspnet_regiis.exe –i




And All started working like before!!

Friday, May 14, 2010

Setting Up Dev environment for SharePoint 2010

Hi All,

This article describes different options to setup development  environment with Microsoft SharePoint 2010 and Microsoft Visual Studio 2010.

Below are Different Options you can have for your Development Machine.

OS

Description

Win 7

Install SharePoint on Windows 7 x64, Windows Vista Service Pack 1 x64, or Windows Vista Service Pack 2 x64.
My personal Experience, it works good on your Laptop with 4GB RAM.
Please follow below link to have this setup on your system.
http://msdn.microsoft.com/en-us/library/ee554869(office.14).aspx

Windows 2008 Server R2

Install SharePoint on Windows Server 2008 Service Pack 2 x64 (or Windows Server 2008 R2 x64)
Normal Installation as per SharePoint Guidelines.

Boot2VHD

Having Duel Booting enable on your Laptop/Desktop with WIN 7 and Windows Server 2008 R2 Dual OS
Boot from VHD is a new technique for installing and maintaining operating system environments.
Unlike virtual machines, the operating system that is running from a “boot from VHD” environment is using the actual hardware instead of emulated hardware
http://blogs.technet.com/keithcombs/archive/2009/05/22/dual-boot-from-vhd-using-windows-7-and-windows-server-2008-r2.aspx – This is really great article.

VMware Image

64-bit Image (Normal Installation as per SharePoint Guidelines)

Hyper-V on Windows Server 2008 R2 Use Microsoft Hyper-V and install SharePoint on a virtual machine running a Windows Server 2008 Service Pack 2 x64 (or Windows Server 2008 R2 x64) guest operating system

Wednesday, May 12, 2010

Error:Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack While Debugging Project in Visual Studio 2010 for SharePoint 2010

Hi All,
I have CUSTOM WCF Service hosted in IIS as a part of SharePoint Virual Directory (ISAPI under _vti_bin). This Web Service is triggered by Custom Pages and Controls on the same FARM Server. This service does nothing but adds a Web Part of user’s choice to a Page. For this I have used SharePoint Object Model.  now the actual problem, When I try to user //SPSite oSite = SPContext.Current.Site in my code, I was getting following error “Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack”.
After doing some analysis I found that it is actually a “Access Denied” error which is thrown while trying to create SPSite object.
Resolution: Use SPSecurity.RunWithElevatedPrivileges, if you using Object Model in your Service Layer.
Sample code:
SPSite oSite = SPContext.Current.Site;
         Guid siteGuid = oSite.ID;
         SPSecurity.RunWithElevatedPrivileges(delegate()
         {
            //Get the SPSite Object 
             // I am using SPContext within RunWithElevatedPrivileges
             //Opening the Site with new SPSite(siteGuid);
             oSite = new SPSite(siteGuid);
             //Open the Web now
             oWebSite = oSite.OpenWeb();
        });


Thanks
Pathik

Saturday, December 19, 2009

ADO.NET Entity Framework

This post gives an introduction to ADO.NET Entity Framework and What problem spaces it is targeting and what are the various component.

Introduction
The ADO.NET Entity framework provides set of technologies which supports development of Data-Oriented Application. The primary objective of the ADO.NET Entity Framework is to objectify your application’s data-add a level of abstraction on top of the relational mode.

Benefit
1) Automatically produce objects for you as well as track changes on those objects.
2) Simplify the process of updating Database.
3) Less code for updating and Retrieving Data.
4) Provides a level of Abstraction which helps isolate the application from Database.
5) Enables developer to work with Domain-Specific objects and Properties.
6) Provides pluggable Provider (SQL, Oracle, MySQL etc) Model.
7) Instead of working with DataSets and creating SqlConnections, Provides classes which represent business objects.

The Entity Data Model Layers
It is comprised mainly of three layers:
        ■CSDL (Conceptual Data Language)
        ■SSDL (Store-specific Data Language)
        ■MSL (Mapping Schema Language)

Thanks!!