Provider hosted app error message: The remote server returned an error: (429) Too Many Requests.

Hi,
I have a customer running a provider hosted app and in Sharepoint 2013. Things have been working fine but recently they keep experiencing an issue where the all the app parts on the page show the following error message. Does anyone have an idea what
could be causing this problem and how I can fix it? The Sharepoint site and provider hosted app site are running on a Server 2008 R2 box with IIS 7.5.
Server Error in '/Test.Sharepoint.App' Application.
The remote server returned an error: (429) Too Many Requests.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.           
Exception Details: System.Net.WebException: The remote server returned an error: (429) Too Many Requests.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[WebException: The remote server returned an error: (429) Too Many Requests.]
System.Net.HttpWebRequest.GetResponse() +8527180
Microsoft.SharePoint.Client.SPWebRequestExecutor.Execute() +58
Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryToServer(ChunkStringBuilder sb) +975
Test.Sharepoint.AppWeb.Pages.LatestAnnouncement.GetLatestAnnouncement(Boolean showFullText) +610
Test.Sharepoint.AppWeb.Pages.LatestAnnouncement.Page_Load(Object sender, EventArgs e) +764
System.Web.UI.Control.LoadRecursive() +71
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18034
Impreza Software Development

Hi GuYumming,
I have checked the Sharepoint site using Fiddler and my X-SharePointHealthScore stays consistently on 1, I have even refreshed the site and had the "(429) Too Many Requests" error happen right in front of me whilst Fiddler is running and when I look at the
200 response for the Sharepoint site it is still showing "X-SharePointHealthScore: 1".
I assume because of this I do not need to make any of the changes suggested in your article above?
I have also been through the ULS logs and found the following 3 log entries that appear to relate to the issue but they do not really mean much to me so I am hoping that you can help:
Begin CSOM Request ManagedThreadId=59, NativeThreadId=12476
SPResourceTally(ClientServiceRequestDuration) value 1 + 150425 > 150000
ResourceBudgetExceeded, sending throttled status code. Exception=Microsoft.SharePoint.SPResourceBudgetExceededException: ResourceBudgetExceeded     at Microsoft.SharePoint.SPResourceTally.Check(Int32 value)    
at Microsoft.SharePoint.SPAggregateResourceTally.Check(SPResourceKind kind, Int32 value)     at Microsoft.SharePoint.Client.SPClientServiceHost.OnBeginRequest()
Impreza Software Development

Similar Messages

  • Error occurred in deployment step 'Uninstall app for SharePoint': The remote server returned an error: (502) Bad Gateway.

    Installed SP 2013 Foundation in my Hyper-V machine
    Created and done all the steps mentioned here http://blogs.msdn.com/b/shariq/archive/2013/05/07/how-to-set-up-high-trust-apps-for-sharepoint-2013-amp-troubleshooting-tips.aspx && http://msdn.microsoft.com/en-us/library/office/fp179901%28v=office.15%29.aspx
    for self signed certificate
    copied those two certificates in my local machine(base machine) D drive
    (D:\Cert)
    Both VM and base machine are in same domain
    Installed VS 2013 in my base machine and create a Provided hosted app with the copied certificates, (For creation i followed the above mentioned URL)
    Just created and hit F5 to run in my base machine, but getting this error
    Error occurred in deployment step 'Uninstall app for SharePoint': The remote server returned an error: (502) Bad Gateway.
    Please help me to resolve this issue, trying to figure out from last 2 days
    Thanks in Advance
    Arun

    Hi Harminder,
    This happens because an app has already been deployed and you are deploying it again using the same version.
    Resolution:
    Open the AppManifest.xml file and change the version.
    Vivek Jagga - MCTS SharePoint
    SharePointExcellence

  • The remote server returned an error: (404) Not Found.

    Hi All
    Now I try to deploy my SAP Portal Project it gives following error message "The remote server returned an error: (404) Not Found.". What is missing?
    Regards

    Hi,
    In order to check if those seetings are ok, do following:
    Open internet explorer (or another) browser and go to
    http://localhost:50000/irj
    You should get the Portal homepage with login screen.
    If you don't - then you have a problem with your local portal ( may be it is not running ).
    If you do - Login with username: administrator and
    password: abcd1234
    If you don't succeed to login, then you have a problem with your user( may be it does not exist ).
    Regards,
    Rima.

  • FTP Error (The remote server returned an error: (530) Not logged in.)

    Hi,
    I am unable to create a folder on FTP location via c# code. 
    I am getting the following error message:
    The remote server returned an error: (530) Not logged in.
    I have attached my code for your reference.
    FtpWebRequest myFtpWebRequest = null;
    myFtpWebRequest = (FtpWebRequest)FtpWebRequest.Create(new Uri(ftpfullpath + "/" + dirName));
    myFtpWebRequest.Method = WebRequestMethods.Ftp.MakeDirectory;
    myFtpWebRequest.UseBinary = true;
    myFtpWebRequest.Credentials = new NetworkCredential(strUserNameFTP, strPasswordFTP);
    FtpWebResponse response = (FtpWebResponse)myFtpWebRequest.GetResponse();
    response.Close();
    Note : value of ftpfullpath is "ftp://ftpxxxtest.com:21"

    Hi,
    Still I am getting the error:
    Exception 1 : The remote server returned an error: (502) Command not implemented
    I am getting this error message when I tried to find Whether the folder exist on FTP location. I will attached the code for your review.
    try
      string ftpServerIP = "ftp://ftptestcon.sathiyajeba.com:21";
      string strUserNameFTP = "dev_backup";
      string strPasswordFTP = "india@2090";
      string ftpfullpath = ftpServerIP ;
      var request = (FtpWebRequest)WebRequest.Create(ftpfullpath + "/" + directory);
      request.Credentials = new NetworkCredential(strUserNameFTP.Normalize(),   strPasswordFTP.Normalize());
      request.EnableSsl = true;
      request.Method = WebRequestMethods.Ftp.GetDateTimestamp;
      FtpWebResponse response = (FtpWebResponse)request.GetResponse();
      return true;
    catch (WebException ex)
      WriteLog("Error on FtpDirectoryExists : " + ex.Message.ToString());
      FtpWebResponse response = (FtpWebResponse)ex.Response;
      if (response.StatusCode == FtpStatusCode.ActionNotTakenFileUnavailable)
        WriteLog("Error on FtpDirectoryExists : Test-1");
        return false;
      else
        WriteLog("Error on FtpDirectoryExists : Test-2");
        return false;
    Exception 2: The remote server returned an error: (530) Not logged in.
    Getting this error message when I tried to create a folder on FTP location. Attached the source code for your review.
    string ftpServerIP = "ftp://ftptestcon.sathiyajeba.com:21";
    string strUserNameFTP = "dev_backup";
    string strPasswordFTP = "india@2090";
    string ftpfullpath = strServerFTP;
    try
       FtpWebRequest myFtpWebRequest = null;
       myFtpWebRequest = (FtpWebRequest)FtpWebRequest.Create(new Uri(ftpfullpath + "/" + dirName));
       myFtpWebRequest.Method = WebRequestMethods.Ftp.MakeDirectory;
       myFtpWebRequest.UseBinary = true;
       myFtpWebRequest.Credentials = new NetworkCredential(strUserNameFTP.Normalize(), strPasswordFTP.Normalize());
      FtpWebResponse response = (FtpWebResponse)myFtpWebRequest.GetResponse();
      response.Close();
      return true;
    catch (Exception ex)
      WriteLog("Error on CreateDirectory : " + ex.Message.ToString());
      return false;
    Could you please any help me to resolve this exception?
    Thanks,
    Sathiya Jeba C

  • Getting "The remote server returned an error 503 server unavailable" in azure web jobs

    I have created one web
    job - on demand schedule under azure web site.  This web jobs contains .execmd(i.e.)
    Console Application.
    I am retrieving the data from SQL Azure database and uploaded the data in sharepoint online lists. (i.e.)I have uploaded the data to several(7) lists in each subsites. I have 3 subsites. 
    I am getting this error "The remote server returned an error 503 server unavailable", while uploaded the data into lists. 
    Full Error Message:
    Message - The remote server returned an error 503 server unavailable.
    StackTrace -    at System.Net.HttpWebRequest.GetResponse()
    > cc525c: INFO]    at Microsoft.SharePoint.Client.SPWebRequestExecutor.Execute()
    > cc525c: INFO]    at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryToServer(ChunkStringBuilder sb)
    > cc525c: INFO]    at Microsoft.SharePoint.Client.ClientRequest.ExecuteQuery()
    > cc525c: INFO]    at Microsoft.SharePoint.Client.ClientRuntimeContext.ExecuteQuery()
    > cc525c: INFO]    at Microsoft.SharePoint.Client.ClientContext.ExecuteQuery()
    This is not occur every time. Some time i didn't get any error data successfully uploaded in share point online list.
    Totally 4 hours taken uploaded the data into list for completed all 3 subsites. 
    If anyone know how to resolve this.
    Thanks,
    A.Ramu

    Hi,
    Per my understanding, there is an issue when uploading data from SQL Azure database to a SharePoint list in Online environment.
    For narrowing down the issue, I suggest you create a Console Application in Visual Studio without accessing the SQL Azure database and upload some sample data to the same SharePoint
    list to see if the issue still occurs intermittently.
    Thanks
    Patrick Liang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • ESB Portal : The remote server returned an error: (400) Bad Request

    Hi,
    I am getting the below error message while trying to access ESB Portal:
    ========================
    Event code: 3005 
    Event message: An unhandled exception has occurred. 
    Event time: 12/18/2013 12:07:10 PM 
    Event time (UTC): 12/18/2013 12:07:10 PM 
    Event ID: 2a429911fb69455ab3b77348c8b259ce 
    Event sequence: 10 
    Event occurrence: 2 
    Event detail code: 0 
    Application information: 
        Application domain: /LM/W3SVC/1/ROOT/ESB.Portal-1-130318418493427545 
        Trust level: Full 
        Application Virtual Path: /ESB.Portal 
        Application Path: C:\Projects\Microsoft.Practices.ESB\Source\Samples\Management Portal\ESB.Portal\ 
        Machine name: WIN-HG1MJEC7KJS 
    Process information: 
        Process ID: 3220 
        Process name: w3wp.exe 
        Account name: NT AUTHORITY\SYSTEM 
    Exception information: 
        Exception type: WebException 
        Exception message: The remote server returned an error: (400) Bad Request. 
    Request information: 
        Request URL: http://localhost/esb.portal/default.aspx 
        Request path: /esb.portal/default.aspx 
        User host address: ::1 
        User: WIN-HG1MJEC7KJS\ESBUser 
        Is authenticated: True 
        Authentication Type: Negotiate 
        Thread account name: NT AUTHORITY\SYSTEM 
    Thread information: 
        Thread ID: 4 
        Thread account name: NT AUTHORITY\SYSTEM 
        Is impersonating: False 
        Stack trace:    at System.Net.HttpWebRequest.GetResponse()
       at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
    Custom event details: 
    ====================
    I also looked at thread : http://social.msdn.microsoft.com/Forums/en-US/1fb510a8-9f4b-4e1e-9261-3273b037786c/esbportal-bad-request-400?forum=biztalkesb
    However didn't able to find the workaround for the same.
    Best Regards,
    Harkirat

    Hi,
    On a local server you don't have to change the web.config if you use local Windows Groups. Check if the User is added to the "BizTalk Server Administrators" Group. Also check if the Group or the User has rights to access EsbExceptionDb & ESBAdmin
    database. You also have to enable "Windows Authentication" in IIS for the ESB.Portal.
    Local Machine settings:
    ESB.Exceptions.Service\Web.config
    <connectionStrings><add providerName="System.Data.SqlClient" connectionString="Integrated Security=SSPI;Data Source=.;Initial Catalog=EsbExceptionDb" name="EsbExceptionDbConnectionString"/></connectionStrings>
    C:\Projects\Microsoft.Practices.ESB\Source\Samples\Management Portal\ESB.Portal\Web.config
    <connectionStrings>
    <add name="AdminDatabaseServer" providerName="System.Data.SqlClient" connectionString="Network Library=dbmssocn;Data Source=(local);Integrated Security=True;Initial Catalog=ESBAdmin;"/>
    </connectionStrings>
    <authentication mode="Windows"/>
    <authorization><allow roles="BizTalk Application Users"/>
    <allow roles="BizTalk Server Administrators"/>
    <allow roles="Administrators"/>
    <deny users="*"/>
    </authorization>
    Kind regards,
    Tomasso Groenendijk
    Blog 
    |  Twitter
    MCTS BizTalk Server 2006, 2010
    If this answers your question please mark it accordingly

  • Form Based Authentication in SharePoint 2013: Getting The remote server returned an error: (500) Internal Server Error

    Hi
     I configured forms based authentication mode in Sharepoint 2013 site. When i tried to log in with windows authentication prompt it throws the following error
    The remote server returned an error: (500) Internal Server Error
    [WebException: The remote server returned an error: (500) Internal Server Error.] System.Net.HttpWebRequest.GetResponse() +8548300 System.ServiceModel.Channels.HttpChannelRequest.WaitForReply(TimeSpan timeout) +111 [ProtocolException:
    The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (application/soap+msbin1). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first
    1024 bytes of the response were: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    How to fix this issue?
    Regards,
    Siva

    Did you create a new web application or modify an existing web application?
    I would start by checking the ULS logs, maybe there is an incorrect setting within one of the web.config files, or SQL permissions.
    Also, as suggested above, check application pools are running.
    This blog post is a great guide for setting up FBA, check it through to make sure you haven't missed any steps:
    http://blogs.technet.com/b/ptsblog/archive/2013/09/20/configuring-sharepoint-2013-forms-based-authentication-with-sqlmembershipprovider.aspx

  • Urgent help On as2 error The remote server returned an error: (500) Internal Server Error.

    hi,
    im configured the as2 partner setup as per this http://msdn.microsoft.com/en-us/library/bb246129(BTS.20).aspx.
    but when im process file , then file try hit partner url goes dyhradated state,then failed. then i got below error.
    The remote server returned an error: (500) Internal Server Error.
    please any help..
    Thanks

    500 server error could be due to anyone of the following reasons:
    Party configuration is wrong. Party properties/configurations have  to be discussed upfront with the source/destination system and have to be in-line with
    them.
    Certificates have to be deployed in correct folders based on      certificate types like private/public/signed etc.
    Firewall (or network components) has to be opened accordingly for parties(systems) to interact. This change has to be done at the both the levels, source and destination.
    If you receive it through HTTPReceive.dll (may uses this for AS2), you have to check its configurations.
    Also 500 error, could occur even if your BizTalk artifacts has not been configured/deployed/enabled properly.
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • "the remote server returned an error (400) bad request." can't able to upload file size 1 MB

    I cant able to upload the file size >1 MB its showing error."the remote server returned an error (400) bad request."
    any one kindly help to fix the issue.

    Hi,
    Are you trying thru OOB or how..
    Please check the "maximum file size for sharepoint".
    refer below links for the same.
    https://angler.wordpress.com/2012/03/21/increase-the-sharepoint-2010-upload-file-size-limit/
    https://msdn.microsoft.com/en-us/library/ff487972.aspx
    Don't forget to mark it as an Answer if it resolves your problem or Vote Me if it useful.
    Mahesh

  • Provider-hosted Apps debug error: The remote server returned an error: (401) unauthorised

    Hi,
    Any help appreciated!!
    I'm getting this error: "The remote server returned an error: (401) unauthorised when I debug a provider-hosted app.  I get the error on this line:  
    HttpWebResponse response = (HttpWebResponse)request.GetResponse();
    See code below
    I created a high trust development environment following the instructions provided here:
    http://msdn.microsoft.com/en-us/library/office/fp179901(v=office.15).aspx and
    http://msdn.microsoft.com/library/office/fp179923
    I created a provider-hosted app with the intent to:
    create a SharePoint list in the appweb
    Use self-signed certificate, tokenhepler.cs and sharepointcontext.cs to retrieve current user context and access on SharePoint.  (No changes were made to tokenhelper.cs and sharepointcontext.cs)
    retrieve list items from the SharePoint list in a button click event handler on a default.aspx of the remote web
    What happens:
    The app is deployed successfully to the Dev site
    The SharePoint feature is deployed and activated
    The default.aspx page of the remote web loads
    The error (see image) is returned on clicking of the button
    My environment is an on-premise SharePoint 2013 with AD and my dev box is standalone windows 8.1 running Visual Studio Professional 2013 Update 3.
    The code block below is a copy of the default.aspx code-behind
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using Microsoft.SharePoint.Client;
    using Microsoft.IdentityModel.S2S.Tokens;
    using System.Net;
    using System.IO;
    using System.Xml;
    using System.Data;
    using System.Xml.Linq;
    using System.Xml.XPath;
    namespace Idea.GeneratorWeb
    public partial class Default : System.Web.UI.Page
    SharePointContextToken contextToken;
    string accessToken;
    Uri sharepointUrl;
    protected void Page_PreInit(object sender, EventArgs e)
    Uri redirectUrl;
    switch (SharePointContextProvider.CheckRedirectionStatus(Context, out redirectUrl))
    case RedirectionStatus.Ok:
    return;
    case RedirectionStatus.ShouldRedirect:
    Response.Redirect(redirectUrl.AbsoluteUri, endResponse: true);
    break;
    case RedirectionStatus.CanNotRedirect:
    Response.Write("An error occurred while processing your request.");
    Response.End();
    break;
    protected void Page_Load(object sender, EventArgs e)
    //// The following code gets the client context and Title property by using TokenHelper.
    //// To access other properties, the app may need to request permissions on the host web.
    var spContext = SharePointContextProvider.Current.GetSharePointContext(Context);
    //var spContext = new ClientContext("MySPDevInstance");
    //spContext.Credentials = new NetworkCredential("username", "password");
    //using (var clientContext = spContext.CreateUserClientContextForSPHost())
    // clientContext.Load(clientContext.Web, web => web.Title);
    // clientContext.ExecuteQuery();
    // Response.Write(clientContext.Web.Title);
    string contextTokenString = TokenHelper.GetContextTokenFromRequest(Request);
    if (contextTokenString != null)
    // Get context token
    contextToken = TokenHelper.ReadAndValidateContextToken(contextTokenString, Request.Url.Authority);
    // Get access token
    sharepointUrl = new Uri(Request.QueryString["SPAppWebUrl"]);
    accessToken = TokenHelper.GetAccessToken(contextToken, sharepointUrl.Authority).AccessToken;
    // Pass the access token to the button event handler.
    Button1.CommandArgument = accessToken;
    protected void Button1_Click(object sender, EventArgs e)
    // Retrieve the access token that the Page_Load method stored
    // in the button's command argument.
    string accessToken = ((Button)sender).CommandArgument;
    if (IsPostBack)
    sharepointUrl = new Uri(Request.QueryString["SPAppWebUrl"]);
    // REST/OData URL section
    string oDataUrl = "/_api/Web/lists/getbytitle('Diagrams In Idea Generator')/items?$select=Title,Diagram,SharingStatus";
    // HTTP Request and Response construction section
    HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(sharepointUrl.ToString() + oDataUrl);
    request.Method = "GET";
    request.Accept = "application/atom+xml";
    request.ContentType = "application/atom+xml;type=entry";
    request.Headers.Add("Authorization", "Bearer " + accessToken);
    HttpWebResponse response = (HttpWebResponse)request.GetResponse();
    // Response markup parsing section
    XDocument oDataXML = XDocument.Load(response.GetResponseStream(), LoadOptions.None);
    XNamespace atom = "http://www.w3.org/2005/Atom";
    XNamespace d = "http://schemas.microsoft.com/ado/2007/08/dataservices";
    XNamespace m = "http://schemas.microsoft.com/ado/2007/08/dataservices/metadata";
    List<XElement> entries = oDataXML.Descendants(atom + "entry")
    .Elements(atom + "content")
    .Elements(m + "properties")
    .ToList();
    var entryFieldValues = from entry in entries
    select new
    Character = entry.Element(d + "Title").Value,
    Actor = entry.Element(d + "Diagram").Value,
    CastingStatus = entry.Element(d + "SharingStatus").Value
    GridView1.DataSource = entryFieldValues;
    GridView1.DataBind();
    Any ideas what I might be doing wrong

    Hi ,
    Use the below code
    Public string GetAccessToken(){
    string sharePointSiteUrlHost =  Page.Request["SPHostUrl"].Tostring();
    string AccessToken = tokenHelper.GetS2SAccessTokenWithWindowsIdentity(sharePointSiteUrlHost, Request.LogonUserIdentity);
    return accessToken;
    Than initialize the ClientCOntext with the below Method
     private static ClientContext GetClientContextWithAccessTokenString(string targetUrl, object accessToken)
                ClientContext clientContext = new ClientContext(targetUrl);
                clientContext.AuthenticationMode = ClientAuthenticationMode.Anonymous;
                clientContext.FormDigestHandlingEnabled = false;
                clientContext.ExecutingWebRequest +=
                    delegate(object oSender, WebRequestEventArgs webRequestEventArgs)
                        webRequestEventArgs.WebRequestExecutor.WebRequest.UserAgent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)";
                        webRequestEventArgs.WebRequestExecutor.RequestHeaders["Authorization"] =
                            "Bearer " + accessToken;
                return clientContext;
    use this clientCOntext and it will work.
    Do not use
    SharePointContextProvider
    Whenever you see a reply and if you think is helpful,Vote As Helpful! And whenever you see a reply being an answer to the question of the thread, click Mark As Answer

  • The remote server returned an error :(401) unauthorized in Provider hosted app deployment

    Hi,
    We are trying to deploy the provider hosted app in server environment . we are getting the "The remote server returned an error :(401) unauthorized" error after deploy the app in server.
    stack Trace:
    [webException:Te remote server returned an error:(401) UnAuthorized.]
    System.Net.HeepWebRequest.GetResponse().
    Followed the same MSDN steps , but sill same error. We have attached the certificate and using the same issuer ID in the app web.config.
    Verified the IIS setting and still getting the same error when we call the "Clientcontext.ExecuteQuery()" method.
    Same code is working fine in my Local dev environment.
    If anyone have idea about this issue, please let me know.
    Thank you,
    Mylsamy

    Hi ,Thank you for your response. We have tried all the options and everything is same (Client ID,Issuer ID...etc) and finally figured out the issue.The below link saved my day.http://msdn.microsoft.com/en-us/library/office/dn762439(v=office.15).aspxIn "TokenHelper.cs" GetRealmFromTargetUrl method always return null andWhen we analyze the issue we found some variable name assigned for "Realm" Instead of GUID in SP server.Power shell command to get the Realm in SP server:  Get-SPAuthenticationRealmWe have followed below article to generate the new GUID for realm.http://technet.microsoft.com/en-us/library/jj219756(v=office.15).aspx$c =Get-SPServiceContext -Site "http://<websiteurl>"Set-SPAuthenticationRealm -ServiceContext $c -Realm "a686d436-9f16-42db-09b7-cb578e110ccd".
    Thankyou,Mylsamy

  • BizTalk to Web Service - Error - The remote server returned an error: (403) Forbidden.

    Hi Everyone,
    I am connecting to an external web service from my biztalk application through a dynamic send port.
    When my biztalk application is trying to send the request message to the web service through the send port, I am getting the following error :
    The remote server returned an error: (403) Forbidden. 
    The external web service team have provided a certificate and a private key to install in my server. 
    I have installed the certificate by double click the .pfx file using the private key and have added the certificate in the host ProcessHostx64. 
    Still i am getting the same error.
    Can someone help on this issue ?
    Many Thanks,
    Anand
    S B A

    The Private Key should be installed under the user running the BizTalk Server Host. Please confirm that you have done this?
    If so, try to make this work in a small .NET test Application before porting it to BizTalk, so that you can confirm that you do have sufficient credentials to call the Service.
    Morten la Cour

  • ASMX web service and The remote server returned an error: (500) Internal Server Error issue

    i have developed a very small web service and which is hosted along with our web site. our webservice url is
    http://www.bba-reman.com/Search/SearchDataIndex.asmx
    web service code
    namespace WebSearchIndex
    #region SearchDataIndex
    /// <summary>
    /// SearchDataIndex is web service which will call function exist in another library for part data indexing
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
    // [System.Web.Script.Services.ScriptService]
    public class SearchDataIndex : System.Web.Services.WebService
    //public AuthHeader ServiceAuth=null;
    public class AuthHeader : SoapHeader
    public string Username;
    public string Password;
    #region StartIndex
    /// <summary>
    /// this function will invoke CreateIndex function of SiteSearch module to reindex the data
    /// </summary>
    [WebMethod]
    public string StartIndex(AuthHeader auth)
    string strRetVal = "";
    if (auth.Username == "Admin" && auth.Password == "Admin")
    strRetVal = SiteSearch.CreateIndex(false);
    else
    SoapException se = new SoapException("Failed : Invalid credentials",
    SoapException.ClientFaultCode,Context.Request.Url.AbsoluteUri,new Exception("Invalid credentials"));
    throw se;
    return strRetVal;
    #endregion
    #endregion
    when i was calling that web service from my win apps using
    HttpWebRequest
    class then getting error The remote server returned an error: (500) Internal Server Error
    here is code of my win apps from where i am calling web service
    string strXml = "";
    strXml = "<s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'><s:Body><StartIndex xmlns='http://tempuri.org/' xmlns:i='http://www.w3.org/2001/XMLSchema-instance'><auth><Username>joy</Username><Password>joy</Password></auth></StartIndex></s:Body></s:Envelope>";
    string url = "http://www.bba-reman.com/Search/SearchDataIndex.asmx";
    HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
    req.Method = "POST";
    req.ContentType = "text/xml";
    req.KeepAlive = false;
    req.ContentLength = strXml.Length;
    StreamWriter streamOut = new StreamWriter(req.GetRequestStream(), System.Text.Encoding.ASCII);
    streamOut.Write(strXml);
    streamOut.Close();
    StreamReader streamIn = new StreamReader(req.GetResponse().GetResponseStream());
    string strResponse = streamIn.ReadToEnd();
    streamIn.Close();
    i am just not being able to understand when this line execute
    StreamReader streamIn = new StreamReader(req.GetResponse().GetResponseStream());
    then getting the error The remote server returned an error: (500) Internal Server Error
    not being able to understand where i made the mistake. mistake is in the code of web service end or in calling code?
    help me to fix this issue. thanks

    Hi Mou,
    I just tried your win app code about calling web service, but failed. I got the 500 error after I called your service:
    The error message I quoted from Fiddler:
    <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>System.Web.Services.Protocols.SoapException: Failed : Invalid credentials ---&gt; System.Exception: Invalid credentials
    --- End of inner exception stack trace ---
    at BBAReman.WebSearchIndex.SearchDataIndex.StartIndex(AuthHeader auth)</faultstring><faultactor>http://www.bba-reman.com/Search/SearchDataIndex.asmx</faultactor><detail /></soap:Fault></soap:Body></soap:Envelope>
    I am not totally sure that error occurred by the authentication. But I suggest you can try to add this service into your project using this method below:
    1.right click the Reference and select Add Service Reference
    2.input your service link and click "Go"
    And you can use this service as the following:
    private async void callService()
    ServiceReference1.SearchDataIndexSoapClient client =new ServiceReference1.SearchDataIndexSoapClient();
    var Str= await client.StartIndexAsync(new ServiceReference1.AuthHeader { Username = "Admin", Password = "Admin" });
    Please try it.
    Regards,
    Will
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • The remote server returned an error: (401) Unauthorized. IIS problem? (Beginner)

    (Beginner) Creating a Provider-hosted calendar list programmatically.
    I have done this:
    Uri hostWeb = new Uri(Request.QueryString["SPHostUrl"]);
    using (var clientContext = TokenHelper.GetS2SClientContextWithWindowsIdentity(hostWeb, Request.LogonUserIdentity))
    Web web = clientContext.Web;
    ListCreationInformation listCreator = new ListCreationInformation();
    listCreator.Title = "CompanyCalendar";
    listCreator.Description = "Workcalendar";
    listCreator.TemplateType = (int)ListTemplateType.GanttTasks; //106 = events 120=CustomGrid 140=WorkflowHistory 150=GanttTasks
    web.Lists.Add(listCreator);
    clientContext.ExecuteQuery();
    If I remove the code above there are no problems, as the title says there is something wrong with my permission to modify but I have set the wevb permission to "Full control" so it should be something else.
    Some people thinks that it has to do with IIS so I tried to set the servers authorization rules to allow all users but that didnt do it (maybe I didn't do it right).
    Im a beginner so please explain as you would for a absolute beginner that dont know IIS.How can I solv this problem, why doesent I get permission to create a list on my sharepointsite?
    thanks

    Hi,
    Check if the below article helps you
    http://sharepoint.stackexchange.com/questions/76624/the-remote-server-returned-an-error-401-unauthorized-provider-hosted-app
    http://jamestsai.net/Blog/post/SharePoint-Provider-Hosted-App-401-Unauthorized-error-on-clientContextExecuteQuery().aspx
    http://blog.dbandbi.com/tag/sharepoint-provider-hosted-app-the-remote-server-returned-an-error-401-unauthorized/
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • The remote server returned an error: (503) Server Unavailable In SharePoint 2010.

    I created a web app with claims based authentication ,
    basiclly i follwe this blog
    http://donalconlon.wordpress.com/2010/02/23/configuring-forms-base-authentication-for-sharepoint-2010-using-iis7/
    but when i login it throws 503 error
    Server Error in '/' Application.
    The remote server returned an error: (503) Server Unavailable.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    Exception Details: System.Net.WebException: The remote server returned an error: (503) Server Unavailable.
    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    Stack Trace:
    [WebException: The remote server returned an error: (503) Server Unavailable.]
    System.Net.HttpWebRequest.GetResponse() +1126
    System.ServiceModel.Channels.HttpChannelRequest.WaitForReply(TimeSpan timeout) +81
    [ServerTooBusyException: The HTTP service located at http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc is too busy. ]
    System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +10258154
    System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +539
    Microsoft.IdentityModel.Protocols.WSTrust.IWSTrustContract.Issue(Message message) +0
    Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.Issue(RequestSecurityToken rst, RequestSecurityTokenResponse& rstr) +61
    Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.Issue(RequestSecurityToken rst) +36
    Microsoft.SharePoint.SPSecurityContext.SecurityTokenForContext(Uri context, Boolean bearerToken, SecurityToken onBehalfOf, SecurityToken actAs, SecurityToken delegateTo) +26062081
    Microsoft.SharePoint.SPSecurityContext.SecurityTokenForLegacyLogin() +270
    Microsoft.SharePoint.IdentityModel.SPWindowsClaimsAuthenticationHttpModule.GetSecurityTokenFromWindowsIdentity(WindowsIdentity windowsIdentity, HttpContext httpContext) +21
    Microsoft.SharePoint.IdentityModel.SPWindowsClaimsAuthenticationHttpModule.AuthenticateRequest(Object sender, EventArgs e) +1176
    System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171
    any thoughts?
    thanks in advance!
    Share Knowledge and Spread Love!

    Hi ,
    I was also facing the same issue on changing my credentials. This effects the ServiceTokenApplicationPool and other pools related to the Web applications
    To resolve this  follow these :
    1. Open IIS Manager , under Connection section you can see the Name of your site collection(as
    siteCollectionName(Username))
    2. Open SiteCollection , select Application Pools. A new window with your Web application pool names would open.
    3. Right click on web app, select Advance Setting... , under Process Model select Identity 
    4. check for Custom account , click set and enter your Credentials and click
    OK
    Atlast Refresh the IIS manager.
    Thank you.
    Under application pools Do select the ServiceTokenApplicationPool  also and follow steps 3 and 4

Maybe you are looking for

  • Reservation issue

    Dear all, When I create reservation using T. code MB21 & Mov. Type: 202  we use to enter input parameter  Material, Quantity in , UnE, plant , SLoc & Batch number. But here I have have been facing one problem which is created due to acceptance of any

  • After 10.6.7 can't get desktop background to display

    This problem is similar to Linc Davis problem solved in this thread: https://discussions.apple.com/thread/2795229 In that thread I write: "I tried the [] from Linc Davis and it didn't work for me. I have a MBP bought in may 2010 i Sweden which is whe

  • Please help with this query!

    Hi All, I have this this table: Term Grade term_A A term_A A term_A B term_A B term_B D term_B F term_B F term_C C How do I display so that it appears this way? term_A A 2 term_A B 2 term_B D 1 term_B F 2 term_C C 1 Thank you. Appreciate all the help

  • How to randomize the elements in an array!!

    Hi, If i have an array, with say 50 integers which may be in some kind of order, is there a special method which could randomize these numbers for me? If not does anyone know of an algorithm which could do this? Many thanks Cath

  • How NOT to sync game saves between devices?

    Hi there, I haven't been able to find out how NOT to automatically sync game saves between devices. I own both an iPhone 4 and an iPhone 5 and I do not want my progress in video games to be synchronized between the devices. There are no in-app settin