Microsoft Dynamics CRM New Zealand NZ Partner Magnetism

  • News & Events

    Keep up with the latest and greatest news, events and knowledge from the Magnetism team.

Magnetism xRM blog Contact Us

Blog

Go Back

31 Aug

How to connect a Silverlight Project to Dynamics CRM 4.0


As I have been working a lot with Microsoft Silverlight lately, in this post I am going to explain how to connect a Silverlight project into Dynamics CRM 4.0. For the sake of this post I just created a simple ‘Hello World’ Silverlight project to demonstrate to you how to get this project to display in Dynamics CRM 4.0.

Above is what the Microsoft Silverlight project looks like. Now, when I was trying to connect a Silverlight project to Dynamics CRM 4.0 I wasn’t aware that it is not as easy as copying your project files across, there are a few minor changes to make and you need to publish your project for external use.

Now for the minor changes, you need to check your web.config file and change one little thing, this is what mine looks like:

<configuration>

    <system.web>

        <compilation debug="true" targetFramework="4.0" />

    </system.web>

</configuration>

If you have this highlighted section in your web.config file you will need to delete it for this to work within Dynamics CRM 4.0. Now that you have done that, you need to save and build your project. So to do this, right click on the solution and then click build. After this has completed you then need to go and publish your solution for external use, to do this right click on your .web project and then click publish.

When you do this a new dialog box will pop-up, this will give you four different publish methods; Web Deploy, FTP, File System, and FPSE. These give you different options if you wish to publish directly to your website or to your FTP. For this project I am using File System as I am using a VPC to demo this and need the files to cope to the wwwroot file. I then select the target location and click Publish.

You will now need to move the files that it creates into the ISV file of your Dynamics CRM 4.0 files. This is the easy step is finished so let’s move on to the harder one. You need to export the sitemap from Dynamics CRM and do some editing to it.

<SubArea Title="Hello World" Id="Silverlight" Url="/../ISV/Hello.World/Hello.WorldTestPage.aspx" />

Here is the outcome.

Want to find out more? Please contact us here!


blog comments powered by Disqus
Contact Us