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

Question

Question

Logged user by default in web access to simulate public access to documents

asked on February 17, 2016

Hello, what we are trying to achive is to simulate a public access (read-only) to documents (viewing laserfiche documents in the document viewer in a browser tab using direct links) while using a permanetly logged user, allowing users (two at the same time, top) to see a document without using any credentials.

Is it possible to have a permanetly logged in user in Web Access? so when the direct link is clicked the document will load without asking for credentials.

I know Web Link does this perfectly, but we are trying to emulate this with Web Access.

0 0

Answer

SELECTED ANSWER
replied on February 19, 2016

I haven't tested this, but it should just be something like:

document.getElementById('TheLoginInterface_UserBox').value = 'username';
document.getElementById('TheLoginInterface_PasswordBox').value = 'password';
document.forms['Form1'].submit();

 

1 0

Replies

replied on February 18, 2016

Web Access doesn't have any built-in support for unauthenticated users.  There are a few things you could do to make this work, for instance you could add some javascript to Login.aspx to automatically enter credentials into the input boxes and click the "Sign In" button.

0 0
replied on February 19, 2016

Thanks Brian, is it possible to get an example of the javascript added to Login.aspx ?

0 0
SELECTED ANSWER
replied on February 19, 2016

I haven't tested this, but it should just be something like:

document.getElementById('TheLoginInterface_UserBox').value = 'username';
document.getElementById('TheLoginInterface_PasswordBox').value = 'password';
document.forms['Form1'].submit();

 

1 0
replied on February 19, 2016

Is there an specific place in the Login.aspx where I should put this code? I`m testing it and I`m not sure im placing it right, because it`s not working.

0 0
replied on February 19, 2016

It works now. For future references this is the code I added to the Login.aspx right before </head>


<script type="text/javascript">
  window.onload = function() { 
    var obj=document.getElementById("<%= LoginButton.ClientID %>"); 
    document.getElementById("<%= UserNameBox.ClientID %>").value = "UserName"; 
    document.getElementById("<%= PasswordBox.ClientID %>").value = "UserPassword";
    obj.click();
  };
</script>

Thanks Brian.

1 0
replied on February 19, 2016

Out of curiosity, can you elaborate on the use case for this?

0 0
replied on February 22, 2016

We were testing the true difference between Web Access and WebLink. And after testing this out, we figured WebLink is better for public access even after trying to simulate public access with Web Access.

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

Sign in to reply to this post.