Using Microsoft Dynamics CRM URLs
[Applies to: Microsoft Dynamics CRM 4.0]
Microsoft Dynamics CRM 4.0 introduced many changes to the way URLs need to be constructed. In Microsoft Dynamics 3.0 and earlier versions, you could simply access a page by using a URL such as http://<crmserver:port>/default.aspx. The introduction of multi-tenancy, Microsoft Dynamics CRM Online, and Internet-facing deployments (IFDs) changes the URL formats used to access the server. Both Microsoft Dynamics CRM Online and IFDs require URLs in the form https://orgname.mycrmhost.com. This is to secure cookie domains and to provide organization-specific URLs.
Things are a little bit different for on-premise Microsoft Dynamics CRM installations:
- You need a way to indicate which organization you are trying to access. The format is: /orgname/page.aspx. For example, you would use: http://<crmserver:port>/orgname/page.aspx.
- Virtual directories are not created for every organization. Microsoft Dynamics CRM implements a virtual path provider that parses the URL to figure out which organization you are accessing and to perform the correct authentication.
- For on-premise deployments, if a user just types in a URL without an organization name (such as http://crmserver), Microsoft Dynamics CRM tries to service the request for the user's default organization.
One of the common questions is how to figure out the correct URL used to access custom pages. The following table shows how the custom page should be accessed using an organization-specific URL.
|Object||On-premise deployments||IFDs||Microsoft Dynamics CRM Online|
|aspx page or Web service under an ISV folder using the CRM vdir||Prepend the organization name to the page.
|Do not prepend the organization name to the page.
|aspx page or Web service not under the CRM vdir, such as on a separate vdir or server||Do not prepend the organization name.||Do not prepend the organization name.||Do not prepend the organization name.|
|ISV Menu/IFrame to a URL addressable CRM form||Prepend the organization name.||Do not prepend organization name.||Do not prepend the organization name.|
|Access crmservice.asmx||Use the DiscoveryService to determine the correct URL.||Use the DiscoveryService to determine the correct URL.||Use the DiscoveryService to determine the correct URL.|
For on-premise deployments, you have to prepend the organization name to the URL if your page is under the ISV folder in the Microsoft Dynamics CRMs vdir. This is because the Microsoft Dynamics CRM virtual path provider processes the request to your page and, if an organization name is not specified, it assumes the request is for the default organization for that user. This can result in the following error: "The organization id of the user being verified does not match the organization id of the execution context passed to VerifyUser."
© 2010 Microsoft Corporation. All rights reserved.