C# を使用して Web サイトを作成し、別のネットワーク コンピューターに共有フォルダーを持っているので、(ドメインまたは静的 IP - ユーザー名 - パスワード) を使用して、Web ページから共有フォルダー内のすべてのファイルとフォルダーを探索する必要があります。ユーザーが共有フォルダーのファイルにアクセスし、ダウンロードのみできるようにする必要があります。
このコードはファイルをコピーするのに機能しますが、ネットワークからは機能し、インターネット経由では機能しません:
NetworkCredential theNetworkCredential = new NetworkCredential(@"Domain\Username", "Password");
CredentialCache theNetCache = new CredentialCache();
theNetCache.Add(new Uri(@"\\Domain"), "SHARED", theNetworkCredential);
string[] theFolders = Directory.GetDirectories(@"\\Servername\SHARED\");
string sourceDirectory = theFolders[1];
string targetDirectory = @"E:\Shared";
DirectoryInfo diSource = new DirectoryInfo(sourceDirectory);
DirectoryInfo diTarget = new DirectoryInfo(targetDirectory);
CopyAll(diSource, diTarget);