Hello. I am administering a CRM 4.0 server. I have been experiencing issues accessing the Deployment Manager where I have run into errors. Initially, I could not access the Deployment Manager since I was not recognized as a Deployment Administrator. So in SQL Server I ran the following query to return the Deployment Administrators:
SELECT s.securityRoleid, s.systemuserid,u.name FROM dbo.SystemUserRoles s, SystemUser u WHERE s.systemuserid=u.id
and got the below output:
securityRoleid | systemuserid | name |
19CFBC8D-77ED-459E-9909-1BF1CC1B0430 | D6A7A6EC-2D99-E711-AA9C-000C29FAA355 | mydomain\someuser1 |
19CFBC8D-77ED-459E-9909-1BF1CC1B0430 | 1F421E02-209D-E711-B436-000C29FAA355 | mydomain\someuser2 |
19CFBC8D-77ED-459E-9909-1BF1CC1B0430 | BB84832F-23F5-E711-B6E4-000C29FAA355 | NULL |
Both of these users are no longer part of my organisation. So after activating the user account in Active Directory, I tried logging into the CRM 4.0 server using someuser1 then opened Deployment Manager. However, I experienced the following error message (also experienced the same issue with someuser2):
FX:{1ac9de3e-24ae-480d-9e15-65386b76e433}
Unable to cast object of type 'System.DBNull' to type 'System.String'.
Exception type:
System.InvalidCastException
Exception stack trace:
at Microsoft.Crm.Admin.AdminService.ConfigDBSecurity.SystemUserData.get_Name()
at Microsoft.Crm.Tools.Admin.SystemUserNode..ctor(SystemUserData systemUserData)
at Microsoft.Crm.Tools.Admin.SystemUserListView.OnBuildSubNodes()
at Microsoft.Crm.Tools.Admin.SystemUserListView.OnInitialize(AsyncStatus status)
at Microsoft.ManagementConsole.View.ProcessRequest(Request request)
at Microsoft.ManagementConsole.ViewMessageClient.ProcessRequest(Request request)
at Microsoft.ManagementConsole.Internal.IMessageClient.ProcessRequest(Request request)
at Microsoft.ManagementConsole.Executive.RequestStatus.BeginRequest(IMessageClient messageClient, RequestInfo requestInfo)
at Microsoft.ManagementConsole.Executive.SnapInRequestOperation.ProcessRequest()
at Microsoft.ManagementConsole.Executive.Operation.OnThreadTransfer(SimpleOperationCallback callback)
This post indicates a solution to the above problem which occurs where a user in the system does not have a firstname or lastname. I checked the two Deployment Administrators (someuser1 and someuser2) in Users in the CRM 4.0 web interface, but both their firstname and lastname are filled. Is there another place where this needs to be filled in? I also noticed that the third user from the above SQL output has a name field in the database that is NULL. Could this be the cause of the problem?
The posts that I came across mention that the cause of the error was a user with a blank firstname/lastname. This was not the case with my situation where after searching for a blank firstname/lastname, I did not find any matching users.
I ended up finding out the cause of the error, which was the row containing NULL which appeared in the third row in my original post. The problem was that the SystemUserRoles table contained a row, which did not have a corresponding row in the SystemUser table. After deleting this row with the below SQL query, I was able to access Deployment Manager without experiencing the error:
DELETE FROM dbo.SystemUserRoles WHERE SystemUserId='BB84832F-23F5-E711-B6E4-000C29FAA355';
Hi partner,
This error may be caused by some user without a firstname or lastname.
Here is a similar thread for you.
community.dynamics.com/.../393492
Best Regards,
Leo
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156