You are viewing limited content. For full access, please sign in.

Question

Question

Weblink 10.3 and passing in Login Credentials

asked on September 28, 2018

We are in the process of upgrading from Laserfiche Version 8.3 to 10.3. Our go live date for 10.3 is next month October 13th, 2018.

 

Our only blocker right now is Weblink automated log in. We currently run Weblink 8 in an IFrame within our corporate website and all of our customers use it to view their documents.

 

We need to know the easiest way to pass  user id and password credentials to Weblink 10.3  so that our customers do not see the Weblink Login page, but are sent directly to the Weblink Welcome or Browse page ?  We have the ID and Password available and can provide it to the Weblink Login process, but we need to know the best way to do that.

1 0

Replies

replied on October 2, 2018

Hi Merlin,

 

I have talked to our developers. And they have provided a work around to solve the issue for WebLink 10.

I tested this method on WebLink 10.1.0.151 and it can now autoLogin with the correct login credentials.

 

1) Edit file "login.aspx.vb" under "installPath\Laserfiche\WebLink\WebLink\Web Files"

You're right that the logic has gotten a little more complicated, but a solution very similar to your old one should work.  Because there so many branches, it'd be hard for us to say exactly what's going wrong without further detail, but here's a little bit of info and a general idea of what your solution should look like.

The LoginEntry class carries information about the configuration for the repository you're logging in as.  Its members include:

public int DBID;
public string Database;
public string Server;
public string Username;
public string Password;
public string DisplayName;
public bool AutoLogin;
public bool UseWindowsAuthentication;
public string DefaultDomain;
public bool ShowLatestVersionOnly;
public bool UseSSL;
public bool UseLFDS;

These are the things you set up in the "Connection" tab of the Designer page. 

The code in Login.aspx.vb populates TheLoginInterface with the info it gets from the LoginEntry.  It includes more complicated branch logic than before because we're supporting more methods of authentication (like third-party SSO, ACS for Cloud users, etc.)

For me, logging on with a domain username and password to my default repository worked if I added: 

TheLoginInterface.UserName = "domain\username"

TheLoginInterface.Password = "blahblah"

TheLoginInterface.UseWindowsAuthentication = True

TheLoginInterface.AutoLogin = False

TheLoginInterface.Login()

... right after the long Try-Catch block in Login.aspx.vb's Page_Load(), before the line TheLoginInterface.PreventReconnect = False.  Note that setting UseWindowsAuthentication to True isn't strictly necessary if the configuration for the repository is set to use Windows auth.  And even if it isn't, when we see a username in that format, we default to Windows authentication.

 

2) Open "WebLink.vbproj" inside Visual Studio under "installPath\Laserfiche\WebLink\WebLink\Web Files" and build the weblink solution.

The new .dll files under bin folder should now be updated to reflect the code change in step 1.

 

3) Refresh WebLink page. 

WebLink should now be able to automatically login with the credentials entered in step 1.

 

If that doesn't work for you, please provide further details about what you're seeing.  Getting it exactly right depends on a combination of your configuration for the repository and what information you provide TheLoginInterface to supplement or override what it gets from the LoginEntry.  Also, make sure you're getting the LoginEntry for the correct repository - if the URL doesn't include a DBID and you're not attempting to log on to the default database, you may want to hard-code that DB in a call to GetLoginEntryByDBID() to minimize the number of things you need to set manually on TheLoginInterface.

 

Thanks!

Julia

2 0
replied on October 3, 2018 Show version history

Thanks for the reply Julia. We have tried out your suggestion and it's working good for the most part.

 

One problem we are seeing is in the screen show below. We get the No records found message now and then but if we click the browser refresh button, then it's fine.

 

Just FYI, I see you mentioned WebLink 10.1.0.151 and I am using the most current released version 10.1.0.60 which I believe is from May of this year.

 

Can you let us know what may be causing this?

 

Image Link: https://ibb.co/hE1o4K

 

 

0 0
replied on October 3, 2018

Hi Merlin,

 

This bug has been filed for WebLink version 10.1.0.60.

Bug94517: Resolved a cacheing issue that could result in an erroneous "No records found" message in some cases when accessing the repository using Internet Explorer. 

 

This bug was fixed in WebLink 10.1 Update 1 (Weblink version 10.1.0.151, August), KB1013994.

You can choose to apply the patch to update to 10.1.0.151 from the above link to resolve the issue.

 

Let me know if you have any other questions!

Thanks!

Julia

0 0
replied on October 3, 2018

Thanks Julia. We are downloading now and will try it out and keep you posted on our progress.

 

0 0
replied on October 3, 2018

Julia, we have the new version now and below is the code we added like your suggestion right after the big Try/Catch. The Login.aspx.vb code is being executed twice as we can see from the Logger. So sometimes we are seeing two logins via the Laserfiche admin console Activity/Sessions and that causes issues because we lose the pid encrypted credentials, etc.

