06-01-05 01:50 AM
From an external app, there might be an extra step involved. You would have
to send them to a page on the CMS site that they can access without having
to login. From within that page, redirect them to the page you want using a
CmsApplicationContext.
The code below should build the URL to the edit site for the page you want t
o go to.
using (CmsApplicationContext cmsContext = new CmsApplicationContext())
{
cmsContext.AuthenticateAsUser("WinNT://YOUR_DOMAIN/ADMIN_ID", "ADMIN_PASSWOR
D", PublishingMode.Update);
// pick one of the next three lines to determine the posting you want to edi
t
Posting postingToEdit = (Posting) cmsContext.Searches.GetByGuid(YOUR_POSTING
_GUID);
Posting postingToEdit = (Posting) cmsContext.Searches.GetByPath(YOUR_POSTING
_PATH);
Posting postingToEdit = (Posting) cmsContext.Searches.GetByUrl(YOUR_POSTING_
URL);
// build url
string url = "http://" +
HttpContext.Current.Request.ServerVariables["HTTP_HOST"] +
WebAuthorContext.Current.GetUrlForMode(postingToEdit, WebAuthorContextMode.A
uthoringReedit, true);
}
Also, try looking at Stefan's blog for a number of good examples..
http://blogs.technet.com/stefan_gossner/
HTH.
> Anybody have any idea how I, from a different ASP.NET application, be
> able to dirrect a user to a page without having to have them login
> and have them be in admin mode?
>
[ Post a follow-up to this message ]
|