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)

Issue while accessing CRM by using DNS alias URL

(0) ShareShare
ReportReport
Posted on by

Hi all,

I have MS crm 2011 in on premise.

There is a custom entity on which we have JavaScript code.

When I m accessing the CRM using server name in URL(e.g http://abcd1101:5555/CRM/main.aspx#) then it is working fine.

But when I am using DNS certificate url (e.g. http://crm.company.com:5555/CRM/main.aspx#) then I am getting following message.

Internet Explorer message:

This page is accessing information that is not under its control. This poses a security risk. Do you want to continue?

If I click "No" then JavaScript following code fails

var xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP");

    xmlHttpRequest.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);
    xmlHttpRequest.setRequestHeader("SOAPAction", " schemas.microsoft.com/.../RetrieveMultiple");
    xmlHttpRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
    xmlHttpRequest.setRequestHeader("Content-Length", xml.length);
    xmlHttpRequest.send(xml);

If I click "Yes" then JavaScript following code runs Succesfully without any error.

In internet option setting I did following setting to disable this prompt option then it is not prompting above window and working fine

 internet options> Scecurity Setting> Custom Level> under Miscellaneous enable option"Access data sources across domai" 

But I don't understand what is the reason that when we are using the DNS alias then it is becoming cross domain access of data.

Please help

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Internet Explorer message:

    This page is accessing information that is not under its control. This poses a security risk. Do you want to continue?

  • Rickard Norström Profile Picture
    on at

    Hi,

    Your CRM server probably identifies itself as abcd1101 so when you access it using crm.company.com it is not the same domain and the error occurs. If you would change the server identity to crm.company.com it will work I'd say. You change that in the deployment manager tool under preferences.

    How is the JS set up btw and what does it do?

    Regards

  • Community Member Profile Picture
    on at

    JS is simply to get data using crm services retrieve method

    Can you please provide little more words on "change in the deployment manager tool under preferences. "

  • Rickard Norström Profile Picture
    on at

    Hi,

    This page will give you some idea technet.microsoft.com/.../dn920275.aspx

    But I also wonder why this is happening to a js, that's why I was wondering what it does, can you share the code? Are you hard coding server address, how are you accessing the data?

    Regards

  • Community Member Profile Picture
    on at

    No.. I have debug the code. same thing are getting passed in both caes of accesing URls.

    No hard codded value.

  • Community Member Profile Picture
    on at

    GetODataPath = function () {

       return Xrm.Page.context.getServerUrl() + "/xrmservices/2011/organizationdata.svc";

    }

    RetrieveUnit = function (filter) {

       var retrieveRecordsReq = new XMLHttpRequest();

       retrieveRecordsReq.open("GET", GetODataPath() + filter, false);

       retrieveRecordsReq.setRequestHeader("Accept", "application/json");

       retrieveRecordsReq.setRequestHeader("Content-Type", "application/json; charset=utf-8");

       var temp = retrieveRecordsReq.send();

    ////The last line code (var temp = retrieveRecordsReq.send();

    ) line it goes to exception when I use crm.company.com/.../main.aspx

    But last line runs succesfully when I use abcd1101/.../main.aspx)

  • Rickard Norström Profile Picture
    on at

    Hi,


    What sort of url do you get from that function on the different urls? What UR are you running on the server? Have you tried to use "getClientUrl" instead of "getServerUrl", at some point the getserverurl was deprecated, don't know if that will help though.

    Regards

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