Debugging sandboxed plugins

Debugging sandboxed plugins

Microsoft Dynamics CRM 2011 includes a feature to allow sandboxing of plugins. This means that the program execution is fenced off from the rest of the server to avoid any buggs or exploit attempts in the plugins to affect the rest of the server. This is most useful in the CRM Online and partner hosted deployments but can also be used in normal on-premise solutions to fence off some risky code.

When developing plugins, I strongly recommend a local CRM installation, even if the deployment of the plugin is going to be on CRM Online. It is not possible to step-debug programs on CRM online for natural reasons, and the shotgun-debugging approach that is available from the CRM Plugin SDK is quite rough and does increase development time.

Normally when step-debugging plugins, you would attach to the w3wp process for the CRM app-pool.

However, you do have to remember that plugins that are registered to be run in the sandbox, actually are executed under a different process hence you cannot attach to the w3wp process when debugging but instead have to attach to the Sandbox process.

If you would like, it is also possible to register the plugin outside the sandbox first while developing and the re-register it in the sandbox later. Some errors might, however, only show when working with sandboxed plugins so it is also good to be able to debug these.

Do note that it I have installed the sandbox to use Network Servce as the executing account, this is not recommended for production deployments, since that will nullify some of the security features of the sandbox. Instead a dedicated minimum security account should be used to block the process from accessing anything outside the sandbox.

Gustaf Westerlund
CEO, Chief Architect and co-Founder at CRM-konsulterna AB

www.crmkonsulterna.se

Email router on Windows Server 2008 R2

A customer of mine is running CRM 4 in IFD mode on a Windows Server 2008 R2 and I thought it might be a good idea to activate the Email router and talk to them about sending mail using that instead of the internal email handler to reduce the need for them to be online with their Outlooks for things to work.

Well, as usually I set up the email router on the CRM-server but was baffled when I couldn’t connect to it. I just got this weird error of 401 Unauthorized error. I tried everthing, changing the users, adding the user to the privusergroup, changing the ADWebApplicationRootDomain. After some googling I found the solution on this excellent blog.
http://crmwizard.blogspot.com/2010/02/server-2008-and-email-router-with-ifd.html

It turned out that the server was using IPv6 to access itself and the onpremise exceptions set up in the IFD settings were only based on IPv4 hence it tried to access it in the IFD mode. I just switched IPv6 off in the network adpater and everything worked as it should.

If you speak swedish, there are some interesting discussions on http://www.crmforum.se/, the only Swedish CRM-forum dedicated to Dynamics CRM. So head over there and digg in!

Gustaf Westerlund
CEO, Chief Architect and co-Founder at CRM-konsulterna AB

www.crmkonsulterna.se

CRM 2011 Online and datawarehousing

I attended a half day presentation by Microsoft yesterday on the subject of Dynamics CRM 2011 and integrations. It seems that many parterners are a bit hesistant to integrating Dynamics CRM 2011 Online and are promoting the on-premise versions when the issues of integration are important.

Microsoft did a good job in showing that they do have sufficient technology to handle integrations to Dynamics CRM 2011 Online including the Azure based technology ACS – Access Control System that together with Active Directory Federation Services 2.0 can be used to allow Dynamics CRM 2011 Online to use a local AD as authenticator. It is probably not as easy as setting up a normal on-premise solution but at least it can be done and there hopefully are some whitepapers or Youtube-clips on how it is done.

One of the issues that were discussed was the issue of integrations in reagards to Business Intelligence and data warehousing. This is usually done using SQL Integration Service (SSIS) with direct SQL communication. Their suggestion on how to address this issue was to use the new OData interface that exists in Dynamics CRM 2011. I am no SQL expert but I do believe that this being a standardized protocol, integrations will be possible. However, there will still be issues with performance as the amounts of data that need to be transfered are quite large and the OData protocol is still a strict pull-protocol which does not allow for trigger-based updates.

