web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

problem using CrmSvcUtil.exe

(0) ShareShare
ReportReport
Posted on by 1,805
I am using this code to create Xrm.cs file through the code that runs in CMD.

CrmSvcUtil.exe /codeCustomization:"Microsoft.Xrm.Client.CodeGeneration.CodeCustomization, Microsoft.Xrm.Client.CodeGeneration" /out:"Xrm\Xrm.cs" /url:"fonecrm/.../Organization.svc" /domain:"techvedic.net" /username:"foneadmin" /password:"Vedic$123" /namespace:"Xrm" /serviceContextName:"XrmServiceContext" /serviceContextPrefix:"Xrm"

though i am successfully able to create the file but it appears as if there is some problem. Everytime I run my aspx page, I get an error message

Access is denied.

 Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ServiceModel.Security.SecurityAccessDeniedException: Access is denied.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Can anyone suggest what could be the cause of this problem?

 

*This post is locked for comments

I have the same question (0)
  • Bruno Lucas Profile Picture
    5,421 on at

    Hi,

    Are you following this example:

    msdn.microsoft.com/.../gg695790.aspx

    did you use the same credentials for the connection string of the config.xml?

  • Sumit Ruhela Profile Picture
    1,805 on at

    yes my credentials are same in web.config file.

  • Sumit Ruhela Profile Picture
    1,805 on at

    Alright then what could be the possible reason? i have mentioned correct credentials in web.config file but while binding data from crm to web, i get this error message.

  • Bruno Lucas Profile Picture
    5,421 on at

    When you use the :

    "/codeCustomization:"Microsoft.Xrm.Client.CodeGeneration.CodeCustomization,Microsoft.Xrm.Client.CodeGeneration"

    It will add some code to the Xrm.cs that is used for connection.

    you can try to add some breakpoints to see if that point to more detailed error. but it's more like to be to what is passed to the web config.

    are you connecting to an crm intranet URL or to an external CRM (IFD)?

    msdn.microsoft.com/.../gg695820.aspx

  • Aileen Gusni Profile Picture
    44,524 on at

    John,

    How you initiate the object to be accessed when you hit the access denied.

    THanks.

  • Sumit Ruhela Profile Picture
    1,805 on at

    i am using crm 2013 on-premise which on local intranet. i have followed this link msdn.microsoft.com/.../gg695790(v=crm.6).aspx to build my project.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans