Admin Mode from different Application
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Content Management Server > Admin Mode from different Application




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Admin Mode from different Application  
anonymous


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-01-05 01:50 AM

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 ]



    Re: Admin Mode from different Application  
JR


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
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 ]



    Sponsored Links  




 





   All times are GMT. The time now is 07:14 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register