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 IP auslesen

Empfohlene Antworten

Veröffentlicht

Hi,

Ich ich brauche für einen GridView eine eine Spalte in der die IP des aktuellen Benutzers bei Editierung eingetragen wird.

das heist ich bin auf ner suche nach ner Funktion die mir einfach die IP ausgibt..

hab bis jetzt aber nichts funktionierendes gefunden.

weis jemand obs da ne Funktion gibt?

Danke schonmal

Murphy

string HostName = System.Net.Dns.GetHostName();

System.Net.IPHostEntry hostInfo =System.Net.Dns.GetHostByName(HostName);

string IpAdresse = hostInfo.AddressList[0].ToString();

is zwar # aber sollte ned viel anders in ASP sein...

  • Autor

Request.ServerVariables("REMOTE_ADDR") <-- das geht nich (sagt er: exsistiert nicht im Kontext oder so)

HttpContext.Current.Request.UserHostAddress <-- das geht - hab ich grad gefunden

aber danke euch trotzdem :)

LG Murphy

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.