We tried adjusting for this scenario by looking at Page.IsPostBack but we are still having problems.

Can you provide any guidance on why it is logging in twice?

 

 

Catch ex As Exception

            Logger.WriteLogEntry(ex, WebLinkCommon.WLLogLevel.Important)

End Try

 

        'Start Addition

        Dim debugLog As New IO.StreamWriter("C:\Temp\Peter1.txt", True)

        debugLog.WriteLine("Begin")

 

        debugLog.WriteLine("End")

        debugLog.Close()

 

        TheLoginInterface.UserName = "virtusapp\vpdev11"

        TheLoginInterface.Password = "xxx"

        TheLoginInterface.UseWindowsAuthentication = True

        TheLoginInterface.AutoLogin = False

        TheLoginInterface.Login()

        'End Addition

 

        TheLoginInterface.PreventReconnect = False

        If ShowLogin Then

0 0
replied on October 3, 2018

Hi Merlin,

 

I tried to reproduce and it seems like this issue only occurs in IE.

If possible, would you be able to use an alternative browser such as chrome or firefox?

We are currently actively looking into a fix to apply to IE. And we will let you know as soon as we find a resolution.

Thanks for your time!

Julia

0 0
replied on October 4, 2018

Hi Julia, thanks for the response. We will work with Chrome in the meantime and see if we have the same issues or not. But, the majority of our customers use IE so we will need a working IE version primarily.

I wanted to let you know that there is still a problem in the WebLink 10.1 Update 1 (Weblink version 10.1.0.151, August), KB1013994

Originally the Browse.aspx page would say "No Records Found" on the first page load. Now we see the spinning progress indicator instead on the first page load. It works only after clicking the browser refresh button.

Below is the spinning progress indicator we see:

https://ibb.co/ntuaKK

 

0 0
replied on October 5, 2018

Hi Merlin,

 

We have filed "bug114682: IE: Edit login.aspx.vb to passin auto-login credentials. Navigate to browse.aspx cause infinite loading loop." for this issue. 

The "spinning progress" bar you see is related the code change to the login.aspx.vb provided in this post. The issue occurs in IE.

 

It would be better if you could open a support case with Bug114682 to keep track of the progress and we could provide further details there. We are actively looking into the bug and when there is an update/fix for the bug, you will be notified via the support case opened. 

 

Thanks!

Julia

1 0
replied on October 5, 2018

Thanks Julia, I will have our VAR open the support case with Bug114682 and track the progress.

 

Just so you and the developers are aware, we did some testing with Chrome and saw no difference between IE and Chrome. Both browsers produced duplicate login sessions and the spinning progress indicator on the Browse page. We didn't try Firefox as none of our customers have ever mentioned using Firefox for their daily work.

 

 

0 0
replied on September 28, 2018 Show version history

Are you using a shared/default account, or does each user log in as themselves?

If you're using a default account, you can set that up a few different ways, "auto-login with Laserfiche Account" and enter the Usersame/Password under the repository Connection settings, or you can set a Public User.

If each user is logging in as themselves, you can choose "auto-login with Windows credentials"

Alternatively, you can set up the Security Token Service in LFDS and use Single Sign On; the advantage there is that it works across all LF Web products like WebLink, Forms, etc.

0 0
replied on September 28, 2018

Each user will be logged in as themselves. But our customers of course are not logged into our domain so we can't use windows authentication. We have to plug in the user name as ourdomainname/username  and the password to the Weblink Login page somehow.

0 0
replied on September 28, 2018

What were you doing to accomplish this in Version 8?

0 0
replied on September 29, 2018 Show version history

Passing a parameter to the login page that contained the encrypted user id and password like this:

http://weblinkURL/Login.aspx?pid=encryptedLoginCredentials

Then in the code behind of Login.aspx.vb I unencrypt the User Id and Password and put them into the TheLoginInterface.UserName and TheLoginInterface.Password

Additionally:

TheLoginInterface.WindowsCredentials = True
TheLoginInterface.AutoLogin = False

TheLoginInterface.Login()

In version 10 this doesn't work the same way as there's an additional classes in play like loginData, etc. 

 

So I was hoping that a Laserfiche Weblink Developer could help out on what all is required in Weblink 10.3 to accomplish this.

If I were to try and open a Laserfiche Support ticket on this topic, they would send me here. So here I am :)

 

1 0
replied on January 29, 2020

I ran into the same issue.  We have other agencies accessing our repository to view reports, etc.  after upgrading to weblink 10.1.0.151, our sister agencies can't access our repository anymore.

 

We had a trust set up in Admin console for a group of their users.  The trust passed their windows credential over for access.  with that said, we were able to specify a landing folder.  Now that we are on 10, we can't do that anymore.  

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.