Allow BDC access to all FBA users

I was struggling a bit with my FBA users in SharePoint. I’ve created a customer portal setup in which BDC data is shown. But FBA added users aren’t allowed to view BDC data by default, not even when you add groups like authenticated users and Everyone to the BDC permissions list.

When you want to enable BDC access for your FBA users, you need to create an extended site for your SSP administration site. This extended site should use your FBA membership and role provider. And that last one is key in this scenario.

So I created that extended site, added some FBA users in a SharePoint group (seemed logical enough) and tried to add that group to the BDC permission. The following error was thrown: “The specified user or domain group was not found.”. Dead end? No!

The roles you provide via your membership provider can also be used to assign  rights to. So when you’ve got a role ‘Customer’ and some users are added to this role, you can enable access to the BDC entities simply by granting access to the role Customer. You do this by typing in Customer in the Users/Group textbox and SharePoint automatically resolves it to your role.

Note: you have to do all this in your extended membership provider. In the normal one, it won’t work because it won’t recognize your role provider (the default is set to the windows token provider).

So:
- Add a Role in your FBA database
- Add all users to that role (you can do the programmatically with the membership model of ASP.NET)
- Give the role access rights to BDC entities
- Done!

If you want to enable all rights at once; set them at root BDC level and use the “Copy all permissions to descendants” option to copy the permission to all BDC objects.

Now to find a good way of adding and managing all these FBA users.

NotSupportedException in localized Compact Framework app

Today I was working on a Pocket PC app using Compact Framework 3.5. The app ran fine on the VS emulator, but when I finally deployed to the actual Pocket PC devices, it started throwing exceptions. The exceptions being thrown were of the type NotSupportException with the message System.Globalization.CultureInfo. Yeah great error message guys, I can really work with that…

The weird thing was that some forms were working fine, whilest others weren’t. I couldn’t detect any difference in references or code; all exactly the same. Finally I found some posts about the possibility of the resource (.resx) files being corrupted themselves. As a last resort I tried deleting the resource file of one of the forms and recreating it from scratch. And magically! That form started working again!

So apparantly, the cryptical errormessage means your resx file is corrupted somehow. I couldn’t figure out what was wrong with the other ones, but they all started working again once I had recreated them from scratch.

So if you need the above solution: I hope you don’t have too much forms to re-edit….

Services.msc only displays Standard tab correctly / Project web panes problems

I faced a problem on my development machine. The following symptoms were visible:

1. The services.msc window only displayed the “standard” tab correctly. The extended / advanced tab was broken and only displayed the topleft blue bar. No text, no services, nothing.

2. In my Project installation (2007 office client) all the web panes broke. When I started one of those panes, an error displayed complaining about Srchui.dll and Jscript.dll not being registered properly. Those panes didn’t work at all

3. When I reset IE8, I also noticed adding a search provider didn’t work (JavaScript error).

That last error pointed into the direction of IE8, so I uninstalled it. And as magic, everything started working again. Then I reinstalled IE8 again and untill now everything still works properly. So I’m not sure about what exactly caused the problem, but removing and reinstalling IE8 did fix it.

Crystal Reports webpart for sale

Because a lot of people keep e-mailing me about the code I wrote for the Crystal Reports webpart, I decided to make it available for purchase. Unfortunately not for free, since my boss seems to think I have to get paid for the work I do.

If you are interested in buying the webpart (it’s currently going at $500 for an unlimited licence), please contact me at jsiegmund_at_datamex_nl (if you can’t figure that out, you can’t buy the webpart either ;) ).

The package will contain (still have to create it):

a ready-to-go solution for installation
a seperate zip with the stuff you need to run the ImageHandler outside of SharePoint
a document to guide you through installation and usage

And offcourse I will be available for supporting any problems which might arise.

405 Bad request error while inserting – updating ADO.NET Data Service

A few weeks ago I started working on a project which involved a ADO.NET Data Service. This is a way of bringing your datalayer online and letting clients query and update entities in your datalayer (database) through RESTful webservices.

Locally everything was working fine, I tested the entire project and after fixing most bugs I was ready to deploy the service to the production server online. That machine is a windows 2008 server with IIS7 on it, so it does have some differences to my local XP / IIS5.1 environment. After deploying I went of testing again and found out that only the retrieval bits were working; inserting and updating produced errors. After enabling verbose errors on my service I found out that the server was returning a 405 bad request error.

To cut a long story of searching and debugging short: the WebDAV module which was also installed on the server was causing these 405 errors! Even though WebDAV wasn’t enabled on the particular site, it still messed up the PUT and MERGE calls from the ADO.NET Data Service. Disabling the module and removing the http handler (for the site hosting the services only) fixed the problem!

