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;
}
Yes, I had an error in the configuration of my app pool, because this was not running under an administrator account, as my other qlikview services. Change this and no longer appeared the message not server on the access point .... and therefore i got a ticket for the user DMS and the document was opened
Karla
Are the IE Plugin links working for you? I just realized they don't work for me.
Hi Bill,
I have used your url format for opendocument with webticketing, it works fine. But when I tried to sue the same for Ajax client url, it didnt worked.
Please could you tell me , what is the exact format of url with webticket for Ajax client..
Here is my actual url..
http://<serverip>/QvAJAXZfc/AccessPoint.aspx?open=&id=Customer%7CCUSTOMER%2FCUSTOMER_LERG.qvw&client=Ajax
Your help is grateful to me and much appreciated.
Thanks