question

DarsiSanjayKumar-3422 avatar image
0 Votes"
DarsiSanjayKumar-3422 asked Nandhagopal edited

c#: IPAddress.IsLoopback() treating 255.255.255.255 as Loopback IP

Hi Team,
Need some help. i am new to network coding. I am using the below code:

if (IPAddress.IsLoopback(statusMessage.IPAddress))
{
TraceLogger.Debug("DBG:: Loopback IP so returning...");
return;
}

The Code build using visual studio 2017, treating the IP Address 255.255.255.255 as not a Loopback address.
The Code build using visual studio 2012, treating the IP Address 255.255.255.255 as Loopback address.

Any suggestions to resolve this.

As per the article(https://docs.microsoft.com/en-us/dotnet/api/system.net.ipaddress.isloopback?view=netcore-3.1), loopback ip address range is 127.0.0.0 – 127.255.255.255.

Then why 255.255.255.255 is treating as Loopback address.

Regards,
Sanjay.

not-supportedc++windows-10-network
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Maybe because it was a bug that was fixed?

0 Votes 0 ·

1 Answer

TianyuSun-MSFT avatar image
0 Votes"
TianyuSun-MSFT answered TianyuSun-MSFT edited

Hello Darsi,

Visual C# is not currently supported in the Microsoft Q&A forums, the supported products are listed over there: https://docs.microsoft.com/en-us/answers/products/ (more to be added later on).

For the related questions about Visual C# you can post in dedicated forums here: MSDN (Visual C#).

Best Regards,
Tianyu


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.