locked
Deploying custom isv aspx RRS feed

  • Question

  • Hi,

    We are working on debugging a custom ISV page, CRM 4.0, rollup 10, on a Windows 2008 server with IIS 7.0.

    A test custom page is up and running without issue, however, the one that matters ("MapCRM") is not...yet.  Error message is 404 directory or file not found.

    File structure is as follows:

    /CRMWeb/ISV/MapCRM/MapCRMPost.aspx

    /CRMWeb/ISV/MapCRM/MapCRMSelect.aspx

    /CRMWeb/ISV/MapCRM/bin/MapCRM.dll

    /CRMWeb/bin/MapCRM.dll

    The custom button is pointing to MapCRMSelect.aspx:

     

                    <Button Icon="/_imgs/ico_18_debug.gif" JavaScript="window.showModelessDialog('ORGNAME/ISV/MapCRM/MapCRMSelect.aspx', document.all['crmGrid'].InnerGrid.SelectedRecords);">

                      <Titles>

                        <Title LCID="1033" Text="Map" />

                      </Titles>

                      <ToolTips>

                        <ToolTip LCID="1033" Text="Map the selected records" />

                      </ToolTips>

                    </Button>

    IIS log entry for MapCRM (displays a 404 error):

    2010-10-12 22:08:06 W3SVC1 192.168.0.12 GET /ORGNAME/isv/MapCrm/MapSelect.aspx - 443 DOMAIN\USERID 192.168.0.213 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+6.1;+Win64;+x64;+Trident/4.0;+GTB6.5;+.NET+CLR+2.0.50727;+SLCC2;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+Media+Center+PC+6.0;+Tablet+PC+2.0) 404 0 0 18

    IIS log entry for test "Chapter13" page (displays correctly):

    2010-10-12 22:08:30 W3SVC1 192.168.0.12 GET /ORGNAME/isv/Chapter13/Dashboard.aspx - 443 DOMAIN\USERID 192.168.0.213 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+6.1;+Win64;+x64;+Trident/4.0;+GTB6.5;+.NET+CLR+2.0.50727;+SLCC2;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+Media+Center+PC+6.0;+Tablet+PC+2.0) 302 0 0 169

    Any ideas for what to check are greatly appreciated.

    Cheers, gg

    Tuesday, October 12, 2010 10:29 PM

