Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/31.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 获取错误请提供有效凭据。OAuth OAuth_问题=";OST“OAUTH”参数“不存在错误”;,领域=”;Yahooapi.com“;_C#_Asp.net - Fatal编程技术网

C# 获取错误请提供有效凭据。OAuth OAuth_问题=";OST“OAUTH”参数“不存在错误”;,领域=”;Yahooapi.com“;

C# 获取错误请提供有效凭据。OAuth OAuth_问题=";OST“OAUTH”参数“不存在错误”;,领域=”;Yahooapi.com“;,c#,asp.net,C#,Asp.net,我在“”网站上工作。 *%20来自%20社会配置文件%20,其中%20guid='ZGVG52ZDAYGCZRFF4VBA5L6ICY' 当我在地址栏中输入执行的字符串时 请提供有效的凭据。OAuth OAuth_problem=“OST\u OAuth_PARAMETER\u缺席\u错误”,realm=“yahooapi.com”被协调,我认为发生了身份验证错误。但是我不明白我在哪里用api设置了身份验证参数?在url中?但是怎么做呢?请提供示例代码帮助。我认为您需要添加带有请求Uri的授权标

我在“”网站上工作。 *%20来自%20社会配置文件%20,其中%20guid='ZGVG52ZDAYGCZRFF4VBA5L6ICY'

当我在地址栏中输入执行的字符串时


请提供有效的凭据。OAuth OAuth_problem=“OST\u OAuth_PARAMETER\u缺席\u错误”,realm=“yahooapi.com”被协调,我认为发生了身份验证错误。但是我不明白我在哪里用api设置了身份验证参数?在url中?但是怎么做呢?请提供示例代码帮助。

我认为您需要添加带有请求Uri的授权标头作为标头。像这样的东西

        string headerString = "Authorization: OAuth realm=Your Oauth realm&" +
                            "oauth_timestamp= xxxxxxxx&oauth_nonce=your value&,"+
                            "oauth_version=1.0&oauth_signature_method=HMAC-SHA1&"+
                                "oauth_consumer_key=your key&,oauth_token=your token&"+
                                    "oauth_signature=your signature";

        var req = (HttpWebRequest)WebRequest.Create("requsting uri");
        req.ContentType = "application/xml";
        req.Method = "POST";
        req.Headers.Add(headerString);

        HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
        var sr = new StreamReader(resp.GetResponseStream());
        string response = sr.ReadToEnd().Trim();

在这里,我假设你正在打电话

我认为您需要添加带有请求Uri的授权头。像这样的东西

        string headerString = "Authorization: OAuth realm=Your Oauth realm&" +
                            "oauth_timestamp= xxxxxxxx&oauth_nonce=your value&,"+
                            "oauth_version=1.0&oauth_signature_method=HMAC-SHA1&"+
                                "oauth_consumer_key=your key&,oauth_token=your token&"+
                                    "oauth_signature=your signature";

        var req = (HttpWebRequest)WebRequest.Create("requsting uri");
        req.ContentType = "application/xml";
        req.Method = "POST";
        req.Headers.Add(headerString);

        HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
        var sr = new StreamReader(resp.GetResponseStream());
        string response = sr.ReadToEnd().Trim();

在这里,我假设你正在打电话

不清楚你在问什么。第二个链接是什么?“cooured”是什么意思?你试过什么?不清楚你在问什么。第二个链接是什么?“cooured”是什么意思?你试过什么?