General exception while creating an appointment in CRM 2011

Some time ago I had a serious problem when I tried to add the apppool user to CRM 2011. When I did that, not a single user could access CRM2011 anymore. I think, not sure, that it had something to do with the AD groups where the apppool user is a member of. I think that when I added that user to CRM2011 something changed and it messed up the windows permissions of that user. The trick was to delete every record manually from the CRM 2011 database where that user’s GUID was linked to. I know it’s not supported but it solved my problem.

Today I was trying to create an appointment and this resulted in a General Exception. Pretty weird but immediately I thought it had something to do with that same user from a couple of weeks ago because the GUID showed up in the errorlog:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Pointer record exists but referenced record of type 8 not found: aa60799f-49a3-e111-8444-000c29cbd80b

Scratching my head I was thinking: what can I do now? I thought I went through every table in CRM 2011 looking for that systemuserid.

I enabled tracing to see what exactly was going on. In the log I found the following query:

SELECT TOP 1000 [DisplayInServiceViews]
  FROM [LRMDEPLOYMENT_MSCRM].[dbo].[ResourceBase]

This is the point where the error was returned. Now I knew that I missed a table. When an appointment is created CRM2011 probably tries to lookup all the available resources for scheduling. In this table there was still a reference to that “bad” userid and it resulted in an error. I removed this record and I could create my appointment.

CRM2011 keeps asking for user credentials

A great way to test security roles is to hold SHIFT and right click on Internet Exploter.

ScreenHunter_17 May. 29 09.44

This way you can run Internel Explorer in the context of different users in the domain. Today I was trying to that but CRM 2011 showing the prompt requesting username and password followed by a “Not Authorized” message. Pretty frustrating because I was sure I gave the correct security roles.

How to fix this problem?

- Go to Internet Options and click on the “Security” tab
- Click on the button “Custom Level” and scroll down until you reach the end of the list
- Under “User Authentication” select “Automatic logon with current user and password”

ScreenHunter_17 May. 29 09.40