tags:

views:

668

answers:

2

I need my project to run in a multi-tenancy environment. Following the SDK, I put the aspx files in C:\Inetpub\wwwroot\ISV\MyProject. I then put the DLLs in C:\Program Files\Microsoft Dynamics CRM\Server\bin\assembly.

When I view my page in CRM I get:

Could not load type 'MyProject._Default'.

If I put the DLLs in the c:\wwwroot\inetpub\bin folder then the page loads but I don't know (and currently have no means of testing) whether this will work off-line.

Additionally, when I load my page with the DLLs in c:\wwwroot\inetpub\bin, it seems to work fine. However, when I add it to an IFRAME in the accounts page using the address /isv/MyProject/default.aspx, the page that loads does not work because it loses the name of the organisation. Does anyone know what URL I should use for multitenancy?

+1  A: 

Hi, Bill

I think the best practice for developing CRM extensions meant to be accessed by regular CRM users (ie = each with his/her own CAL) is to store the pages in a folder under the [Installation folder]\CRMWeb\ISV folder. The corresponding dlls though should be placed in the [Installation folder]\CRMWeb\bin folder. For me this turns out to be

C:\Program Files\Microsoft Dynamics CRM\CRMWeb\ISV\MyApp

That is, not in the Server folder, but in the CRMWeb folder.

As far as the multi-tenancy is concerned, you will have to use a CrmAuthenticationToken parameter when calling the CRM Web Services. This token in turn has a property called OrganizationName. UI-Integrated extensions like IFrames, Buttons etc already provide your pages with this information as a GET parameter. Check this MSDN link to view an example.

dsabater
In the end, that's what I did. I haven't tested it using Outlook yet but it works for On-Premise and IFD.
A: 

As of rollup2 ms recommends on putting your dll inside your own project bin folder. Look for "Custom Code Best Practices" on CRM SDK for more information.

I can't find that - do you have a link?