Copied to clipboard

Flag this post as spam?

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


  • Morten 105 posts 344 karma points
    Mar 21, 2017 @ 08:59
    Morten
    0

    Multiple hostnames/domains when developing on more than 1 PC

    We are two people currently working on an Umbraco 7 site. We have two cultures for our two translated sites. Here's a problem:

    When we publish to our site, we need to go and change the hostname like this:

    http://localhost:12345/en -> http://some-website-for-project.com/en

    When we want to develop on the website, we need to go and change it the other way around. This basically means we can't develop on the site while it's live, otherwise our navigation and cultures won't work. Now, here's the other issue:

    If we both want to develop on the website, but we use different ports on our machines, we cannot use any culture page, as it would redirect to the wrong port (basically the first hostname in the list).

    How do we make it possible to work on this locally, while being able to work on it at the same time as the site is live, while also having the content of the live server on our local machines? I don't think that's possible, but please let me know if it is.

    Thanks

  • Craig Mayers 164 posts 507 karma points
    Mar 21, 2017 @ 09:23
    Craig Mayers
    100

    Hi Morten,

    The issue you are having is due to the dynamic ports that are being generated by Visual Studio.

    I would suggest you both hosting your website(s) in your Local IIS and adding a custom domain to your 'hosts' file for each site (see links below):

    This will allow you both to have custom domains (i.e. uk.yoursitename.local OR fr.yoursitename.local etc.) and your navigation and cultures should still work fine.

    PS. You will have to add your test url to the "Culture & Hostnames" in the Live CMS also.

    Regards

    Craig

  • Morten 105 posts 344 karma points
    Mar 21, 2017 @ 09:28
    Morten
    0

    Hi Craig and thanks for replying

    1) Does this problem occur because of the port issue? So if our hostname is different (not localhost but maybe morten.local and otherperson.local), this would work?

    2) Should we add the live URL and both our hostnames to the culture and hostnames domain list? So 6 in total (2 cultures and 3 computers).

    3) Can we still work on the same data? Meaning if I edit something, he should be able to see it immediately as well?

    Thanks!

  • Craig Mayers 164 posts 507 karma points
    Mar 21, 2017 @ 10:05
    Craig Mayers
    0

    Correct! The port will change hence why you have to keep going into the CMS and changing it.

    Yes that would work. Just ensure you add both hostnames to each site in the CMS (i.e. UK, France, Germany etc.):

    Example hostnames:

    • morten.local/en
    • morten.local/fr
    • morten.local/de
    • otherperson.local/en
    • otherperson.local/fr
    • otherperson.local/de

    And yes keep the Live hostname and just add your development ones as you go.

    There should be no issues working on the same data as long as you both are using the same connection strings.

    In regards to viewing your changes immediately... from time to time you/other person may need to do a republish on the sites cache.

    Hope this helps.

    Craig

  • Morten 105 posts 344 karma points
    Mar 21, 2017 @ 10:17
    Morten
    0

    Cool! Thanks a lot!

    I've tried setting it up now, but I'm getting all kinds of errors. I selected Local IIS as server, so now my project URL is:

    http://localhost/ProjectName

    When I save and go to that URL, I get this error:

    HTTP Error 500.21 - Internal Server Error

    Handler "ExtensionlessUrlHandler-Integrated-4.0" has a bad module "ManagedPipelineHandler" in its module list

    I did follow the two links you posted, but I still get an error. I have not been able to go to a different address and access my site, other than the regular http://localhost:12345/

    EDIT: Works! I had to remove IIS, reboot, then install IIS again.

    EDIT 2: Nope! I had to run this command:

    dism /online /enable-feature /featurename:IIS-ASPNET45 /all

Please Sign in or register to post replies

Write your reply to:

Draft