locked
HTTPHandlers doesn't work on the Production server RRS feed

  • Question

  • User-1256377279 posted

    Hi Guys ,

    I have created an httphandlers of the js file to spilt one js file into 3 and code save in app_code, It works fine locally but when i publish my files on the productions server the file doesn't exist

    404 - File or directory not found.

    The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

    Below is web.config and IIS 7 is in integrated mode

    <system.webServer>
    		<modules runAllManagedModulesForAllRequests="true"/>
            <handlers>
                <add name="ContinentsJsHandler" verb="*" path="*/scripts/continents-map.js" type="ContinentsJsHandler" resourceType="Unspecified" />
                <add name="RegionsJsHandler" verb="*" path="*/scripts/regions-map.js" type="RegionsJsHandler" resourceType="Unspecified" />
                <add name="NationsJsHandler" verb="*" path="*/scripts/nations-map.js" type="NationsJsHandler" resourceType="Unspecified" />
            </handlers>
    	</system.webServer>

    Thanks in advance

    Shabbir



    Monday, September 17, 2012 5:59 AM

Answers

  • User-1256377279 posted

    Hi Guys,

    I manage to make it work by removing * in the Integrated App pool mode but unfortunately my website is on Classic app pool could anyone provide me the code for the HttpHandlers classic app pool mode, Below is code which works in integrated mode

    <system.webServer>
    		<modules runAllManagedModulesForAllRequests="true"/>
            <handlers>
                <add name="ContinentsJsHandler" verb="*" path="/scripts/continents-map.js" type="ContinentsJsHandler" resourceType="Unspecified" />
                <add name="RegionsJsHandler" verb="*" path="/scripts/regions-map.js" type="RegionsJsHandler" resourceType="Unspecified" />
                <add name="NationsJsHandler" verb="*" path="/scripts/nations-map.js" type="NationsJsHandler" resourceType="Unspecified" />
            </handlers>
    	</system.webServer>



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 18, 2012 6:07 AM

All replies

  • User-417784260 posted

    path="*/scripts/continents-map.js"

     

    Try using ~ instead  of * in the path

    Monday, September 17, 2012 6:02 AM
  • User-1256377279 posted

    Dear Ken,

    I tried using ~ instead of * but still unable to find the file :(

    Kind Regards,

    Shabbir

    Monday, September 17, 2012 6:10 AM
  • User-1256377279 posted

    Hi Guys,

    I manage to make it work by removing * in the Integrated App pool mode but unfortunately my website is on Classic app pool could anyone provide me the code for the HttpHandlers classic app pool mode, Below is code which works in integrated mode

    <system.webServer>
    		<modules runAllManagedModulesForAllRequests="true"/>
            <handlers>
                <add name="ContinentsJsHandler" verb="*" path="/scripts/continents-map.js" type="ContinentsJsHandler" resourceType="Unspecified" />
                <add name="RegionsJsHandler" verb="*" path="/scripts/regions-map.js" type="RegionsJsHandler" resourceType="Unspecified" />
                <add name="NationsJsHandler" verb="*" path="/scripts/nations-map.js" type="NationsJsHandler" resourceType="Unspecified" />
            </handlers>
    	</system.webServer>



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 18, 2012 6:07 AM