HttpListenerContext.Request.IsLocal uses '==' instead of '.Equals' to see if local address is the same as the remote address - by Damian Mehers

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


2
0
Sign in
to vote
ID 331513 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 3/5/2008 12:52:05 AM
Access Restriction Public

Description

HttpListenerContext.Request.IsLocal is returning false even though the caller is on the same machine as the server.  I think that this may be because 'IsLocal' is implemented by the framework as:
public bool get_IsLocal()
{
    return (this.LocalEndPoint.Address == this.RemoteEndPoint.Address);
}

I think it should perhaps be:
public bool get_IsLocal()
{
    return (this.LocalEndPoint.Address.Equals(this.RemoteEndPoint.Address));
}


Not sure that it is relevant, but here is my IPCONFIG:
Windows IP Configuration


Ethernet adapter Local Area Connection:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::ad88:486e:2b75:be03%8
   IPv4 Address. . . . . . . . . . . : 192.168.1.5
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.1.1

Tunnel adapter Local Area Connection* 6:

   Connection-specific DNS Suffix  . :
   IPv6 Address. . . . . . . . . . . : 2001:0:4137:9e66:1824:3763:3f57:fefa
   Link-local IPv6 Address . . . . . : fe80::1824:3763:3f57:fefa%9
   Default Gateway . . . . . . . . . : ::

Tunnel adapter Local Area Connection* 7:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::5efe:192.168.1.5%11
   Default Gateway . . . . . . . . . :
Sign in to post a comment.
Posted by Niranjan [MSFT] on 2/9/2009 at 3:12 PM
Hello,

Thanks for reporting the bug. This bug has been fixed and the fix will be available as part of .NET Framework 4.0.


Thanks You,
NCL Team
Posted by Microsoft on 3/9/2008 at 12:48 AM
Thanks for your feedback.

We are escalating this issue to the appropriate group within the Visual Studio Product Team for triage and resolution.
These specialized experts will follow-up with your issue.

Thank you,
Visual Studio Product Team
Posted by Microsoft on 3/6/2008 at 1:47 AM
Thank you for your feedback. We are currently investigating. The investigation process normally takes 7-14 days. If this issue is urgent, please contact support directly (see http://support.microsoft.com).

If at any time your issue is closed unsatisfactorily, you may edit your issue via Connect and change the status to “Active.”

Thank you,
Visual Studio Product Team