Live Odd issue with umbracoContext.Content.GetAtR...
# help-with-umbraco
m
We have a middleware that has worked for ages (hasnt it always) and now umbracoContext.Content.GetAtRoot() is not returning any nodes as far as I can tell. It works locally. I know its failing there as the log before this loop is there but the logs in the loop are never hit and at two of them are always written out Anyone got any ideas?
k
If something like this works locally but not elsewhere, for me it's usually Culture & Hostnames that creates confusion in Umbraco. Sometimes it would find the wrong root node because it can't map the URL to the content tree correctly etc. Or sometimes the code is written so it happens to work locally because there is less content, no multiple C&Hs etc. If you can, try to inspect what
.Content.Root()
actually finds in the problematic environment.