Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all.... I recently installed QV11.2 in 3 machines. Machine1 QVS, machine2 QVP and machine3 QVWS IIS7.5...... I tried to use QMS API... to open a document, but I have a problem using webTickets.... with DMS
Apparently I get the webticket... but when the document is opened I get two errors message:
***When I try to open with QvAjaxZfc: "You do not have permission to view this directory or page"
***when i try to open with QvPlugin: "Failed to open document, You don't have access to this document"
I have my IIS server with anonymous auth , the default web site with anonymus auth, also the app QvAjaxZfc with anonymous auth, and the webticket.aspx with windows auth ....
I think my C # code gets the webticket in a wrong way. Because when I concatenate it with a url I get that errors.
p.s. when I configure the document with "All users" permission, QvPlugin opens the document correctly, but this isn't that I want.
public static string getTicket(string UserDMS)
{
string usergroups=@"";
string QlikViewServerURL = "http://tcaWeb/QVAJAXZFC/GetWebTicket.aspx";
StringBuilder groups = new StringBuilder();
if (!string.IsNullOrEmpty(usergroups))
{
groups.Append("<GroupList>");
foreach (string group in usergroups.Split(new char[] { ',' }))
{
groups.Append("<string>");
groups.Append(group);
groups.Append("</string>");
}
groups.Append("</GroupList>");
groups.Append("<GroupsIsNames>");
groups.Append("true");
groups.Append("</GroupsIsNames>");
}
string webTicketXml = string.Format("<Global method='GetWebTicket'><UserId>{0}</UserId></Global>", UserDMS);
HttpWebRequest client = (HttpWebRequest)WebRequest.Create(new Uri(QlikViewServerURL));
string uri = client.RequestUri.ToString();
client.PreAuthenticate = true;
client.Method = "POST";
client.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
NetworkCredential myCred = new NetworkCredential("user", "pwd", "domain");
CredentialCache myCache = new CredentialCache();
myCache.Add(new Uri(uri), "NTLM", myCred);
client.Credentials = myCache;
var writer = new StreamWriter(client.GetRequestStream());
writer.Write(webTicketXml);
writer.Flush();
var reader = new StreamReader(client.GetResponse().GetResponseStream());
var xmlDocument = new XmlDocument();
xmlDocument.LoadXml(reader.ReadToEnd());
return xmlDocument.InnerText;
}
Thanks all, it was an environment configuration issue.... now it's working!
p.s. when I configure the document with "All users" permission, QvPlugin opens the document correctly, but this isn't that I want.
Are you sure the user name that has permissions and the username in the ticket are the same?
You should add a textbox with the qvuser() and check that.
Hi Daniel, thanks for your answer....should be the same? ie I'm using DMS to give permission to a user logged externally, for example: 4 .... obviously,The ticket is asked by QlikView administrator. Apparently it is generating the ticket for another user because it can't be opened.
I tried again to open the document with this url: http://tcaweb/QvPlugin/opendoc.htm?document=pr.qvw&webticket=8HA2JdCytfag+IYDCkbJ5UmYIaYMsr7nNzpVwNF..., but in this case this document has all user auth. so it's open correctly.
In the other hand, whe i use the url:http://tcaweb/qvajaxzfc/authenticate.aspx?type=html&try=tcaweb/qvajaxzfc/opendoc.htm?document=pr.qvw...
I get this screen:
I just checked the Event Viewer logs and apparently the CAL is assigned to my local user and not a valid administrator user.
The description for Event ID 100 from source QlikViewServer cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
CAL usage: Using CAL of type "Session" for user "<PCname\KARLA>". Session cals in use: 1
You should first check your environment, make sure everything is working fine by just using domain users.
I believe your webserver is not correctly configured, it's missing the QVS configuration, check the QMC settings and make sure the QVS and DSC are configured.
Administrator requests a ticket but not for himself but for the external user. So the user in the ticket must match the user in the DMS authorization list or else he will not be able to access the application.
Ok, Daniel I'll check my environment.......... by the way. If I want to use QvPlugin with web ticket.. What should be the correct url?
Thanks
You link works for me.
Sorry, I double checked.
Correct link should be
BTW, not sure if you're aware but with webtickets you can redirect the user to the accesspoint instead of using direct links.
This is what your links should look like. One is to open a single document and the other is to the accesspoint.
Thanks all, it was an environment configuration issue.... now it's working!
Can you please give more details as to what the environmental issue were?
Bill