1

If I use an URL like http://mysite/myfolder/myfile.dll, I get a dialog "Do you want to open or save this file". Of course, I don't want people to be able to download and disassembly our dll's. How can I deny people accessing such files directly ?

4

5 に答える 5

4

通常、これはデフォルトで許可されていません。IIS マネージャーに移動して Web サイトを編集する場合は、「スクリプト ソース アクセス」のチェックを外す必要があります。DLL も、禁止されているファイル拡張子のリストに含まれている必要があります。

于 2009-01-06T13:08:25.963 に答える
1

The short answer is that there should be no files which you don't want to serve underneath the web root.

I don't personally know IIS 6 or 7, but under Apache, a directory is designated as the web root, e.g. \site\htdocs, and nothing above it is accessible to the outside. If you keep your DLL files out of that hierarchy, then they are inaccessible.

于 2009-01-06T13:04:26.317 に答える
0

何らかの理由で IIS のスクリプト マッピングを変更できない場合は、HttpForbiddenHandlerを使用できます。

于 2011-08-27T14:44:36.317 に答える
0

適切な Windows ファイル セキュリティとアクセス権を設定します。

たとえば、asp.net を使用している場合、ASPNET アカウント以外のすべてのユーザーに対して .dll へのアクセスを拒否する必要があります。

!IUSR_xxx アカウントには、.dll に対する権限がありません!

于 2009-01-06T13:33:00.487 に答える
0

すべての dll を拒否することは、asp.net サイトでは抜本的です。Silverlight などは、クライアント ブラウザーでダウンロードできるようにする必要があるクライアント dll を使用するためです。

IIS 管理コンソールまたは管理 API を使用して、dll のファイルまたはディレクトリでの認証を無効にすることができます。

すべての認証オプションのチェックを外すだけで、アクセスが拒否されます。

于 2009-01-06T14:30:52.927 に答える