我需要获得显示画面服务器数据可视化的票证,但我总是得到-1而不是票证。我尝试使用这个site中的简单HTML表单,但无论如何我从我的tableau服务器得到-1。
class Program
{
static void Main(string[] args)
{
var url = "https://server.com/trusted";
var encoding = new UTF8Encoding();
var request = (HttpWebRequest)WebRequest.Create(url);
var postData = "username=userName";
postData += "&target_site=ru&client_ip=76.151.88.1";
byte[] data = encoding.GetBytes(postData);
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = data.Length;
using (var stream = request.GetRequestStream()) { stream.Write(data, 0, data.Length); }
var response = (HttpWebResponse)request.GetResponse();
var ticket = new StreamReader(response.GetResponseStream()).ReadToEnd();
Console.WriteLine(ticket);
Console.ReadKey();
}
答案 0 :(得分:0)
对我来说,必须配置tableau安装。请看这个链接:https://onlinehelp.tableau.com/current/server/en-us/trusted_auth_trustIP.htm
请注意,您可以使用此命令检查现有列表,然后基本上将您的计算机添加到该列表中:
tabadmin get wgserver.trusted_hosts
这是一个讨论可能的解决方案的链接。它很方便,因为它说日志是关于它发生的原因: http://onlinehelp.tableau.com/current/server/en-us/trusted_auth_trouble_1return.htm
这些日志在这里:
ProgramData\Tableau\Tableau Server\data\tabsvc\logs\vizqlserver