简体   繁体   中英

Httphandler registration not working

I have a handler called MsiDownloadHandler which lets the client download an MSI file if it exists, and otherwise creates an MSI file and lets the client download it.

Though I have registered my handler in web.config like this:

  <handlers>
    <add name="MsiDownloadHandler" verb="*" path="*.msi" type="MsiDownloadHandler, ManagementConsoleV2, Version=1.0.0.0, Culture=neutral" resourceType="File" />
  </handlers>
<validation validateIntegratedModeConfiguration="false" />

The handler break point is not hit and I always get the error:

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

What am I doing wrong??

You used:

resourceType="File" />

But as you said, your handler is meant to work even if there is no file on the server whose location is mapped to the path of the URI. For such a handler, you want resourceType="Unspecified" .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM