cancel
Showing results for 
Search instead for 
Did you mean: 
dpbpc62
Level 7

MediaType

Good Day

I'm looking for a way to block not only applications, but the file types. i.e. windows help files .hlp and chm.

They don't show up in the list.

Thanks

Dana

0 Kudos
6 Replies
alexott
Level 11

Re: MediaType

.hlp -> application/ms-help

.chm -> application/ms-html-help

0 Kudos
dpbpc62
Level 7

Re: MediaType

Thanks, now I get it look for the specific application, not very intuitive though...

Dana

0 Kudos
alexott
Level 11

Re: MediaType

what do you mean by application? What I listed - this is "official" names for these file types. If you want to block based on file extension (not recommended though), you can use MediaType.FromExtension property

0 Kudos
dpbpc62
Level 7

Re: MediaType

I mean when searching for the extensions, I looked for the extension not the specific application or software i.e ms-help, my bad... and why isn't it recommended?

0 Kudos
alexott
Level 11

Re: MediaType

It's recommended because user can rename files, files could be delivered via 'CGI' scripts, etc. The MediaType.EnsuredTypes works very fast & precise.

0 Kudos
dpbpc62
Level 7

Re: MediaType

Ok, I understand thanks.

0 Kudos