Wednesday, October 21, 2009

Error when opening a list in Datasheet View

“Access web datasheet is attempting to retrieve data from a different domain…”

When seeing this error message I first thought of cross domain access using JavaScript.

By checking the field types of the dropdowns that did fail I discovered that the only fields that failed was lookup fields that uses other tables as data source, other dropdown menus that where static worked fine. The lookup fields returned blank in datasheet view, but worked  in a normal list view.

By examining the links that the site presented I saw a combination of links pointing to different server names. ex: the user entered intranet in the address field in the browser and some links where pointing to the server name (Without the domain suffix or zone)

The problem: Alternate Access Mappings were not configured for the alias intranet. Therefore the server returned different links. And to my understanding this was the case for the error message, and the empty lookups.

The Solution: Add a internal URL in the Access Mappings located in the SharePoint Central Administration->Operations->Global Settings->Alternate Access Mappings that points to the alias (intranet)

After adding a new url to the access mappings the datasheet view returned correct values in the lookup fields.

Thursday, September 24, 2009

Can not enable anonymous access for internet zone

Just to clarify the relationship between alternate access mappings host headers and SharePoint Zones…

While configuring multiple frontend servers and different zones, including Internet. I discovered that I could not set the anonymous access to my site in the Internet Zone.

What puzzled me was the fact that I could not set the anonymous access rights on the site after enabling anonymous in the Zone. The choices were all disabled. (_layouts/setanon.aspx)

Not_Anon

Not having my mind correctly set I missed the fact that I was configuring the site collection using a url that was NOT configured for the Internet zone. I was only configuring using the default zone (or the server name as host to be specific)

The host header and the alternate access mappings is the only link that SharePoint has to discover that the site actually is in a zone. It all makes sense, but when you are configuring your site before the DNS entries are set you may stumble on this little problem…

By using the correct hostname, that is referring to the internet zone in my browser it all worked out.

OK_Anon

Tuesday, September 22, 2009

ASP.NET error after installing a SharePoint WFE

After installing a new SharePoint Web Frontend you  receive a “normal” ASP.NET error message the address in the browser will point to the _Layouts “directory”, so SharePoint is in play.

When studying the event log the message contains “Could not load file or assembly RSSharePointSoapProxy…

This is a Assembly that is used by the SQL Server Reporting Services Integration for SharePoint.

The problem: Reporting Services is installed on the SharePoint Farm and the binaries does not exist on the new frontend server.

Solution:

Start by downloading the Microsoft SQL Server Reporting Services Add-in for Microsoft SharePoint Technologies for SQL 2005 or SQL 2008 (May 2009 release) (SharePointRS.msi or RSSharePoint.msi)

Note: The description below is based on the 2008 version of the Add-in

Do not run the MSI as a ordinary setup process, this will result in a error message in the event log and a rollback of the package. The error indicates that the SERVERNAME$ can not logon to the database.

Start the MSI with the parameter SKIPCA=1 this will extract the file rsCustomAction.exe to the TEMP folder of the current user.

To install the binaries and configure the Reporting Services run rsCustomAction.exe /i

Be sure to run as a user that has rights to the SharePoint Site Collection.

After the executable finishes your new SharePoint Front End should display the SharePoint sites normally.

By running this application the Solution will be redeployed on the existing servers as well, even upgraded if possible.

For more information see the readme bundled with the Add-in

Access denied when configuring SharePoint WFE

When adding a new Web Front End Server to a SharePoint Farm you may get a access denied error in step 2 when connection to the configuration database. This error will occur regardless of the configuration entered before the configuration begins. (The search for configuration database is successful.)

Configuring_SharePoint

Before starting SQL Management Studio or another tool to check permissions on your database server. Check the version of the existing SharePoint environment.

You will get this error if the new SharePoint server binaries is another version than the existing system. Remember to update the SharePoint installation (Both WSS and MOSS) before running the SharePoint Products and Technology Configuration Wizard.

Refer to the SharePoint AdminWiki to get your SharePoint Version.

Monday, August 24, 2009

Error when configuring SharePoint Services Search Service

You probably know this already this is just a notice to self :-)

When configuring a SharePoint Services Server running everything locally you normally specify the user accounts only by the username during the installation and configuration.

When looking at the Services in the server you notice that there is one service that is not starting. The “Search Service”. You click on the start link and the configuration page pops up. You enter all the user settings and click on start. After a second or two a rather generic error message appears SPSearch(Username).

After rechecking passwords and usernames you try again, with the same result…

The problem is that the “Service Account” username must have domain\user or server\user syntax (server\user in this case)

The “Content Access” Account can be specified using the username only (But it does not hurt to add the server name as well)

Search_Service_Account

Thursday, August 6, 2009

Change a users property in Active Directory

In order to change a users property you must get the DirectoryEntry for the user. Below are some simple code that I have been using in my “AD import Tool”

GetUser – Returns a DirectoryEntry that can be used to get and set properties for a user object i AD (Click for a larger image, code is at the end of the post)

GetUser Example

The function used in a wrapper class along with other code mainly gathered in the Howto: (Almost) Everything In Active Directory via C# at CodeProject.

 

ADHelper GetUser Example

You can download the ADHelper class here

Note: This is a only a simple example. It has not been tested thoroughly for memory leaks.

Can not find property “mobile” in Active Directory

While developing an application used to import mobile phone numbers from a CSV file to Active Directory I discovered that the attribute “mobile” did not exist for users where this property never had been used before (Never been updated by other tools such as the Active directory MMC snap-in etc.)

The application uses the standard System.DirectoryServices.ActiveDirectory assembly shipped with .NET 2.0. (See the article on CodeProject Howto: (Almost) Everything In Active Directory via C# for more code)

mobile

The source code after gathered the Directory Entry for a user. Is used to update the mobile attribute:

mobile

Do not forget to CommitChanges, Close and Dispose…