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

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

From microsoft team blog:

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

Advertisements
Categories: Microsoft Dynamics
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: