p.s. actually umbraco http context is important, but I don't know how simulate it. as temporary solution I use web service and do all actions in site project(not in windows service). I only call web service method from windows service, not more. This message isn't true resolved of current question.
Get node's url in Console application
I built a console application like this(using ContentService):
https://github.com/sitereactor/umbraco-console-example
But I don't know how get node's url?
I can get node's path, but how convert it to 'niceUrl'?
I think as a solution to need simulate UmbracoContext, but I don't know how.
Thanks.
Taras,
According to this http://our.umbraco.org/forum/developers/api-questions/39164-Console-Application-Publishing-Problem which you have already seen in the second post Morton says requirement for httpcontext so it may be the same when trying to do nice url?
Usually you can do umbraco.library.NiceUrl(1234) but that needs web context for sure. You could try
Regards
Ismail
Ismail,
Yes, I try use current context:
var umbracoContext = UmbracoContext.Current;
but "umbracoContext" is null.
p.s. actually umbraco http context is important, but I don't know how simulate it. as temporary solution I use web service and do all actions in site project(not in windows service). I only call web service method from windows service, not more. This message isn't true resolved of current question.
is working on a reply...