All replies

  • what is "ORGNAME" HERE

    'ORGNAME/ISV/MapCRM/MapCRMSelect.aspx'


    Jai Ho CRM http://mscrmkb.blogspot.com Skype - amol.gholap
    Wednesday, October 13, 2010 4:09 AM
  • orgname is the name of our organization in CRM.  it is currently hard coded in the ISV config xml, that seemed to get us closer to working and we only have one org.
    Wednesday, October 13, 2010 5:13 AM
  • Instead of 'ORGNAME/ISV/MapCRM/MapCRMSelect.aspx', try using '../../ISV/MapCRM/MapCRMSelect.aspx' ?
    Neil - My CRM Blog
    Wednesday, October 13, 2010 9:14 AM
  • Neil, thank you for the suggestion.

    Using  '../../ISV/MapCRM/MapCRMSelect.aspx' or  '/../../ISV/MapCRM/MapCRMSelect.aspx' also result in file not found, IIS log entry is:

    2010-10-13 12:37:24 W3SVC1 192.168.0.12 GET /ISV/MapCRM/MapCRMSelect.aspx - 80 DOMAIN\USERID 192.168.0.213 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+6.1;+WOW64;+Trident/4.0;+GTB6.5;+SLCC2;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+Media+Center+PC+6.0;+InfoPath.2;+OfficeLiveConnector.1.3;+OfficeLivePatch.0.0) 404 0 0 24

    At one point, we tried referencing the assembly in the web.config file (in /CRMWeb/):  <add assembly="MapCRM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=869fff78a5cb73f6"/>

    I removed this last night; no difference.

    Another note; the test page that works logs in IIS:

    2010-10-13 12:50:21 W3SVC1 192.168.0.12 GET /ORGNAME/ISV/Chapter13/Dashboard.aspx orgname=ORGNAME&userlcid=1033&orglcid=1033 80 DOMAIN\USERID 192.168.0.213 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+6.1;+WOW64;+Trident/4.0;+GTB6.5;+SLCC2;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+Media+Center+PC+6.0;+InfoPath.2;+OfficeLiveConnector.1.3;+OfficeLivePatch.0.0) 200 0 0 27577

    On my earlier post, it didn't show this section:  orgname=ORGNAME&userlcid=1033&orglcid=1033 , not sure how that got missed.  Perhaps there is a parameter that is not getting passed? 

    Wednesday, October 13, 2010 12:47 PM
  • It's hard to read in the posts, but the differences between working and non working are:

    working includes:

    [PATH] orgname=ORGNAME&userlcid=1033&orglcid=1033 80 [DOMAIN\USERID]

    non working here has:

    [PATH] - 80 [DOMAIN\USERID]

    where the items in [] are identical between the two; the "-"  in front of the 80 exists in non-working version, but not in the working.

    working ends with: 200 0 0 27577

    non working: 404 0 0 24

    These are the only differences I can see in the log entries (other than referencing different folders and page names, but the structure is the same for both.

    Wednesday, October 13, 2010 1:02 PM
  • bump....any ideas?  i can't find any details on the 404 0 0 24 error in IIS, though it's supposed to help with troubleshooting.
    Thursday, October 14, 2010 1:20 AM
  • We will diagnose this step by step:

    Step 1 : Check if Page is opening for not


    <Button Icon="/_imgs/ico_18_debug.gif" JavaScript="window.showModelessDialog('/MapCRM/MapCRMSelect.aspx', '','dialogWidth:1400px;dialogHeight:800px;resizable:yes;status:yes;scroll:no');">
                      <Titles> <Title LCID="1033" Text="Map" />    </Titles>     <ToolTips>  <ToolTip LCID="1033" Text="Map the selected Records" /> </ToolTips>

                    </Button>

    Step 2 : Try getting the selected items using below javascript function and then pass it to URL

    var ids = getSelected('crmGrid');

    <Button Icon="/_imgs/ico_18_debug.gif" JavaScript="window.showModelessDialog('/MapCRM/MapCRMSelect.aspx', ids,'dialogWidth:1400px;dialogHeight:800px;resizable:yes;status:yes;scroll:no');">
                      <Titles>

                        <Title LCID="1033" Text="Map" />

                      </Titles>

                      <ToolTips>

                        <ToolTip LCID="1033" Text="Map the selected records" />

                      </ToolTips>

                    </Button>

    Step 3 : If both above step don't work and then try this one.

    As you said, you can browse the page from outside, so try putting complete URL in ISV.config and check.


    Jai Ho CRM http://mscrmkb.blogspot.com Skype - amol.gholap

    Thursday, October 14, 2010 4:18 AM
  • Step 1:   404 0 0 125, then after iisreset 404 0 0 7808, 404 0 0 22, 404 0 0 17  (why are these different?!)

    Step 2:  Where would I put the var ids = getSelected('crmGrid'); code?

    Step 3:  I've tried just referencing the aspx url directly, still 404 error.

    Please note, I CANNOT browse the page from outside--I get a 404 error if I attempt to access the page directly as well.  Sorry if I misstated this.

    Thanks for the suggestions!  Still stuck...

    gg

     

     

    Thursday, October 14, 2010 2:50 PM
  • One of these two should work:

    /ORGNAME/isv/MapCrm/MapSelect.aspx

    /isv/MapCrm/MapSelect.aspx

    Which one works depends on whether the MapOrg HttpModule is enabled within web.config. If it is enabled (which it will be by default, as it will be inherited from the root web.config), then /ORGNAME/isv/MapCrm/MapSelect.aspx should work. If it's disabled, then /isv/MapCrm/MapSelect.aspx should work.

    ps. The last number in 404 0 0 125 (for example) is normally the size of the request or response, and is not part of the error code, so it's not surprising that it differs


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk
    Thursday, October 14, 2010 3:05 PM
    Moderator
  • Thanks David.  Aha on the size....that makes sense.  So 404 0 0 doesn't really tell us anything specific about the error as far as I can tell.

    Webconfig contains: 

    <

     

    httpModules>

    <

     

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

    <

     

    add name ="CrmAuthentication" type="Microsoft.Crm.Authentication.AuthenticationEngine, Microsoft.Crm, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

    </

     

    httpModules>

    So, I would question the general IIS setup/config, but what's confusing is that the sample .aspx page works.

    File structure currently:

    /CRMWeb/ISV/Chapter13/Dashboard.aspx

    /CRMWeb/ISV/MapCRM/MapCRMSelect.aspx

    /CRMWeb/ISV/MapCRM/MapCRMPost.aspx

    /CRMWeb/bin/Chapter13.dll

    /CRMWeb/bin/MapCRM.dll

    And the Chapter 13 dashboard page loads correctly within CRM, and gives a CRM error message if going to the URL directly.

    The MapCRM page gives a 404 error both via CRM and if going to URL directly.

    Both projects were compiled in VS2008.  We are using IIS 7.  What other info might help to troubleshoot?

    Thursday, October 14, 2010 3:43 PM
  • Can you post the contents of the web.config files in the CRMWeb/ISV/Chapter13 and CRMWeb/ISV/MapCRM directories ? Also, is either directory marked as a Application within IIS ?
    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk
    Thursday, October 14, 2010 8:51 PM
    Moderator
  • I currently do not have web.config files in CRMWeb/IS/Chapter13 or CRMWeb/ISV/MapCRM.  Is this necessary?  (I've tried it both with and without, not sure which configuration is correct.)  Would it help to post the web.config in CRMWeb? 

    I do not think either is an application within IIS - would it show under Application pools?

    Cheers, gg

     

     

    Thursday, October 14, 2010 8:57 PM
  • The reason for asking for the web.config contents was to see if the MapOrg HttpModule is enabled, as this is the main source of potential difference between how files in the Chapter13 and MapCRM folders behave. If you don't have a local web.config in the folder, then the HttpModule will be enabled by default, so the path should be /ORGNAME/isv/MapCrm/MapSelect.aspx

    Maybe a daft question, but is the file MapSelect.aspx or MapCRMSelect.aspx ? It seems to be referred to as MapSelect.aspx in an earlier IIS log snippet, but MapCRMSelect.aspx elsewhere. Have you got the filename correct ?


    Microsoft CRM MVP - http://mscrmuk.blogspot.com  http://www.excitation.co.uk
    Friday, October 15, 2010 1:02 PM
    Moderator
  • Hi David,

    Not a daft question - thanks for checking - I'm worried it's something like that I might be missing.  I went back through the logs to see what happened, and at some point I must have referenced MapSelect.aspx instead of MapCRMSelect.aspx.  So, I apologize for posting that reference.  I verified I am pointing to the correct file in the ISV config:

                  <Buttons>
                    <Button Icon="/_imgs/ico_18_debug.gif" JavaScript="window.showModelessDialog('../ISV/MapCRM/MapCRMSelect.aspx', document.all['crmGrid'].InnerGrid.SelectedRecords);">
                      <Titles>
                        <Title LCID="1033" Text="Map" />
                      </Titles>
                      <ToolTips>
                        <ToolTip LCID="1033" Text="Map the selected records" />
                      </ToolTips>
                    </Button>

    And the log file shows:

     2010-10-15 16:40:49 W3SVC1 192.168.0.12 GET /ORGNAME/MapCRM/MapCRMSelect.aspx - 80 DOMAIN\USERID 192.168.0.213 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+6.1;+WOW64;+Trident/4.0;+GTB6.5;+SLCC2;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+Media+Center+PC+6.0;+InfoPath.2;+OfficeLiveConnector.1.3;+OfficeLivePatch.0.0) 404 0 0 143

    Friday, October 15, 2010 4:43 PM
  • In the most recent post, the ISV folder is being stripped out by the preceding ../

    I think you should use either:

    window.showModelessDialog('/ORGNAME/ISV/MapCRM/MapCRMSelect.aspx'    

    or   

    window.showModelessDialog('/ISV/MapCRM/MapCRMSelect.aspx'   

     


    Microsoft CRM MVP - http://mscrmuk.blogspot.com  http://www.excitation.co.uk
    Monday, October 18, 2010 3:12 PM
    Moderator
  • David - I have tried both variations (/ORGNAME/ISV and /ISV/) and both give a 404 error.  :(

    all - huge thanks for all your assistance.  i'm afraid i'm headed out of town and won't be able to get back to troubleshooting until 15-november.  any suggestions logged in the meantime will be attempted when i get back.

    thanks again!  hope to post the final solution next month!

    gg

    Tuesday, October 19, 2010 7:00 PM
  • Hi,

    It's better to use prependOrgName(). MS CRM Will automatically take care of the Org name.

    See the below Example:
    var url = prependOrgName("/isv/MapCRM/MapCRMSelect.aspx");
     

    Hope it helps.


    Thanks, Ranjitsingh R | http://mscrm-developer.blogspot.com/ | MS CRM Consultant
    • Proposed as answer by Ranjitsingh R Wednesday, October 20, 2010 10:40 AM
    Wednesday, October 20, 2010 10:40 AM
  • Hi Ranjisingh - thanks very much - are you suggesting this go in the XML?  I'm not sure of the syntax for setting up the url variable, is it within the JS?

    This is where I'm calling the url:

    <Button Icon="/_imgs/ico_18_debug.gif" JavaScript="window.showModelessDialog('../MapCRM/MapCRMSelect.aspx', '','dialogWidth:1400px;dialogHeight:800px;resizable:yes;status:yes;scroll:no');">

    Thanks so much!!

    gg

    Wednesday, October 20, 2010 1:44 PM
  • I tried this---

    <Button Icon="/_imgs/ico_18_debug.gif" JavaScript="window.showModelessDialog(prependOrgName('/isv/MapCRM/MapCRMSelect.aspx'), '','dialogWidth:1400px;dialogHeight:800px;resizable:yes;status:yes;scroll:no');">

    404 error.  Prolly need some help with my syntax.....

    Wednesday, October 20, 2010 1:48 PM
  • An OrgName identifies the name of an organization or corporation. Outside of an Affiliation, CorpName is a more appropriate element for the name of a corporation.
    Thursday, October 21, 2010 5:00 PM
  • Hi Geeky Girl,

    I was looking for a similar solutions and stumbled on your thread.
    Could you post the final code with the modifications of Dave?

    Many thanks,
    Vincent

    Wednesday, November 24, 2010 8:53 AM
  • Vincent - sorry for the slow response.  Do you still want the solution so far?  It's not quite working for me, but it's really close, it may work for you. 

    Cheers, gg

    Thursday, December 16, 2010 6:36 PM
  • hi,

    I met the same issue, do you have solution?

    Monday, August 27, 2012 7:32 PM