Hi, I have a scenario wherein I need to give access of a system to the hosts of a subnet. For that I need to verify if the incoming request is from the IP which falls within the subnet. Is there some way to do that automatically using c# functionality.

subnet info is not embedded to ip address, it is not in that context.
subnet mask can be anything for a given ip address. subnet masks are used to group ip addresses. what you can know about ip address could only be its type like a,b or c.

It is like with given subnet 255.255.255.224, its not possible to have a host with IP 192.168.10.32.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.