Geeks With Blogs
Wes Weeks

Working for a client on an upgrade for 3.0 to 4.0 with an application that was in place under the CRM IIS directory as a virtual directory.  Struggled trying to get this to work and respond as it did under 3.0.

Basically, the site would work if it was it's own web site, but not as a virtual directory.  To make matters worse, the only thing returned when you navigated to the site was a blank page.  None of my code was executing and I wasn't getting any type of error message.  Tried messing with every IIS 7.0 setting that seemed to make sense and even a few that didn't

Didn't know what or who to blame.  CRM 4.0?  Windows Server 2008?  My brother-in-law? (because he owes me money and I blame him anyway)

The issue is that you cannot access to your custom application from IE because CRM 4.0 is running a .NET HttpModule and that .NET HttpModule is re-writing the URL depending of the organization (default organization normally.). This is a normal execution because of the multi-tenancy capability of CRM 4.0 and that is why you are not able to execute the ASP.NET pages from IE.  IE is not finding that changed URL.

In fact, that HttpModule is declared within CRM web.config as the following:

<httpModules>
<add name="MapOrg" type="Microsoft.Crm.MapOrgEngine, Microsoft.Crm, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</httpModules>

So, if you want to deploy and run your custom ASP.NET application within the same IIS WebSite where CRM is running, what you gotta do is to specify within your custom app’s web.config that you want to get rid of that kind of filter (HttpModule). Please, note that I am talking about changing your own custom app's web.config. Do not touch CRM 4.0 Web.config, ok

So, if you go to your custom ASP.NET application folder and then you open your own Web.config, if you add the following directives, your clean that CRM filter, so you’ll be able to run your custom app from IE.

This is what you have to add to your own web.con file:

<system.web>
<httpModules>
<clear/>
</httpModules>

Problem solved.  Still blaming the brother-in-law though....

Posted on Friday, April 25, 2008 5:06 PM Microsoft CRM | Back to top


Comments on this post: How to deploy your own ASP.NET application within the same site as Dynamics CRM 4.0

# re: How to deploy your own ASP.NET application within the same site as Dynamics CRM 4.0
Requesting Gravatar...
very good post
Left by San on Mar 09, 2011 10:43 AM

# re: How to deploy your own ASP.NET application within the same site as Dynamics CRM 4.0
Requesting Gravatar...
doesnt work for crm 2011?
Left by taz on Oct 25, 2011 4:43 AM

Your comment:
 (will show your gravatar)


Copyright © Wes Weeks | Powered by: GeeksWithBlogs.net