Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Able to open CRM from Browser but unable to connect through Custom code

Posted on by 232

Hi,

I have created a CRM trial instance. Inside my company network, I'm able to open this instance in browser but when I tried to connect using Organization Service Proxy it is giving me the following error:

"An unhandled exception of type 'System.InvalidOperationException' occurred in Microsoft.Xrm.Sdk.dll

Additional information: Metadata contains a reference that cannot be resolved: 'https://xxxxx.crm8.dynamics.com/XRMServices/2011/Organization.svc?wsdl&sdkversion=9'."

I tried the same code from outside network. It is working.

Initially I suspect this could be because of firewall issue but I felt if this is the case, then It should not work even through browser.

If you have any idea, please share.

Thanks,

Nithya

*This post is locked for comments

  • Nithya Palanisamy Profile Picture
    Nithya Palanisamy 232 on at
    RE: Able to open CRM from Browser but unable to connect through Custom code

    Hi Goutam,

    This coding is working fine outside my company network. I build it in my company network and ran in one of the azure VM. It is working. The issue is only inside my company network. That too it is working when I open in browser.

    Thanks,

    Nithya

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Able to open CRM from Browser but unable to connect through Custom code

    seems you are correct but I have experience having similar issue earlier although for me same code was working properly but somehow it was giving me this error and then I did above steps and the error was gone.

    Apart from that you need to check my blog and download the latest dll and try to copy the code from here.

    goutamdascrm.wordpress.com/.../connecting-dynamics-365-online-using-console-application-c

    Download the sdk from here

    http://xrm.tools/SDK

    Make sure you have latest .net framework.

  • Nithya Palanisamy Profile Picture
    Nithya Palanisamy 232 on at
    RE: Able to open CRM from Browser but unable to connect through Custom code

    Hello Goutam,

    I checked in IE settings. network proxy is not enabled. But if network proxy is an issue then it should not work in browser as well, isn't? Please clarify.

    Thanks,

    Nithya

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Able to open CRM from Browser but unable to connect through Custom code

    Hello Nithya ,

    This error is coming due to network proxy. Sometimes you checked use a proxy server for your LAN in internet explorer browser settings . So you need check whether you are using proxy server by following way.

    1) Go to internet explorer settings

    2) Select Internet Options

    3)Go to connection Tab

    4)Click on LAN settings

    5) in LAN settings just unchecked the proxy server.

    Hope  this will helps.

  • Suggested answer
    Shahbaaz Ansari Profile Picture
    Shahbaaz Ansari 6,203 on at
    RE: Able to open CRM from Browser but unable to connect through Custom code

    make sure your are using lates sdk, please check below link,

    arunpotti.wordpress.com/.../step-by-step-to-connect-dynamics-365-crm-online-v9-x-using-c-console-application

    Thanks,

    Shahbaaz

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans