Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[ASP.Net/IE Allgemein] Öffnen eines .Zip-Archives aus AD verhindern

Empfohlene Antworten

Veröffentlicht

Moin,

Verzeihung erstmal für den Thread-Titel.

Es war mir nicht möglich, das Problem so kurz auf den Punkt zu bringen ;)

Also Problemstellung:

Eine Asp.net Seite kennt den Ort eines .zip-Archives im Active Directory (als Link).

Man klick in Firefox auf diesen Link und es erscheint der gewünschte "speichern unter"-Dialog.

Klickt man im IE auf diesen Link, wird der Inhalt des .zip Archivs im Windows Explorer geöffnet, was absolut unpassend für meine Zecke ist.

"file://" Davor brachte auch nicht die gewollte Erlösung Smiley_Jesus.gif

Meine Frage jetzt natürlich: Wie verhindere ich diesen bla.gif

Vielen Dank im Voraus,

Marco

Hallo Marco, sie können passen folgende Entscheidung.

In der Linknutton_click schreiben:

string filename = "file.zip";

string filePath = "file path in AD"

Response.ContentType = "application/zip" ;

Response.AddHeader("Content-Disposition", string.Format("attachment;filename={0}", filename));

Response.Clear();

Response.WriteFile(filePath);

Response.End();

Sorry für mein Deutsch.

Hi Gvigan,

ich danke dir 1000mal für deine Lösung :)

Funktioniert prima.

Dafür gibts beide Daumen hoch :)

mfG,

Marco

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.