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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

[Solved] Problem with SQL Connection

(0) ShareShare
ReportReport
Posted on by

Hi everyone,

I am having a problem with an web application that connects to CRM. I was testing it on dev server and it would work fine but when I tried changing connectionStrings to connect to the production server, I am not able to access views that need db connection. The only difference between the two server is that dev server has crm and db on the same server whereas production server has one server just for its db. I think I might be missing some config information on my web.config. 

I receive an error mentioning about SocketException, WebException and InvalidOperationException.
The most interesting one to read is the invalidOperationException one as it says:

Metadata contains a reference that cannot be resolved: 'http://xxx:5555/AESCRM/XRMServices/2011/Organization.svc?wsdl'.]”.

The link given there is the actual sqlserver address and not the crmserver one, so I think the app is using the data-source given in connectionString to obtain organization service. At the moment I have info about the app under <appSettings>. In IIS, all those config are shown. 

Web.config

<connectionStrings>
<add name="XXCRM_MSCRMEntities" connectionString="metadata=res://*/crm.csdl|res://*/crm.ssdl|res://*/crm.msl; provider=System.Data.SqlClient; provider connection string=&quot;data source=sqlserver;initial catalog=XXCRM_MSCRM;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
  </connectionStrings>
  <appSettings>
    <add key="webpages:Version" value="2.0.0.0" />
    <add key="webpages:Enabled" value="false" />
    <add key="PreserveLoginUrl" value="true" />
    <add key="ClientValidationEnabled" value="true" />
    <add key="UnobtrusiveJavaScriptEnabled" value="true" />
    <add key="crmpassword" value="XXX" />
    <add key="server" value="crmserver:5555/XXCRM" />
    <add key="username" value="XXX" />
    <add key="domain" value="XX" />
  </appSettings>

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: Problem with SQL Connection

    Hi Bruno,

    Thanks for your reply.

    The error was actually a mistake of mine. I was putting the sql server address instead of the crm one, so it wasn't able to find the organization and etc.

    Sometimes we forget what happens behind the scenes and forget little config details like this hahah

    It's all sorted,

    Cheers :)

  • Suggested answer
    Bruno Lucas Profile Picture
    5,421 on at
    RE: Problem with SQL Connection

    I could be many things.

    can you ping the name of the sql server from the crm server machine?

    you are using the port 5555. you are now on an distributed environment.

    Do you have a firewall enabled between? try to temporarily shut down the firewalls or try to add a rule for port 5555

    you may need to configure sql server and reporting server to accept remote connection.

    You may try some app that would have the connection string wizard to validate. something like this:

    http://stackoverflow.com/questions/6958125/how-can-i-find-out-whats-wrong-with-this-connection-string 

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#2
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans