Copied to clipboard

Flag this post as spam?

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


  • fontanka16 24 posts 73 karma points
    Nov 24, 2012 @ 13:10
    fontanka16
    0

    Error when upgrading from 4.7.2 through 4.10. Invalid URI: The hostname could not be parsed.

    I saw that this was reported as a bug, but i am not sure if it is one. 

    I recently upgraded from 4.7.2 to 4.10. There was a few changes in the configs, but i think i nailed them. I never ran any installation scripts in the versions between 4.7.2 and 4.10. Just altered the configfiles and such.

    When i log into the backoffice everything works fine. But using the site throws the above mentioned error.

    I upgraded to 4.11 to see if this had been fixed (if it is a bug), but i got exactly the same behaviour.

    One strange thing is that when using the alias of my site, like www.mysite.com instead of just mysite.com then the pages are coming out just fine. 

    So the questions are basically:

    • Should i have run all the upgrade scrips in between 4.7.2 and 4.10?
    • Is this a bug?
    • Is there a solution?

     

  • fontanka16 24 posts 73 karma points
    Nov 24, 2012 @ 13:42
    fontanka16
    0

    Update:

    I just made a fresh install of 4.11 and it works like a charm. So it is not likely a hosting problem.

  • Stephen 767 posts 2273 karma points c-trib
    Nov 24, 2012 @ 16:18
    Stephen
    0

    Is the case closed then?

  • fontanka16 24 posts 73 karma points
    Nov 24, 2012 @ 16:31
    fontanka16
    0

    No, i still want to upgrade. I just made a test.to make sure the hosting enviroment was not to blame,.

  • Stephen 767 posts 2273 karma points c-trib
    Nov 24, 2012 @ 16:55
    Stephen
    0

    Got it. A new install works but your upgraded install does not. Can you give me a list of all hostnames that have been configured on nodes? Also can you give me the exact stacktrace of the error? Thanks.

  • fontanka16 24 posts 73 karma points
    Nov 24, 2012 @ 21:22
    fontanka16
    0

    Stack trace

    Server Error in '/' Application.


    Invalid URI: The hostname could not be parsed.

    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.UriFormatException: Invalid URI: The hostname could not be parsed.

    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: 

    [UriFormatException: Invalid URI: The hostname could not be parsed.]
       System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) +6235740
       System.Uri..ctor(String uriString) +20
       Umbraco.Web.Routing.DomainHelper.<DomainMatch>b__3(<>f__AnonymousType11`2 t) +49
       System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +151
       System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source, Func`2 predicate) +166
       Umbraco.Web.Routing.DomainHelper.DomainMatch(IEnumerable`1 domains, Uri current, Boolean defaultToFirst) +418
       Umbraco.Web.Routing.PublishedContentRequestBuilder.LookupDomain() +238
       Umbraco.Web.Routing.PublishedContentRequest.ProcessRequest(HttpContextBase httpContext, UmbracoContext umbracoContext, Action`1 onSuccess) +52
       Umbraco.Web.UmbracoModule.ProcessRequest(HttpContextBase httpContext) +289
       Umbraco.Web.UmbracoModule.<Init>b__7(Object sender, EventArgs e) +84
       System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
    



    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.237

  • fontanka16 24 posts 73 karma points
    Nov 24, 2012 @ 22:00
    fontanka16
    1

    I solved it by removing the hostname in backoffice. I do not understand why it works but it does.

  • Stephen 767 posts 2273 karma points c-trib
    Nov 25, 2012 @ 10:43
    Stephen
    0

    Glad it works. But... for the sake of checking bugs... what was that hostname (or at least what was it looking for, if you don't want to tell the real hostname? just respect the dots, slashes, etc)?

    Thanks for your help!

  • fontanka16 24 posts 73 karma points
    Nov 25, 2012 @ 14:09
    fontanka16
    0

    No problem. Below is a screenshot showing how hostnames was set up in Umbraco when recieving the error.  Too bad i do not understand how my hosting environment is set up behind the scenes. All i see is a bunch of forms. So i am sorry for not being able to use the correct IIS terms here. Anyway, the main name for the site is http://bibliotekarien.se and http://www.bibliotekarien.se was set up as an alias for the above.I cannot remember why i put the hostname there in the first place, but the point here is that it worked fine before.

    My method for upgrading was reading through the different docs pointing to the different changes made in the config files and then applying these changes manually. I should have gone for the WinMerge method immediately. Much faster and more precise. I recieved a lot of errors because of my previous method. So, probably stating the obvious, i must recommend the WinMerge method over the manual one.

    I emailed this guy who i saw had recieved the same error. He had solved the problem by "installing new version 4.11 and removing "amd64" and "x86" folders from the "bin" directory". He is obviulsly not using SQLCE.

     

  • fontanka16 24 posts 73 karma points
    Nov 25, 2012 @ 23:51
    fontanka16
    0

    I also had an alias on a parallell content tree. That one was set to "/english". Now when i removed the "/" everything started working just fine. I could add the www.bibliotekarien.se host name back again with no hassle what so ever.

    Check out the comment on this one. This guy Yakov seem to have made the same configuration (error) as me.

    http://issues.umbraco.org/issue/U4-1185

  • Stephen 767 posts 2273 karma points c-trib
    Nov 27, 2012 @ 10:06
    Stephen
    0

    The issue was caused by the "/english" hostname. Hostnames are supposed to be valid URIs eg

    Although the latter is going to be supported-but-discouraged in 6.x ... but hostnames such as "/english" or "/" are not valid URIs. In the past (pre-4.10) they sort-of were accepted, and then caused all sorts of unpredictable behaviors. Starting with 4.10 we don't want them anymore.

    Now I can understand that the transition can be painful, so feel free to forward me any question and I'll see how I can help.

  • Jorge 7 posts 27 karma points
    Mar 18, 2013 @ 13:53
    Jorge
    0

    The discussion seems to be quite outdated but one further question. I am experiencing the same problem and I can see that the problem is due to the hostname I added as /en or /de which was supported on my previous umbraco version. Is there a solution/work around in order to use such hostnames? I am running the site on localhost as well as on domain and it is quite annoying to have different hostnames for each rather than just adding the hostname as /en so it would work smoothly for both..

    localhost/en

    domainname.com/en

    I hope it was clear enough :)

     

    Thanks in advance,

  • Stephen 767 posts 2273 karma points c-trib
    Mar 18, 2013 @ 14:03
    Stephen
    0

    @Jorge: which version are you using?

    Hostnames such as "/en" should be illegal... however I think that we added support for them in 4.11 for the sake of backward compatibility.

    Stephan

Please Sign in or register to post replies

Write your reply to:

Draft