0

I am receiving this error:

System.Web.HttpException: Path 'OPTIONS' is forbidden

because of people trying to open URLs on a website from within office products. This is well documented here.

In order to implement:

<httpHandlers>
  <add verb="*" path="*.xls" type="System.Web.StaticFileHandler" />
  <add verb="*" path="*.xlsx" type="System.Web.StaticFileHandler" />
</httpHandlers>

I need to know all the possible file extensions. There are a lot of office file extensions and I have missed one out as I still get the error from a user agent of: Microsoft-WebDAV-MiniRedir/6.1.7601

Is there a way to wildcard this for a certain user agent, or is there a definitive list of file extensions somewhere?

Community
  • 1
  • 1
simon831
  • 5,166
  • 7
  • 33
  • 50

1 Answers1

2

Why do you need to know the file extensions? Try a handler as such:

<add path="*" verb="OPTIONS, PROPFIND" type="System.Web.StaticFileHandler" />

As you discover additional verbs, you can add them to the verb property above.

Haney
  • 32,775
  • 8
  • 59
  • 68