none
how to resolve a DNS host name from IP address in Portable Class Library ? RRS feed

  • Question

  • how to resolves a DNS host name from IP address in Portable Class Library ? 
    I've tried System.Net.Dns but it seems not supported in PCL.
    can you provide pointers or help ?
    thanks in advance.  
    Sunday, June 23, 2013 5:50 PM

Answers

  • Hi Abdel,

    Thank you for the post to the forums.   To answer the question, you are correct in your observation.  I have verified here today too with the latest tools that System.Net.Dns is not available via the PCL.

    The Visual Studio PCL team does work to bring the options out when possible but this one has not been implemented as of yet to be part of the PCL.  Here is the PCL discussion group for questions and feedback around PCL that goes directly to the team working on the PCL project:

        http://visualstudiogallery.msdn.microsoft.com/b0e0b5e9-e138-410b-ad10-00cb3caf4981?SRC=Featured

    One solution is to possibly make a call out to a web service or call out to a web page that does the needed work to convert the IP address to a hostname.   Since we are talking about DNS, a network connection is needed anyway, so, thinking is making a call to a web service that is hosted to provide the needed information back may be a solution.

    Best regards,

    Nathan

    Thursday, June 27, 2013 9:13 PM

All replies

  • i'm trying to resolve a dns host name to ip address, in a portable class library project.
    I've been searching for a while with no results. can you provide some pointers ?

    thanks in advance.
    Monday, June 24, 2013 11:11 AM
  • Hi There,

    Welcome to the MSDN Forum.

    I am trying to involve some other one into this case, it will take some time, thank you for your patience.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, June 24, 2013 2:01 PM
    Moderator
  • Hi Abdel,

    Thank you for the post to the forums.   To answer the question, you are correct in your observation.  I have verified here today too with the latest tools that System.Net.Dns is not available via the PCL.

    The Visual Studio PCL team does work to bring the options out when possible but this one has not been implemented as of yet to be part of the PCL.  Here is the PCL discussion group for questions and feedback around PCL that goes directly to the team working on the PCL project:

        http://visualstudiogallery.msdn.microsoft.com/b0e0b5e9-e138-410b-ad10-00cb3caf4981?SRC=Featured

    One solution is to possibly make a call out to a web service or call out to a web page that does the needed work to convert the IP address to a hostname.   Since we are talking about DNS, a network connection is needed anyway, so, thinking is making a call to a web service that is hosted to provide the needed information back may be a solution.

    Best regards,

    Nathan

    Thursday, June 27, 2013 9:13 PM