LogicalDoc integrate with Asp.net application

Do you want to create a native client or integrate with third party applications: webservices are the solution.

Moderator: car031

shrikant
Posts: 18
Joined: Fri Apr 10, 2015 11:56 am

LogicalDoc integrate with Asp.net application

Fri Apr 10, 2015 1:48 pm

Hi All

Today i have download the evaluation version of LogicalDoc and I would like to integrate it with my Asp.net web application.

I saw some C# window based samples that are able to create document,upload doc,searching the doc from DMS.

but i would like when my application user logged in my asp.net application then he/she can directory access the logicalDoc application with-out re-enter login id/password.

or my application work as client application but provide all feature of logicalDoc.

Please any one can provide me solution for this.

Thanks in Advances.

Regards
Shrikant
mmeschieri
Posts: 242
Joined: Mon Apr 19, 2010 3:40 pm

Re: LogicalDoc integrate with Asp.net application

Mon Apr 13, 2015 7:02 am

You should get a valid SID by the first time and then reuse it for all subsequent calls. The session has an expiration time so, from time to time you should have to renew the session.
shrikant
Posts: 18
Joined: Fri Apr 10, 2015 11:56 am

Re: LogicalDoc integrate with Asp.net application

Mon Apr 13, 2015 7:59 am

Hi mmeschieri

Thanks for kind reply. actually I saw an example http://wiki.logicaldoc.com/wiki/Bindings_And_Samples (dotNET2WSClient-6.8.4.zip) is using SID and passing with url but this example is not working.

Please could you provide me any example in ASP.Net.

Thanks for your support again.

Regards
Shrikant
mmeschieri
Posts: 242
Joined: Mon Apr 19, 2010 3:40 pm

Re: LogicalDoc integrate with Asp.net application

Mon Apr 13, 2015 8:16 am

Probably you are using this sample against a newer version of LogicalDOC. Periodically look at that wiki page so you will see more recent samples when they will be made available.
shrikant
Posts: 18
Joined: Fri Apr 10, 2015 11:56 am

Re: LogicalDoc integrate with Asp.net application

Mon Apr 13, 2015 10:27 am

Hi mmeschieri

in wiki I have found the latest ver. 7.1, http://wiki.logicaldoc.com/wiki/Bindings_And_Samples (dotNET2WSClient-7.1.zip) . I have tried same code in this version also but getting same issue it is showing loading.... always.
agaspa
Posts: 714
Joined: Tue Apr 20, 2010 8:24 am

Re: LogicalDoc integrate with Asp.net application

Mon Apr 13, 2015 11:05 am

Hi shrikant,
we do not have an example for Asp.net, so you will need to adapt the examples in C# that we have made available.
You must obtain the SID (SESSION ID) using the web-service API, after you can invoke the methods provided by the API using the SID you've got.
But what I would like to understand is this: you can get the SID?
Your LogicalDOC system can be reached via the web? (Using a simple web-browsers)
I need to know if your LD system is working properly and correctly installed.
Be aware that if you're using LD community you will have to change the url of the web-services adding the context of the webapp, so insted of http://localhost:8080 your urls will have the context added after the path like this: http://localhost:8080/logicaldoc
shrikant
Posts: 18
Joined: Fri Apr 10, 2015 11:56 am

Re: LogicalDoc integrate with Asp.net application

Mon Apr 13, 2015 1:03 pm

Hi agaspa

I am trying following code even I checked with fiddler SID is creating properly but still facing same issue.
kindly do the needful if possible.


protected void Page_Load(object sender, EventArgs e)
{
ReadLoginCredentials();

try
{
// Authenticates once and for all
Auth.AuthService _auth = new Auth.AuthService();
SID = _auth.login(username, password);

HttpCookie cookie = new HttpCookie("SID");

//Set the cookies value
cookie.Value = SID;

//Set the cookie to expire in 10 minute
DateTime dtNow = DateTime.Now;
TimeSpan tsMinute = new TimeSpan(0, 0, 10, 0);
cookie.Expires = dtNow + tsMinute;

//Add the cookie
Response.Cookies.Add(cookie);

Response.Redirect("http://localhost:8080/logicaldoc", false);

}
catch (Exception ex)
{
throw ex;
}
}

private void ReadLoginCredentials()
{
username = ConfigurationManager.AppSettings["Username"];
password = ConfigurationManager.AppSettings["Password"];
}

Thanks
shrikant
Posts: 18
Joined: Fri Apr 10, 2015 11:56 am

Re: LogicalDoc integrate with Asp.net application

Mon Apr 13, 2015 2:09 pm

Hi agaspa

Thanks Now I am able to access LogicalDoc from asp.net application.

now I would like to control GUI of logical doc for authenticated user of asp.net could it be possible.
Please could you suggest any better way.

Regards
Shrikant
agaspa
Posts: 714
Joined: Tue Apr 20, 2010 8:24 am

Re: LogicalDoc integrate with Asp.net application

Mon Apr 13, 2015 2:16 pm

Hi shrikant,

I think you can avoid putting in the request the SID cookie,
insted you should specify the parameter directly in the request eg:

Code: Select all

http://localhost:8080/logicaldoc?sid=sidvalue
Also you can instruct LD to open on a specific target folder

Code: Select all

http://localhost:8080/logicaldoc?sid=sidvalue&folderId=foldervalue
Note that the default workspace has folderID = 4
shrikant
Posts: 18
Joined: Fri Apr 10, 2015 11:56 am

Re: LogicalDoc integrate with Asp.net application

Tue Apr 14, 2015 10:55 am

Hi agaspa

I have tried to pass parameter directly in the request as your guidance but it is not working.
is it required to set any thing else in logicaldoc to accept this parameter?.

kindly suggest.

Regards
Shrikant

Return to “Web Services”

Who is online

Users browsing this forum: No registered users and 21 guests