0
votes

I have an ASP.NET web application that I'm trying to run as a sub folder of ISV in CRM 4.0.

I have deployed my app with the following structure:

ISV\
   MyAppName\
      *.aspx
      web.config
      bin\
         *.dll

I have not created a new IIS application at MyAppName. My aspx files all being with a <%@ Assembly Name="MyAssembly" %> tag. The pages load correctly with code-behind being executed as expected.

My problem occurs when calling a page method from JavaScript. The ScriptModule does not seem to be loaded as my request to MyPage.aspx/MethodName returns the entire page markup.

My code-behind and JavaScript are both correct and I have verified this by creating an application at MyAppName and accessing the url using /ISV/MyAppName rather than /Orgname/ISV/MyAppName.

How can I make ScriptModule load and work as expected when being accessed through /Orgname/ISV/MyAppName?

1
Does your custom web.config specify System.Web.Handlers.ScriptModule as an httpModule?Polshgiant

1 Answers

2
votes

As noted in this question, I believe this is happening because CRM's web.config doesn't specify System.Web.Handlers.ScriptModule as an httpModule. Your custom web.config probably does, so when you create an IIS app for it the httpModule gets loaded and your page method works. Without the IIS app, I believe most of your custom web.config gets ignored. I would try two things:

1) Remove your custom IIS web app. Add System.Web.Handlers.ScriptModule to CRM's web.config in the httpModules node. That would look something like this:

<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

(Note that modifying CRM's web.config is not supported and can be a pain if an update rollup overwrites CRM's web.config and blows away your changes.)

2) Write a separate webservice to perform the work of your page method. It would have to live in a separate custom web app.