#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2011
    Posts
    6
    Rep Power
    0

    {SOLVED} Handler Mappings via command line IIS 6.0


    Greetings All,
    Our application uses Reports Viewer to run reports within the application. Our application is installed by 3rd party activities that requires the Software Users Manual to be as simplified as possible.
    Under Windows 7 (This was not required in Win XP IIS 5) the management of Handler Mappings for Microsoft Reports Viewer has to be done manually via the ISS Management tool.
    What I need to know is, how to do what is outlined below via the command line. I want to create a batch file, convert to .exe that the user can click on to automate this process.

    Open Internet Information Services (IIS) Manager and select your Web application.
    Under IIS area, double-click on Handler Mappings icon.
    At the Action pane on your right, click on Add Managed Handler.
    At the Add Managed Handler dialog, enter the following:
    Request path: Reserved.ReportViewerWebControl.axd
    Type: Microsoft.Reporting.WebForms.HttpHandler
    Name: Reserved-ReportViewerWebControl-axd
    Click OK.
    Reserved-ReportViewerWebControl-axd handler is now added to your Handler Mappings list. Notice that the following line has also been added to your Web.config file under the system.webserver's handler section:

    <add name="Reserved-ReportViewerWebControl-axd" path="Reserved.ReportViewerWebControl.axd"
    verb="*" type="Microsoft.Reporting.WebForms.HttpHandler" resourceType="Unspecified"

    In researching good ol' Google, I have read about doing this via the command line using appcmd but this is only included in IIS 7 +

    I will let you know, I am NOT a developer. So if the question seems like something easy, I wanted to put this out there.

    Thank you ahead of time for any guidance and help you can provide.

    All the best,

    Ian
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2011
    Posts
    6
    Rep Power
    0
    My own lack of knowledge played the biggest part of this. This IS in fact IIS 7.0. So with that being said, the fix is this:
    Code:
    %windir%\system32\inetsrv\appcmd set config "Default Web Site/YourwebsiteHere" /section:handlers /+[name='Reserved-ReportViewerWebControl-axd',path='Reserved.ReportViewerWebControl.axd',type='Microsoft.Reporting.WebForms.HttpHandler',verb='*']
    This provides the appropriate handler mappings via the command line. Where you see "YourswebsiteHere" you would put your Website/Application name here.

    Thanks,

    ian
  4. #3
  5. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,449
    Rep Power
    4539
    Thank you for posting your solution!
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester

IMN logo majestic logo threadwatch logo seochat tools logo