Extending Microsoft Dynamics CRM 3.0 with ASP.NET 2.0 Web Applications

Until now, ASP.NET Web applications, which are hosted on the Microsoft Dynamics CRM server and invoked from Microsoft Dynamics CRM, had to run on .NET Framework version 1.1. This practice was the result of Internet Information Services (IIS) 6.0 not supporting the execution of an ASP.NET 1.1 Web application, such as Microsoft Dynamics CRM, and an ASP.NET 2.0 Web application in the same IIS process.

This blog describes how to configure an ASP.NET 2.0 Web application so that it can be invoked by Microsoft Dynamics CRM.

Application Pooling in IIS 6.0

The following text on Application Pooling in IIS 6.0 is taken from an MSDN article named Configuring an ASP.NET Application for an ASP.NET Version. This text describes the nature of the problem encountered when mixing ASP.NET 1.1 and 2.0 Web applications in a single IIS 6.0 process.

“IIS versions earlier than 6.0 use the ASP.NET process model (Aspnet_wp.exe). Under the ASP.NET process model, each unique application version automatically runs in a separate process at run time. All applications that target the same version of the runtime share the same process (or processes in Web garden mode). However, IIS 6.0 uses the IIS 6.0 process model (w3wp.exe) and introduces a new isolation feature called application pooling. Application pooling allows applications to run together in one or more processes, as long as they share the same pool designation. Applications that are assigned different application pools never run in the same process.

When multiple versions of the .NET Framework are installed on a computer that uses IIS 6.0, you might encounter the following error message in the Application Event log.

It is not possible to run different versions of ASP.NET in the same IIS process. Please use the IIS Administration Tool to reconfigure your server to run the application in a separate process.

This error occurs when more than one version of ASP.NET is configured to run in the same process. Different versions of the .NET Framework and runtime cannot coexist side-by-side in the same process. Therefore, an ASP.NET application that uses a particular version of the runtime must not share a process with an application that uses a different version. This error commonly occurs when two or more applications are mapped to different versions of ASP.NET, but share the same application pool.”

To work around this issue on the Microsoft Dynamics CRM server, you must:

  • Configure your Web application to run under .NET Framework 2.0.

  • Create a new application pool.

  • Assign your Web application to that pool.

The steps to accomplish these tasks are outlined below.

Configure Application Execution for .NET 2.0

The following steps show you how to configure the IIS Web server to run your ASP.NET application using the .NET Framework version 2.0.

1.  In Control Panel, click Administrative Tools and then click Internet Information Services (IIS) Manager.

2.  Expand the local computer node, the Web Sites node, and then the Default Web Site node.

3.  Right-click your ASP.NET application’s virtual directory and then click Properties in the menu.

4.  In the dialog box, click the ASP.NET tab.

5.  In the ASP.NET version combo box, click the down arrow and select the 2.0.x value.

6.  Click Apply and then click OK.

Configure the Application Pool

Because Microsoft CRM 3.0 runs under .NET Framework version 1.1 and your ASP.NET application runs under .NET Framework version 2.0, additional configuration is necessary in order to avoid a run-time IIS error. Use the following instructions to create a new application pool and assign your application to that pool.

To disable IIS 5.0 isolation mode in IIS 6.0, follow these steps:

1.  In IIS Manager, expand the local computer node.

2.  Right-click the Web Sites folder and then click Properties.

3.  On the Service tab, clear the Run Web service in IIS 5.0 isolation mode check box.

To create a pool designation in IIS 6.0, follow these steps:

1.  In IIS Manager, expand the local computer node.

2.  Right-click the Application Pools folder, point to New, and then click Application Pool.

3.  Enter the new pool designation, for example SampleAppPool, in the Application pool text box

4. Click OK.

To assign a pool designation to an ASP.NET application in IIS 6.0, follow these steps:

1.  In IIS Manager, expand the local computer node, expand Web Sites, and then expand Default Web Site.

2.  Right-click your Web application’s virtual directory, and then click Properties.

3.  On the Directory tab, select the new pool designation that you previously created from the Application Pool list.

4.  Click OK.

Now you can add a button or menu item to Microsoft Dynamics CRM that invokes your Web application. Test the Web application to verify its operation.

For more information about how to customize Microsoft CRM, see Customizing using ISV.Config in the Microsoft Dynamics CRM 3.0 SDK.

Peter Hecke

Comments (7)

  1. A very interesting post but I feel you should point out that ANY user who wishes to use CRM data in this manner will require a FULL crm licence. This post explains the implications:


    Keep up the good information.


  2. I’m not sure what you mean with: Until now, ASP.NET Web applications, which are hosted on the Microsoft Dynamics CRM server and invoked from Microsoft Dynamics CRM, had to run on .NET Framework version 1.1.

    We’ve been developing ASP.NET 2.0 applications that integrate with and are invoked from MS CRM from the beginning. There shouldn’t be any problem if you know how to configure your 2.0 website (app pools etc.) like you describe in this post.

    However, in this post you make it seem like this is something new and it isn’t.

  3. Peter Hecke says:

    While it is true that this is not any new capability, the SDK documentation does not go into detail on how to get an ASP.NET 2.0 Web application running on the Microsoft CRM 3.0 Web server. In the past we have recommended that developers use Visual Studio .NET 2003 to develop their Microsoft CRM 1.2/3.0 extensions. This blog is for those developers who do not know how to get their ASP.NET 2.0 applications running on the Microsoft CRM 3.0 server.

  4. Jeff Jaszkowiak says:

    How do you run an older .asp application on a web server that is also running asp.net 2.0?

  5. Wiley Siler says:

    How do you get CRM 3.0 to install on Windows 2004 Server x64?  It does not seem to allow ASP.Net 1.1 to run at all….

  6. Refael says:

    If I’d like to run CRM 3.0 web-services from my .NET 2.0 Application. Is it possible?

    And if not, is there any other way to communicate with a CRM 3.0 from a 2.0 application?

    Thanks in advance.

  7. Ketan says:

    Nice I Solved Same Problem On Server 2003.On Which Around 25 Running Application on 1.0 and Now my Application 2.0


Skip to main content