2
votes

I have been attempting to use the command line tool crmsvcutil (as Administrator) to generate a data context class and DTOs for our CRM Entities.

I am getting the following exception: Exiting program with exception: Access is denied.

My command-line arguements are as follows:

crmsvcutil /url:"http://<ourdynamicscrm>/XRMServices/2011/Organization.svc" /u:"<user Name>" /p:"<password>" /d:"<domain>"  /namespace:OurNameSpace.Xrm /serviceContextName:OurServiceContextName.Crm /o:Crm.cs

The user is an Administrator on the CRM box.

Has anyone had this problem and know what I am missing?

2
Is the user a system administrator on the windows box or an administrator of the CRM organization?ccellar
The user is an administrator of both the windows box and CRM organizationRyan Spears
Can you connect to the web service directly (from within a browser)? It would help limit out whether it's a tool or authentication issue.ryanjones
Yes. I could connect to the service.Ryan Spears

2 Answers

7
votes

I found what I was doing wrong and it was quite simple. I had left out the Organization Name section in the URL.

The code below generated the desired entities.

crmsvcutil /url:"http://<ourdynamicscrm>/<organization name>/XRMServices/2011/Organization.svc" /u:"<user Name>" /p:"<password>" /d:"<domain>"  /namespace:OurNameSpace.Xrm /serviceContextName:OurServiceContextName.Crm /o:Crm.cs
3
votes

Are you using claims based authentication with IFD? If so we ran into the same problem im our environment. There is a bug in the crmsvcutil.

Here is some information on the work around I used that worked.

Claims-based Authentication Workaround for SDK Version 5.0.3