cancel
Showing results for 
Search instead for 
Did you mean: 

Open Alfresco dashboard from .net code

ayushsethi
Champ in-the-making
Champ in-the-making
I am new to alfresco i require to by pass the alfresco login page when user clicks button from my website and pass that user login credentials. i tried below code after reading from alfresco forum but all time i am getting a parsing exception any one can help me with this.
I just need that when a user clicks on button on a new tab alfresco dashboard of that user gets open and login page is bypassed.

Dictionary<string, string> parameters = new Dictionary<string, string>();

            // define binding type, in our example we are using ATOMPUB as stated above
            parameters[DotCMIS.SessionParameter.BindingType] = BindingType.AtomPub;
            // define CMIS available path which is already available under alfresco
            parameters[DotCMIS.SessionParameter.AtomPubUrl] = "http://127.0.0.1:8080/share/";
            //parameters[DotCMIS.SessionParameter.AtomPubUrl] = "https://localhost:8080/alfresco/service/cmis";
            // alfresco portal admin user name
            parameters[DotCMIS.SessionParameter.User] = "admin";
            // alfresco portal admin password
            parameters[DotCMIS.SessionParameter.Password] = "ayush@123";
            string url = string.Format("http://127.0.0.1:8080/share/?User={0}&Password={1}", "admin", "ayush@123");

            string s = "window.open('" + url + "', 'popup_window', 'width=300,height=100,left=100,top=100,resizable=yes');";
            ClientScript.RegisterStartupScript(this.GetType(), "script", s, true);

1 REPLY 1

kaynezhang
World-Class Innovator
World-Class Innovator
try

Dictionary<string, string> parameters = new Dictionary<string, string>();
            parameters[DotCMIS.SessionParameter.BindingType] = BindingType.AtomPub;
            parameters[DotCMIS.SessionParameter.AtomPubUrl] = "http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/atom";
            // parameters[DotCMIS.SessionParameter.AtomPubUrl] = "http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.0/atom";
            parameters[DotCMIS.SessionParameter.User] = "admin";
            parameters[DotCMIS.SessionParameter.Password] = "admin";