Showing posts from December, 2011

Custom Claim base Authentication with Example & Source Code

Claim-based Identity
This new type of authentication and authorization in way in SharePoint 2010.A trusted authority (Issuer) issues a signed security token containing a set claims (credentials) which is given to the application for validation. The application will authenticate the user if the security token is valid and signed by a trusted issuer.Applications using this type of authentication do not have to verify all the credentials.Example Claim Based Authentication Someone who determines your company's security policy can make those rules and buy or build the issuer. Your application simply receives the equivalent of a boarding pass. No matter what authentication protocol was used, Kerberos, SSL, forms authentication, or something more exotic, the application gets a signed set of claims that has information it needs about the user. This information is in a simple format that the application can use right away.Geneva framework Microsoft has created a framework, called Geneva, pr…

SharePoint2010 Excel Services to read data from excel sheet

To read the data from the excel services.
I have implemented the code that will get the information from the excel file stored in SharePoint Library. Read the data from excel service. This is simple Window application. To read the Excel file from SharePoint Site you need to have a full persimmon to access the web services.
Excel Web services
You can view the Excel Web Services Web Services Description Language (WSDL) page by navigating to the following URL on the server: http://<server>/<customsite>/_vti_bin/excelservice.asmx?WSDL If you do not have a custom site, you can view the WSDL by using the following URL: http://<server>/_vti_bin/excelservice.asmx?WSDL

privatevoid btnLoad_Click(object sender, EventArgs e)         { ExcelService proxy = newExcelService();             proxy.Credentials = new System.Net.NetworkCredential ("administrator", "abc123#");             XLWebService.Status[] wsStatus; string sheetName = "Sheet2"; string namedRange =…

STS CryptographicException Error : Key set does not exist

Common mistakes
Both SharePoint Site and SSO Site NOT running on the same application pool.Application pool identity user doesn’t have permission to access the certification. 

Solution to this problem

Set the same identity pool to  :

2. Be sure to grant rights to the certificate for the App Pool running the web service

Start -> Run -> MMCFile -> Add/Remove SnapinAdd the Certificates Snap InSelect Computer Account, then hit nextSelect Local Computer (the default), then click FinishOn the left panel from Console Root, navigate to Certificates (Local Computer) -> Personal -> CertificatesYou're certificate will most likely be here.Right click on your certificate -> All Tasks -> Manage Private KeysSet you're private key settings here.