Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Getting started with CRM dev using C#

Posted on by Microsoft Employee

Dear all,

I need to quicly study the way to connect to CRM online and accessing my CRM data and create new one by using c#

I have download the SDk and try to run the basic sample but none of them works and failes during authentication.

The problem with those ready made sample is that it is complicated to follow because you have to idea of clear steps to perform, you have sample already build.

In order to learn easily, is there a place where I could get a real stepe by step guide on how to build a small app which connect to CRM 365 online ?

That would help a lot

thanks

Serge

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Getting started with CRM dev using C#

    Hello thnaks for you advise.

    Do you know such simple.net utility to encrypt credential in config file and decrypt while passing them to authentication process ?

    Based on your experience, does the CRM online connection mentionned in first link in this post is the only way to connect now  ? ( in the past I was using direct SOAP )

    In sample linke provide, I can see that they gets the connection by using the follwing using proxy service :

    IOrganizationService service = (IOrganizationService)conn.OrganizationServiceProxy;

    Can't we use also :

    OrganizationWebProxyClient webclient= conn.OrganizationWebProxyClient;

    What is the difference between both ?

  • Verified answer
    PranavShroti Profile Picture
    PranavShroti 4,510 on at
    RE: Getting started with CRM dev using C#

    Hi Serge,

    As per best practices, you should encrypt your username and password using a simple .Net utility.

    Within code also password attribute should be declared as "SecureString" and not a normal string.

    Hope this helps.

    Regards,

    Pranav

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Getting started with CRM dev using C#

    Thnaks I will give a try.

    When I check the connection string for CRM 365 online in sample app.config, it is wierd to see the user authentication as clear text in config file ? any one can take this account ?

    Does it means Online authentication is not clearly secure by placing credential in config file ? or does credential need to be hardoded ?

    Thanks for advise and comments

  • Verified answer
    Alessandro Graps Profile Picture
    Alessandro Graps 2,664 on at
    RE: Getting started with CRM dev using C#

    Hi,

    you can start with ninjadeveloper.com/how-to-connect-to-dynamics-crm-2016-online-and-on-premise-using-a-c-console-application to understand the connection, and after you can follow this examples:

    community.dynamics.com/.../simple-dynamics-crm-console-application

    and

    msdn.microsoft.com/.../jj602970.aspx Here after you can follow all guides.

    Thanks

    A.G.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans