Hunter User can't Update or Delete Existing Queries (Hunter v2)

So your Hunter users cannot update or delete any existing queries?

This issue is specific to Hunter v2 when deployed on recent Windows Server installations (anything after July 1, 2022 seems to be the culprit). It appears that Microsoft specifically changed the base security of HTTP API methods (specifically, PUT and DELETE) that introduced this issue into standard deployments of Hunter v2.

How can you confirm this error?

  1. Have the User bring up a browser and press F12 to bring up the Developer Console (click the Console tab)
  2. Have the User bring up Hunter in the browser
  3. Open a Saved Query
  4. Click SAVE on the toolbar
  5. Click the "Update Existing Query" button
  6. Check the Developer Console
  7. If the issue exists your will see an HTTP "405 Method Not Allowed" error

NOTE: This error will also occur if a user attempts to DELETE an existing query from the Open Query dialog.

This error occurs because updating or deleting an existing query in Hunter uses the PUT method on the API controller. Microsoft has now made this method (along with DELETE and some others) inaccessible by default as part of Microsoft's continued push to make web applications more secure.

How do we fix it?

  1. Open up the Hunter folder
  2. Open up the web.config file using Notepad
  3. Confirm that the section of web.config looks similar to this

<handlers>
<remove name="WebDAV" />
<remove name="ChartImage_axd" />
<remove name="Telerik_Web_UI_SpellCheckHandler_axd" />
<remove name="Telerik_Web_UI_DialogHandler_aspx" />
<remove name="Telerik_RadUploadProgressHandler_ashx" />
<remove name="Telerik_Web_UI_WebResource_axd" />
<add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode" />
<add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode" />
<add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode" />
<add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode" />
<add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode" />
<remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" />
<remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" />
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
<add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
<add name="ExtensionlessUrl-Integrated-4.0"
path="*."
verb="GET,HEAD,POST,DEBUG,DELETE,PUT"
type="System.Web.Handlers.TransferRequestHandler"
preCondition="integratedMode,runtimeVersionv4.0" />

</handlers>

 

The key pieces in the "handlers" section is removing WebDAV and making sure the PUT verb is listed in the ExtensionlessUrl-Integrated-4.0 handler.

Finally, in IIS, recycle the Application Pool that Hunter uses to reload web.config.

We hope that helps shed some light on resolving this Hunter issue. If that does not resolve your issue for your Hunter users then please contact us directly.