Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I'm trying to set up QV server in DMS mode with ticketing. OS - Windows2008, IIS7.
But when I request the ticket using
I get the following result:
- <result>
<message text="Invalid call" />
</result>
Has anybody experienced the same problem?
Thanks
Y
IIS seemed to be working as it returned a result.
Anyway - we gave up using IIS and now use QVWS instead, so I can't do more tests on IIS unfortunately.
There was an authorisation issue in QVWS - it was promting for username and password, but we managed to solve that using the following in the code:
// QlikView Server settings
string qvsuser = "username"; //this user MUST be in 'QlikView Administrators' group!
string qvspwd = "password";
…….
request.Credentials = new NetworkCredential(qvsuser, qvspwd);
So this problem has been solved for us.
Thanks for you replies guys
Hi,
I have seen this post. It's helpful but doesn't solve my problem.
I did try to use QVWeb Server instead of IIS and ticket request works successfully. So my guess is it is something to do with IIS7...
This is the code I'm using with VB.NET
Dim request As WebRequest = WebRequest.Create("http://" + qvshost + "/QvAjaxZfc/GetTicket.aspx?admin=")
Dim str As String
str = "<Global method='GetTicket'><UserId>" + username + "</UserId></Global>"
request.ContentLength = str.Length
request.Method = "POST"
request.Credentials = CredentialCache.DefaultCredentials
Dim writer As New StreamWriter(request.GetRequestStream())
writer.Write(str)
writer.Flush()
Try
Dim reader As StreamReader
reader = New StreamReader(request.GetResponse().GetResponseStream())
Dim document As New XmlDocument
document.LoadXml(reader.ReadToEnd())
If (document.InnerText.Length <= 0) Then
Throw New Exception("Check QVS Host name / availability")
End If
ticket = document.InnerText
Catch ex As Exception
End Try
After some investigation a guy from QlikTeck came back with this:
"Our Iis v10 uses aspx not asp. Aspx has a security feature provided by Microsoft that doesn't allow XML to be passed as parameters in the XML. In our qvws we don't have that. So use a POST call and send the XML as an entity body."
This may be explains why the link above isn't working. So we tried to use POST call and send XML as an entity body using the following in a simple html page:
function GetTicket() {
var xmlHttp = new XMLHttpRequest();
var url = 'http://localhost/QvAJAXZfc/GetTicket.aspx?admin=';
var cmd = '<Global method="GetTicket"><UserId>' + escape(idUserName.value) + '</UserId></Global>';
xmlHttp.open("POST", url, false);
xmlHttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
xmlHttp.send(cmd);
return xmlHttp.responseXML.documentElement.text;
}
Still same outcome - it works with QVWS and not with IIS......
It is working for me with IIS with the above code. Is IIS properly configured? Are you able to access applications through it?
I have exactly the same problem - slightly different code but basically does the same:
string url = “https://localhost/QvAjaxZfc/GetTicket.aspx?admin=”;
string ticketRequestXml = string.Format("<Global method='GetTicket'><UserId>{0}</UserId></Global>", identity);
WebRequest request = WebRequest.Create(url);
request.ContentLength = ticketRequestXml.Length;
request.Credentials = new NetworkCredential(_configurationProvider.QvRequestUser, _configurationProvider.QvRequestPassword, _configurationProvider.QvRequestDomain);
request.Method = "POST";
var writer = new StreamWriter(request.GetRequestStream());
writer.Write(ticketRequestXml);
writer.Flush();
var reader = new StreamReader(request.GetResponse().GetResponseStream());
var xmlDocument = new XmlDocument();
xmlDocument.LoadXml(reader.ReadToEnd());
The response I get back is
<result><message text="Invalid call"/></result> - very unhelpful, it gives us no clue as to why this is an invalid call. can't find any useful error logs either. Chasing QV support now...
IIS seemed to be working as it returned a result.
Anyway - we gave up using IIS and now use QVWS instead, so I can't do more tests on IIS unfortunately.
There was an authorisation issue in QVWS - it was promting for username and password, but we managed to solve that using the following in the code:
// QlikView Server settings
string qvsuser = "username"; //this user MUST be in 'QlikView Administrators' group!
string qvspwd = "password";
…….
request.Credentials = new NetworkCredential(qvsuser, qvspwd);
So this problem has been solved for us.
Thanks for you replies guys
jdallen, do you have any updates on this?
My code was working fine with IIS 7 but doesn't work with IIS 6.
Yes.
QlikView support suggested we remove the '?admin=' from the end of our POST url -this made no difference.
We now have this working, after a huge amount of trial and error with IIS Authentication settings. Our resolution involved setting the following:
Make sure you have an application pool in IIS to use which is set to use your QlikView service account (which should be in local Admin group and QlikView Admin group)
Set the root site in IIS to use the custom application ppol you have setup. Also make sure that the QlikView applications under the website (eg QvAjaxZfc, QvPlugin etc) are also using that app pool.
At the root level site in IIS (we're using IIS7), try enabling anonymous authentication (set it to use the application pool identity) and windows authentication
For QvAjaxZfc, enable Anonymous Authentication only (also set to use the app pool identity). You may also want to try enabling Basic authentication instead - I also had success with that, although our setup is quite complicated and I dont have time to explain it all.
What we are doing in our code is first authenticating the user against AD to make sure it is a valid user, then (see code I posted earlier) making a post request to GetTicket, using NetworkCredential(username, apssword, domain) to request a ticket using the QlikView service credentials.
Hope this helps someone!