locked
IFrames & URL (resource canot be found) RRS feed

  • Question

  • I added an IFrame to a form and set the URL to http://localhost:[port]/myPage.aspx. The website is hosted through IIS. If I enter the URL directly in IE it pulls up just fine. However, that exact same URL does not work for the IFrame. Instead I get the error:

    Server Error in '/' Application
    The resource cannot be found.
    Description: HTTP 404. The resource you are looking for could have been removed, ....
    Requested URL: /crm/myPage.aspx
    Version Information> MS .NET Framework Version 4.0.30319...

    The interesting part is the "Requested URL". It looks like a relative URL despite the fact that I enter an absolute URL. Could this be the issue? If so why is that URL being changed?

    Wednesday, May 7, 2014 7:27 AM

Answers

  • The issue may be that the url you specified contains localhost. CRM may have logic that decides that is not an appropriate URL - what happens if you use a server name or domain name instead of localhost ?


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    • Marked as answer by hfaun Wednesday, May 7, 2014 2:37 PM
    Wednesday, May 7, 2014 11:44 AM
    Moderator

All replies

  • IIS sometimes uses a different location for its localhost when it's through CRM. Instead of putting the file in C:\wwwroot\inetpub, try it in C:\Program Files\Microsoft Dynamics CRM\CRMweb - I usually create a folder in there just so my files aren't mixed up with the system ones so your relative URL will be just the folder name and the file name.
    Wednesday, May 7, 2014 11:24 AM
  • The issue may be that the url you specified contains localhost. CRM may have logic that decides that is not an appropriate URL - what happens if you use a server name or domain name instead of localhost ?


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    • Marked as answer by hfaun Wednesday, May 7, 2014 2:37 PM
    Wednesday, May 7, 2014 11:44 AM
    Moderator
  • Based on this input I replaced localhost with 127.0.0.1 and it started working. Thanks.
    Wednesday, May 7, 2014 2:37 PM