locked
Configuration Error in Offline ASP.NET application RRS feed

  • Question

  • I have an application working online in CRM 4.0 and would like to deploy it for offline access to the client. 

    I've put it in c:\Program Files\Microsoft Dynamics CRM\Client\res\web\ISV\<company>\<appname> on the client with all dlls in c:\Program Files\Microsoft Dynamics CRM\Client\res\web\bin

    I have had a simple application working offline through the CRM cassini implementation in the past, but witha more complicated app I am now getting a configuration error when I try to browse to the main page in the application on the client. The error is as follows:

    Server Error in '/' Application.
    --------------------------------------------------------------------------------
    
    Configuration Error 
    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 
    
    Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS.
    
    Source Error: 
    
    
    Line 115:      <add verb="GET" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler" validate="false"/>
    Line 116:    </httpHandlers>
    Line 117:    <sessionState
    Line 118:            mode="InProc"
    Line 119:            stateConnectionString="tcpip=127.0.0.1:42424"
     
    
    the line it's choking on is:

        <sessionState
                mode="InProc"
                stateConnectionString="tcpip=127.0.0.1:42424"
                sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
                cookieless="false"
                timeout="30"
        />


    and some other areas that might be relevant are as follows:

    <httpModules>
          <remove name = "CrmAuthentication" />
          <remove name = "MapOrg" />
    </httpModules>
    
    [...]
    
    <pages enableSessionState="true" enableViewState="true">
          <tagMapping>
    [...]
          </tagMapping>
    </pages>

    Any ideas\help would be appreciated!

    Sunday, March 29, 2009 9:57 PM

Answers

  • Is your application a custom webserivce? 
    Your error seems more like a website configuration error.
    Have you created a virutal directory for the folder that contains the custom code?


    H.
    • Marked as answer by Jim Glass Jr Tuesday, March 31, 2009 5:26 PM
    Monday, March 30, 2009 1:28 PM

All replies

  • Is your application a custom webserivce? 
    Your error seems more like a website configuration error.
    Have you created a virutal directory for the folder that contains the custom code?


    H.
    • Marked as answer by Jim Glass Jr Tuesday, March 31, 2009 5:26 PM
    Monday, March 30, 2009 1:28 PM
  • It IS a configuration error, I'm just trying to get around it :) and yes it is an ASP.NET application. As I said, I am looking to deploy it to the client machines for offline access; so it will run through cassini. Thus I cannot create a vdir as it's not running under  IIS.

    Looking at the offline web.config file, it looks like sessionState is InProc in cassini and Off on the CRM server, so this may be where the problem lies. I will continue the investigations.

    The recommendation from the light coverage this gets in a couple of books I have read seems to be that if you want a custom ASP.NET application to run both online and offline you should develop it WITHOUT a virtual directory created in the online version. I made the mistake of not doing it this way, and now it's giving many headaches. For example how does one enable Session without a vdir, or enable AJAX (getting AJAX working seems to involve unsupported editing of the global CRM web.config - since a nested web.config file in my application folder seems to be ignored ... and creating dummy axd files to trick the version of cassini that CRM uses to serve the required script resources )
    Monday, March 30, 2009 8:09 PM