Another issue that I asked about was the licensing issue in regards to Dynamics CRM 2011 Online. Take the following example: A large company of about 40 000 employees has about 500 people activly working in with Dynamics CRM 2011 Online for SalesForceAutomation. A data warehouse is created and data is integrated from many different systems, ERP, production systems, quality control systems and CRM. CRM being the customer data master. SharePoint is used as the global Intranet platform and some of the data from the data warehouse is published on the SharePoint portal to all employees. For instance our currently 10 most important customers. So, the 39 500 employees are only viewing a minute part of the customer data, and it indirecty, via the data warehouse, originates from the CRM system. What licenses in CRM are required for these users?

In the case of an on-premise installation, the best licensing option for Dynamics CRM is the Application Platform Agreement (APA) that is sort of a “free-for-all pass” which is negotiated with Microsoft. However, in the Online environment there is no correlating licensing agreement to the APA. I explicitly asked Micrsoft how this was to be licensed and their answer is that 40 000 separate users licenses are required for Dynamics CRM 2011 Online, making it a rather impossible option, in other words forcing the company to either an on-premise solution, removing some of the data from the data warehouse/Intranet or moving to another CRM supplier. Neither of which is in line with showing off the power of Microsofts cloud services.

I hope this is just a temporary flaw since it does limit Microsofts business opportunities with larger companies and I would think it is probable that some similar agreement form that matches the on-premise APA will be introduced.

On the other hand, the External Connector license is not required at all for CRM Online (or SPLA) making it even more interesting for smaller CRM customers as customer/event/portal integrations are more and more common.

Gustaf Westerlund
CEO, Chief Architect and co-Founder at CRM-konsulterna AB

www.crmkonsulterna.se

Installing CRM 4.0 on Windows Server 2008 (R2)

Windows Server 2008 (R2) brings a lot of new and nice features. IIS 7 being one of them and fact that you need to install the features you want to use also makes it more slim and generally better.

However, it does add some extra complexity to installing Dynamics CRM since it requires some components. The installation check that Dynamics CRM runs during installation is not complete in this aspect either and it misses out on some critical components.

I am preparing a virtual machine for a customer of mine and it came with everything installed, but not verified. The Dyn CRM installation did not work. After some checking I found that the following role services were missng:

Static Content Handler
Windows Authentication

and I also added

Digest Authentication and
Static Content Compression

Also the SQL Reporting Services (SSRS) was configured to run with an Execution Account, which I found on some bloggs was erroneous. This is not strange since SSRS with Dynamics CRM is designed for sending the user credentials all the way to the SQL-server, which means that SSRS must impersonate the user. So I disabled this.

After fixing these issues, the best way forward is to reinstall Dyn CRM since trying to fix a faulty installation is a lot harder and takes a lot more time. If you have data that you need, try reinstalling and then redeploying the database.

I am also using VirtuaBox as virtualization and I strongly advise against using the snapshot functionality, it seems very unstable.

Gustaf Westerlund
CEO, Chief Architect and co-Founder at CRM-konsulterna AB

www.crmkonsulterna.se

Javascript in CRM 2011 – lots of new stuff

Javascript in CRM 2011 – lots of new stuff

CRM 2011 brings lots of new technology, one of the areas being web resources, a very longed for area where general resources like webpages, javascript libraries and silverlight applications can be uploaded in a general area and then selected in certain areas.

Microsoft have also revised the javascript framework for CRM 2011 and it brings a lot of enhancments and and some old stuff has been depracated, but still works.

I found a very interesting grid at this blog: http://inogic.blogspot.com/2011/02/difference-between-crm-40-and-crm2011.html

I have referenced it directly for your pleasure bellow, click it to view it in full size:

Great thanks to the guys behind it at Inogic. A great help!

Gustaf Westerlund
CEO, Chief Architect and co-Founder at CRM-konsulterna AB

www.crmkonsulterna.se