08-12-2008 01:18 PM
AuthenticationService auth = new AuthenticationService();
AuthenticationResult ar = auth.startSession("Mellen", "Mellen");
ContentService cs = new ContentService();
UsernameToken userToken = new UsernameToken(ar.username, ar.ticket, PasswordOption.SendPlainText);
cs.RequestSoapContext.Security.Timestamp.TtlInSeconds = 300;
cs.RequestSoapContext.Security.Tokens.Add(userToken);
StreamReader sr = new StreamReader(Server.MapPath("web.config"));
byte[] newContent = new byte[sr.BaseStream.Length];
sr.BaseStream.Read(newContent, 0, (int)sr.BaseStream.Length);
sr.Close();
Reference refer = new Reference();
refer.store = new Store();
refer.store.address = "SpacesStore";
refer.store.scheme = "workspace";
cs.write(refer, "web.config", newContent, new ContentFormat());
auth.endSession(ar.ticket);
08-13-2008 06:47 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.