All Questions
Tagged with ip-address .net
98
questions
0
votes
1
answer
57
views
Default binding address for outgoing connections
On a system with multiple local IP addresses, it is possible to specify the "default" interface binding address for outgoing connections process-wide (C#, dotnet executable)?
Meaning: if the ...
1
vote
1
answer
52
views
Restrict all ip address but allow only for web host ip | .NET
I have my frontend app in one hosting and backend app in other hosting
I want that my app restrict all ip address and allow only ip from frontend app hosting
In my app .net 6 I use white list for IP ...
0
votes
1
answer
53
views
How can i match user ipaddress from my mysql database ip lookup table?
I have network addresses of ipv4 and ipv6 in table and want to calculate its ranges in columns from_ip ,to_ip in ipaddress and in bigint numeric form of both ipv4 and ipv6 networks so that i can ...
1
vote
1
answer
447
views
Get IP Address from SignalR TCP client?
I'm using SignalR to host a TCP server through Kestrel in .NET 6.0 and want to restrict access to the TCP server so that only certain IPs are allowed to connect. I've been doing some research, and ...
0
votes
1
answer
232
views
IPAddress.TryParse Returns the Wrong Address
I have the following code
string addrStr = "010.000.000.010";
bool parsed = IPAddress.TryParse(addrStr,out IPAddress addr);
parse returns true but the returned IPAddress is 8.0.0.8
If I ...
3
votes
1
answer
4k
views
Get IP address from Android and IOS Device using .NET MAUI
I am trying to get IP address from android device using .NET MAUI. (Current android framework net6.0-android)
With the below code, I can get the IP with the first launch of the application. And it ...
0
votes
0
answers
634
views
How can send a UDP broadcast to *any* wildcard IP address on the network?
I'm trying to send a UDP broadcast to any machine within my subnet. It works well when I specify the IP address (e.g. 192.168.0.19), but I need it to be generic (192.168.x.x). How can I do that?
I ...
1
vote
1
answer
206
views
Why does implicitly casting a double to an IPAddress reverse the byte order?
Whilst writing a routine to generate a list of IPs in a given range (CIDR), I stumbled across a trick for reversing the bytes in the IP; casting the IP to a double then back.
i.e. running
$ip = '172.0....
1
vote
2
answers
444
views
IPAddress validation (less than or equal to another IPAddress)
As title suggests, I have 2 IPAddress objects:
var fromIP = IPAddress.Parse("127.0.01");
var toIP = IPAddress.Parse("255.255.255.255");
Question
How can I assert that fromIP is &...
-3
votes
1
answer
505
views
How to get all active IP address available on the network?
In this code find only system IP address and system name and I want to find all IP addresses and names available on network.
String StringHost;
StringHost = System.Net.Dns.GetHostName();
...
0
votes
1
answer
119
views
Get Client's unique IP Address from a domain in .Net
I have deployed a .net application in Azure.I am using the below code to get Client machine IP address.It is working fine for personal systems but if i accessed the application from my office which is ...
4
votes
2
answers
149
views
Why .NET does not parse certain IPv6 with embedded IPv4 values?
In my computer, this code:
var someIps = new[]
{
"::1.2.3.4",
"::0000:1.2.3.4",
"0:0:0:0:0:0:0000:1.2.3.4",
"1::0000:1.2.3.4",
...
0
votes
1
answer
65
views
Why is my client server udp code not sending?
I have been interested in tcp, udp and named pipes lately and am trying to teach myself. I am trying to get a udp connection set up to see how it works. I have a client and server program in windows ...
-2
votes
1
answer
283
views
PowerShell - Instantiate IPAddressCollection
I am trying to create an [System.Net.NetworkInformation.IPAddressCollection] object to store multiple [System.Net.IPAddress] objects.
Ideally I would like to achieve something similar to the ...
-1
votes
1
answer
1k
views
How to read the text from another computer
I have tried to read the file from other computer using the IP address, but i could not able to read that one.It's raised the exception like "Could not find a part of the path 'E:\IPFile_Read\...