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?
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.
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.
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)?
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.
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.
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.
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..
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:
Update:
I just made a fresh install of 4.11 and it works like a charm. So it is not likely a hosting problem.
Is the case closed then?
No, i still want to upgrade. I just made a test.to make sure the hosting enviroment was not to blame,.
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.
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:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.237
I solved it by removing the hostname in backoffice. I do not understand why it works but it does.
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!
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.
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
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.
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,
@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
is working on a reply...