There is a common issue when trying to deploy your own ASP.NET application within the same CRM 4.0 IIS WebSite. I mean, If you just go to IIS Manager and create a new ASP.NET app (kind of a virtual directory) for your custom application, you’ll see that you cannot access to your custom application from IE because Titan is running a .NET HttpModule (similar to the older ISAPI Filters built with C++ :-)). So 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 Titan and that is why you are not able to execute your 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:
<add name="MapOrg" type="Microsoft.Crm.MapOrgEngine, Microsoft.Crm, Version=220.127.116.11, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
So, if you want to deploy and run your custom ASP.NET application within the same IIS WebSite where Titan 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, for instance, it could be the folder called “MyApplication” which I already copied into CRM Titan WebSite, 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:
Also, if you are not using any CRM 4.0 Titan assembly within your app, you can also get rid of all the references, adding also the following:
So!, it wasn’t that complicated, right?. It is nice because what you are changing is just your own custom application files. You are not touching anything internal from CRM 4.0 Titan. 🙂