SharePoint profiles not synchronizing

A while ago, a colleague asked me why her contact details weren’t updated on SharePoint. She got married and thus her name changed. The AD was updated but the changed weren’t pushed to SharePoint for some reason.

Read more »

Creating quick and easy application mock-ups

When you’re creating software, it’s always a good thing to let the people who you’re creating software for know how it’s going to look and feel. Not the simplest task at hand; creating a good mock-up of a screen involves some serious thinking and figuring out what a client would like / need to have and more importantly: what not. A lot of applications have crowded screens full of data which on first sight doesn’t make that much sence. In order to avoid a problem during development, it would be a good idea to actually think about those things before starting to implement them.

I usually just used Visual Studio to create some mock-ups, but those forms were mostly working prototypes of the actual implementation. Making those is quite a bit of work which will sometimes be destroyed entirely because your client just doesn’t like what you’ve come up with. In order to avoid that you could try your Word, PowerPoint or Photoshop skills, but I found something way better!

A company called Balsamiq has a product called Balsamiq Mock-ups. It’s a very nifty little program which allows you to create somewhat cartoon-/drawingstyle mock-ups of your application. Just simple dragging and dropping of components which resemble the components of a real application (textboxes, dropdowns, etc.) is enough to create very nice mock-up images of your application.

Because of the style of those mock-ups, your client will instantly get that this isn’t actually the finished product but only a view of “how it’s going to be”. That will even change the attitude of the user to switch into a more design / lay-out oriented thinking instead of functional questions like “Where can I enter this?” or “What does that button do”? You and your client can look into the application and don’t waste too much time on developing things which are slayed down later on.

To show you what I mean, here’s some output:

Now isn’t that cool, usefull and even better: timesaving!? The folks at Balsamiq have a free online version which you can use and hopefully by writing this blogpost I can shoot at a fully functional version which I would really like to give a try! I’ll keep u guys posted ;)

Edit: now that’s what I call fast. Mariah from Balsamiq responded to my e-mail and did indeed send me my licence. So I’ll be posting some more results in the future I guess. Thanks Balsamiq!

SharePoint and Analysis Services: The connection either timed out or was lost

In my last post, I wrote about enabling access to SQL Server Analysis cubes by specifying an account for impersonation. It now seems that’s not the way to go because I started receiving security validation errors with impersonation set to any account. I think that’s caused because SharePoint detects a difference between the user actually performing an action and the user being impersonated by ASP.NET.

So I went on searching for a way to enable access to Analysis Services. We don’t have a proper setup Kerberos environment, so that wasn’t an option. I tried giving read-only access to all domain users, but that wouldn’t work either. Then I came accross this article in which an explanation is given on howto provide a Single Sign On account for ODC connections. It’s a nice and clear article and it helped my solving this problem. Once you’ve setup SSO and specified an account for your SSAS cube, you can specify that SSO id in your ODC connection file and it’ll use the stored credentials to pick up data from Analysis Services. Works great!

Cannot complete this action. Please try again.

This is the error message I was getting on one of my SharePoint sites. I was really lost and ended up creating a new site hooked up to the old content db, after which is was working again. Except for one part of the site which involved getting data from a SQL Server Analysis Server cube.

I wasn’t able to get the login working. Unfortunately, SharePoint gives a rather unclear error message stating
“The connection either timed out or was lost.”. You can solve this error by switching off impersonation, which will pass on your user credentials. But for some reason, turning off impersonation was causing the site to fail in my case, thus causing the “Cannot complete this action. Please try again.” error.

Now the only way to solve this (as far as I know) is enabling impersonation again, but specifying an account to impersonate which also has access to your SSAS cube. I don’t exactly know how this is going to affect other SharePoint stuff, but untill now I didn’t notice any odd behaviour.

Enabling / disabling impersonation is done via IIS manager. Locate your site, open the properties and navigate to the ASP.NET tab. Open the ASP.NET configuration and go to the Application tab. In the bottom section you can enable / disable impersonation and supply account details. Using the application pool identity account you’ve specified is probably the best option, since you’re already using that account to manage the rights your SharePoint app has got. Just remember to add that same account to your SSAS deployment too!

Edit: please check out this post for more details / a better solution.

ODBC: Driver’s SQLSetConnectAttr failed

Today I ran into a very strange problem with one of my web app’s. After migrating it to a new server, a ODBC link stopped working. The only differences between the two servers were the OS: XP on one and 2003 R2 on the other. Read more »

Next Page »