Tuesday, August 25, 2009

Excel Services error: You do not have permissions to open this file



I was configuring Excel Services and got this error

The following steps helped me get rid of it:

1. Open Central Administration -> go to Operations tab
- ensure that the Excel Service is running

2. Open Central Administration -> go to your configured Shared Service -> click Excel Service Settings
- File Access Method: ensure that it is not using Impersonation, instead the Option Process Account should be enabled.

3. Open Central Administration -> go to your configured Shared Service -> click add new trusted file location
- field URL: here you can specify a report library or the whole portal
- Location Type: should be Windows SharePoint Services
- Children trusted: defines whether the children should also be trusted or only the definied path

I had spaces in my doc lib name so I tried adding only the top site name and having its children trusted..it worked for me

Monday, August 24, 2009

MOSS 2007 :Feature Stapling

A very interesting concept I came across is Feature Stapling.MSDN explains it as:

In Windows SharePoint Services 2.0, many of the customizations that organizations wanted required changes to the built-in site definitions. These types of customization were not supported by Microsoft because these files may need to be replaced by future service packs. To work around this limitation with the site definitions, you would copy the built-in definitions, make the required customizations, and hide the original definitions from the end user. This process would ensure that a service pack would not break the site definition.
In SharePoint Server 2007, Features enable you to turn functionality on and off within a site, even if the functionality was not in the original site definition. Although modifying the built-in site definitions is still not advisable or supported, you can use a process named Feature Stapling to attach a Feature to a site definition without modifying it in any way. For example, you can use this process to attach your custom application to the built-in definition.

For more refer:
http://msdn.microsoft.com/en-us/library/bb954662.aspx
http://blogs.msdn.com/cjohnson/archive/2006/11/01/feature-stapling-in-wss-v3.aspx

http://blogs.msdn.com/sharepoint/archive/2007/03/22/customizing-moss-2007-my-sites-within-the-enterprise.aspx

Thursday, August 20, 2009

MOSS 2007 : BDC Search

Searching on Business Data once you configure the BDC is easy. Here are a few good links explaining how one could configure search on Business Data and create custom scopes.
http://msdn.microsoft.com/en-us/library/ms584031.aspx
http://msdn.microsoft.com/en-us/library/bb410114.aspx

Wednesday, August 19, 2009

MOSS :Using BDC data in a list

An excellent article that directs in adding bdc data to a list is as below:
http://msdn.microsoft.com/en-us/library/ms548808.aspx

BDC Metadata for SQL Server 2000 Adventure Works db

BDC Metadata for SQL Server 2000 Adventure Works db Here is the metadata for SQL Server 2000 Adv Works DB.I searched a lot for Adv Works 2005 metadata but the msdn samples for 2005 have very elementary stuff in there without filters etc.I needed something a bit more complex and with the tables named product ,customer etc and not dimproduct or dimcustomer.Most sample metadata has the latter tables and I can't find a similar adv works 2000 db. Finally I found this metadata in a msdn link which does work with the current Adv Works Cycles 2000 db.You can download the sample db from the following link: http://www.microsoft.com/downloads/details.aspx?FamilyID=487C9C23-2356-436E-94A8-2BFB66F0ABDC&displaylang=en
The metdata is as in the link below:Note the mode of authentication that worked for me is RevertToSelf.
The only thing you need to add below is your server name as indicated in the tag.
http://msdn.microsoft.com/en-us/library/ms497572.aspx

Hope it works for everyone...working with the BDC is a true test of patience :)

Wednesday, August 12, 2009

SharePoint :Advantages of Data Connection Libraries

The Data Connection Library (DCL) is a new type of document library in Microsoft Office SharePoint Server 2007 that allows applications such as Microsoft Office InfoPath 2007 and technologies like Excel Services to specify data connection settings using external files. This provides several advantages:

  • Reconfiguration: Data connection settings, such as database server locations, can be modified independently of the solutions that use them.

  • Deployment to Different Environments: Test and production servers can specify different locations for data access and a form template will automatically use the server-specific location when published to that server.

  • Authentication: Using Office Single Sign-On, server administrators can specify alternative authentication credentials to be used by the server when processing a form for the browser.

  • Cross-domain security: The Data Connection Library (DCL) serves as a "safelist" for data connections. For forms that are not published with full-trust, only connections specified using the DCL can retrieve data from outside the farm.

Tuesday, August 11, 2009

Sharepoint BDC error:Unable to connect to AdventureWorks,NT AUTHORITY\ANONYMOUS LOGON

I have done a lot of stuff with the BDC in MOSS and everytime I work with it I get a new error ;) I was trying a simple connection to Adventure Works 2005 database which was on a different server.I could connect using the BDC Definition Editor and could retrieve data but when I added a BDC webpart to my SharePoint page , I got "Unable to connect to Adventure Works".It clearly was an authentication issue but I had to track it.Here are the steps I used :
  • I went on to check the SharePoint logs which are stored in:"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\Logs" I opened the latest log and searched for "Business Data". There were loads of records.So I thought let me do my own Logging.
  • So I went on to 'Central Administration' -> 'Operations' -> 'Diagnostic Logging' -> 'Event Throttling' and turn on the objects that I wanted to monitor. In this case, I wanted to turn on 'Business Data', select 'None' and 'Verbose'. I also customized my log path so that it was not as long as the default value.
  • Now when I tried connecting the webpart again to my application definition I got the error on my log file "Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'"
  • So now I went on and opened my application definition file and changed the authentication type from "PassThough" to "RevertToSelf" authentication and VOILA !! IT WORKED :)