Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Connie DeCinko 931 posts 1160 karma points
    Dec 02, 2010 @ 20:36
    Connie DeCinko
    0

    Site Fails After Install

    After installing this package, my I can no longer get to the Umbraco admin.  I get this error:

    The requested name is valid, but no data of the requested type was found

     

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Net.Sockets.SocketException: The requested name is valid, but no data of the requested type was found

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace:

    [SocketException (0x2afc): The requested name is valid, but no data of the requested type was found]
       System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6) +7894363
       System.Net.Dns.GetHostEntry(String hostNameOrAddress) +474
       Cultiv.EnvironmentIndicator.IndicatorAdapter.OnLoad(EventArgs e) +331
       System.Web.UI.Control.LoadRecursive() +11250815
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3048
    

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Dec 05, 2010 @ 21:01
    Sebastiaan Janssen
    0

    Interesting, this seems to be a problem with the hostname of your current site. Can you tell me what the hostname is?

  • Connie DeCinko 931 posts 1160 karma points
    Dec 06, 2010 @ 18:31
    Connie DeCinko
    0

    I don't have a hostname set in Umbraco. Should I?

     

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Dec 06, 2010 @ 18:46
    Sebastiaan Janssen
    0

    I don't believe you'd need it, but can you tell me what the address in your browser's addres bar is?

  • Connie DeCinko 931 posts 1160 karma points
    Dec 06, 2010 @ 18:49
    Connie DeCinko
    0

    http://www.azbar.org  (for production)  however I was first trying to test on dev and staging:

    http://www.azbar.dev  and  http://www.azbar.stg

     

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Dec 06, 2010 @ 18:58
    Sebastiaan Janssen
    0

    I see, that's quite odd. Apparently it can't succesfully deduce the hostname, you could indeed try to add a hostname to your site in umbraco. Either way, I need to fix this and put this code in a try catch block at least. Will keep you posted about the progress!

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Dec 06, 2010 @ 21:27
    Sebastiaan Janssen
    0

    Hey Connie, I have a new version for you to test, could you try this one out? 

    It should say in your logfile what was wrong, in tblLog search for a log entry starting with "Couldn't get the IP address of the current HTTP_HOST". Would be interested to see what error you get.

    Download it here. Just unzip the dll into your bin folder.

  • Connie DeCinko 931 posts 1160 karma points
    Dec 08, 2010 @ 22:32
    Connie DeCinko
    0

    Sebastiaan,

    I reinstalled the package and applied the updated DLL.  No error, but also no appearance of the line.  I have <add key="environment" value="dev" /> in my web.config.

     

  • Connie DeCinko 931 posts 1160 karma points
    Jan 10, 2011 @ 21:09
    Connie DeCinko
    0

    Any thoughts on why this still does not work?  I get the following in my error log:

      Couldn't get the IP address of the current HTTP_HOST (www.azbar.dev), 
    exception: The requested name is valid, but no data of the requested type was found

     

     

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Jan 11, 2011 @ 08:23
    Sebastiaan Janssen
    0

    I think you may be in a network that doesn't support getting the IP address of your host through the method I'm using. When I get a chance, I'll do the IP detection in a try-catch block so that this error is not thrown.

  • Patrick McAndrew 48 posts 163 karma points
    May 06, 2011 @ 12:41
    Patrick McAndrew
    0

    Hi Sebastiaan,

    Love the package :)

    I got the same error (the site was only accessible via ip address) and I wouldn't be suprised if dns queries were restricted on the network.  The patch you provided in this post solves the problem.  Think you can package it up into a new release just to keep current?

     

    Cheers,

    Patrick

  • Umbraco 137 posts 294 karma points
    Aug 07, 2012 @ 10:21
    Umbraco
    0

    Unfortunately, I get the same exception in our environment, and the patch provided is now a 404... If there is a working patch, it would be best to push a new version of the package to the 'app store' 

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Aug 07, 2012 @ 15:37
    Sebastiaan Janssen
    0

    Hey Michiel, I've "misplaced" the original source code unfortunately, but the idea was that it would be integrated into the PageNotifications package but that one seems not to be maintained any more either.

    Here's the 404 dll again: https://dl.dropbox.com/u/3006713/Cultiv.EnvironmentIndicator.dll.zip 

    And through some decompilation I think I have the code back now, which could be used to update Indicator.cs in aforementioned package (i think you can just change the line that starts with var serverIsLocalIp with this):

                    var serverIsLocalIp = false;
                    try
                    {
                        serverIsLocalIp = Dns.GetHostEntry(HttpContext.Current.Request.ServerVariables["HTTP_HOST"].Substring(0, HttpContext.Current.Request.ServerVariables["HTTP_HOST"].IndexOf(':'))).AddressList.Any(ip => ip.ToString() == "127.0.0.1");
                    }
                    catch (Exception ex)
                    {
                        Log.Add((LogTypes.Error, new User(0), -1, string.Format("Couldn't get the IP address of the current HTTP_HOST ({0}), exception: {1}", HttpContext.Current.Request.ServerVariables["HTTP_HOST"], ex.Message));
                    }
Please Sign in or register to post replies

Write your reply to:

Draft