user2086369
user2086369

Reputation: 19

CrmSvcUtil.exe Getting Error

I am new to Dynamics CRM. iam try to generate the data context class using CrmSvcUtil.exe

this is my command

CrmSvcUtil.exe /out:E:\OrgXrm.cs

/url:https://mdtestuser.api.crm5.dynamics.com/XRMServices/2011/Organization.svc

/username:[email protected] /password:Password

/deviceid:11bdver2vrqok88p7ek8r5umk0 /devicepassword:.devicepassword

but its giving an error ;

 Exiting program with exception: An error occurred when verifying security for th
e message.
Enable tracing and view the trace files for more information.
CrmSvcUtil.exe Error: 0 : Exiting program with exit code 2 due to exception : Sy
stem.ServiceModel.FaultException: An error occurred when verifying security for
the message.

Upvotes: 1

Views: 3257

Answers (3)

A Robben
A Robben

Reputation: 309

Hi if you are having trouble executing your command try doing it through Visual Studio, the link below shows an excellent step-by-step guide how to use CrmSvcUtil:

http://mscrmshop.blogspot.co.uk/2012/03/how-to-use-crmsvcutil-improved-version.html

Upvotes: 0

Greg Oks
Greg Oks

Reputation: 2730

Did you try specifying the port in the end of the URL?

Also Verify the Time and Date settings (including timezones) are set correctly on both the server and your client machine.  It seems that if the two machines are out of sync by more than a minute or two it will cause this problem.

Refer the below link:

http://msdn.microsoft.com/en-in/library/gg327844.aspx

To fully understand your error, you should use config file with enable tracing, here is an example of config file:

<?xml version="1.0"?>
<configuration>
  <appSettings>
    <add key="servicecontextname" value="XrmServiceContext"/>
    <add key="codecustomization" value="Microsoft.Xrm.Client.CodeGeneration.CodeCustomization, Microsoft.Xrm.Client.CodeGeneration"/>
    <add key="username" value="domain\user"/>
    <add key="password" value="password"/>
    <add key="out" value="XrmEntitiesReference.cs" />
  </appSettings>
  <system.diagnostics>
    <trace autoflush="false" indentsize="4">
      <listeners>
        <add name="configConsoleListener" type="System.Diagnostics.ConsoleTraceListener">
          <filter type="System.Diagnostics.EventTypeFilter" initializeData="Error" />
        </add>
      </listeners>
    </trace>
  </system.diagnostics>
</configuration>

check out example from here:

http://www.resultondemand.nl/support/sdk/06abab26-40fc-4b85-9a2a-5e68903ea138.htm

Upvotes: 2

Bvrce
Bvrce

Reputation: 2170

Try it without:

/deviceid /devicepassword

Upvotes: 1

Related Questions