0 Replies Latest reply: Oct 29, 2014 5:52 AM by Michael Gliwinski RSS

    custom authenticate.aspx

      Hi all,

       

      I'm trying to integrate qlikview with our site and a custom SQL based authentication backend it uses.  To this end I started with a simplest custom Authenticate.aspx with a hardcoded username and put it into %ProgramFiles%\QlikView\Server\QlikViewClients\QlikViewAjax\ directory, replacing the one that was already there.  The contents of my Authenticate.aspx:

       

      <%@ Import Namespace="System.IO" %>
      <%@ Import Namespace="QlikView.AccessPoint" %>
      <%@ Page Language="C#" AutoEventWireup="true" Debug="true" %>
      
      <script runat="server">
          protected void Page_Load(object sender, EventArgs e) {
              Response.Clear();
              Context context = this.GetContext();
              context.Response.AddVersionHeader();
      
              File.AppendAllText("C:\\ProgramData\\QlikTech\\WebServer\\Log\\authenticate.log", "here");
      
              IUser user;
              user = new NamedUser("DOMAIN\\user", null, true);
              QlikView.AccessPoint.User.GenericAuthentication(context, user);
              return;
          }
      </script>
      
      

       

      The problem is, I don't think it's being used, as even the `File.AppendAllText` line doesn't work, and I'm getting a CONNECTION_RESET error from Authenticate.aspx in the browser (seen in dev tools in network log) after which it pops up a message that I'm not authorized to view the document and in QVWS log I can see it's falling back to anonymous, which explains the not authorized message.

       

      Any ideas on what I could be doing wrong?  Or even ideas on how to debug this?

       

      Don't know much about ASP.NET so this could be a newbie error.

       

      BTW, I got the idea and code for this from `Customized Authentication v2 0.zip` attached to one of the threads here.

       

      Thanks,

      Michael