我收到错误“远程服务器返回错误:(500)内部服务器错误” [英] I am getting the error "the remote server returned an error: (500) internal server error"

查看:139
本文介绍了我收到错误“远程服务器返回错误:(500)内部服务器错误”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在字符串数据中调用Request并传递端点URL但是我收到错误 - 远程服务器返回错误:(500)内部服务器错误。



我尝试过:



I am calling the Request in the string data and passing the endpoint URL but i am getting the error-The remote server returned an error: (500) Internal Server Error.

What I have tried:

   using (var client = new WebClient())
            {
                // read the raw SOAP request message from a file
                string data = @"<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:urn=""urn:enterprise.soap.sforce.com""><soapenv:Header><urn:LoginScopeHeader><urn:organizationId>organizationid</urn:organizationId>
       <!--Optional:-->
         <urn:portalId></urn:portalId>
      </urn:LoginScopeHeader>
   </soapenv:Header>
   <soapenv:Body>
      <urn:login>
         <urn:username>username</urn:username>
         <urn:password>password</urn:password>
      </urn:login>
   </soapenv:Body>
</soapenv:Envelope>";

                //client.Headers.Add("Content-Type", "application/soap+xml;  charset=utf-8");
                // The SOAPAction header indicates which method you would like to invoke
                // and could be seen in the WSDL: <soap:operation soapAction="..." /> element
                // client.Headers.Add("SOAPAction", "http://ws.vantiv.com/Shared/CardPayment/v2/AuthorizeKeyedCardPayment");
                try
                {
                    var response = client.UploadString("https://test.salesforce.com/services/Soap/c/40.0/0DF4B00000000as", data);
                     Util.ErrorWriting(DateTime.Now + " :::: " + MethodBase.GetCurrentMethod() + " :::: " + response);

                }
                catch (Exception ex)
                {
                    // return ex.Message;
                    Util.ErrorWriting(DateTime.Now + " :::: " + MethodBase.GetCurrentMethod() + " :::: " + ex.Message);
                }
            }

推荐答案

看看这个url test.salesforce出现如何成为salesforce问题.com / services / Soap / c / 40.0 / 0DF4B00000000as您可能需要联系salesforce支持/开发人员支持,以查看问题是否与您的SOAP请求有关,或者它是否是salesforce中的配置问题。



我们无法告诉您问题是什么,因为我们不管理该服务器,也不了解您的项目。所以问题可能在于你的SOAP信封格式不正确,或者它可能是一个配置/谁知道test.salesforce.com服务器端有什么问题。
Seeing how this appears to be a salesforce question base on this url test.salesforce.com/services/Soap/c/40.0/0DF4B00000000as you probably need to contact salesforce support/developer support to see if the issue is with your SOAP request or if it is a configuration issue within salesforce.

We cannot tell you what the issue is as we don't manage that server, nor do we know anything about your project. So the issue could be on your end with an incorrectly formatted SOAP envelope or it could be a configuration/who knows what problem on the test.salesforce.com server side.


这篇关于我收到错误“远程服务器返回错误:(500)内部服务器错误”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