locked
Handler is working fine in iisExpress and NOT in iis RRS feed

  • Question

  • User430178104 posted

    Hi,

    I am trying to call the Handler in my htm file with jquery support. it is working fine in IISExpress and NOT in iiS. getting 503 error

    My Handler

    http://*****.net/str/Handler.ashx?RequestType=CallForAppOffline&fromFile=app_offline.htm

    Friday, December 28, 2018 11:54 AM

Answers

  • User753101303 posted

    And this ASHX handler is part of the same app or if using the same application pool ? I'll have to try but I would expect all ASP.NET requests including ASHX files to stop working (unless it is hosted in another app).

    Edit: I tried and I see the behavior I expected ie even in IIS Express I can't reach any more an ASHX handler found in the same app than the App_Offline.htm file.

    My understanding is that you are trying to remove this file from within the app itself. My first though would be to have another site on the same server that would be responsible for doing that (though IMO it should be done once the maintenance operation is really over rather than on a timer, what if the maintenance operation is not yet finished for some reason ?)

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, December 28, 2018 1:15 PM

All replies

  • User753101303 posted

    Hi,

    Check the IIS log. You have a substatus code ? It could help to narrow down a bit what happens : https://support.microsoft.com/en-us/help/943891/the-http-status-code-in-iis-7-0-iis-7-5-and-iis-8-0

    You have other things in the same app that are working fine ? It seems to be somewhat related to App_Offline.htm. If trying to call your handler from an App_Offline.htm file in the same app I would expect this to fail.

    Friday, December 28, 2018 12:35 PM
  • User430178104 posted

    Thanks for your response @PatriceSc,

    I am calling the handler from App_Offline.htm, because when time reaches i need to down the App_Offline.htm page and trigger few emails. these logic is available in handler.

    Friday, December 28, 2018 12:46 PM
  • User753101303 posted

    And this ASHX handler is part of the same app or if using the same application pool ? I'll have to try but I would expect all ASP.NET requests including ASHX files to stop working (unless it is hosted in another app).

    Edit: I tried and I see the behavior I expected ie even in IIS Express I can't reach any more an ASHX handler found in the same app than the App_Offline.htm file.

    My understanding is that you are trying to remove this file from within the app itself. My first though would be to have another site on the same server that would be responsible for doing that (though IMO it should be done once the maintenance operation is really over rather than on a timer, what if the maintenance operation is not yet finished for some reason ?)

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, December 28, 2018 1:15 PM
  • User430178104 posted

    Thanks for your response PatriceSc.

    By Understand the limitations. now we planned to stop deleting the file.

    Wednesday, January 2, 2019 11:23 AM