The remote server returned an error: (403) Forbidden on container.CreateIfNotExistsAsync() method

static class StorageUtils
        public static CloudStorageAccount StorageAccount
            get
                string account = ConfigurationManager.AppSettings["StorageAccountName"];
                //string account = CloudConfigurationManager.GetSetting("StorageAccountName");
                //string key = CloudConfigurationManager.GetSetting("StorageAccountAccessKey");
                string key = ConfigurationManager.AppSettings["StorageAccountName"];
                string connectionString = String.Format("DefaultEndpointsProtocol=https;AccountName={0};AccountKey={1}", account, key);
                return CloudStorageAccount.Parse(connectionString);
I have a web project and I converted it to "MS Azure Cloud Service Project"
I make the Azure project default and run CreateAndConfigureAsync() to create the container. It works fine and creates the images container in Azure storage.
Then I make my web project default and change CloudConfigurationManager.GetSetting to ConfigurationManager.AppSettings in StorageUtils class and run the web app project. Then I get "The remote server returned an error: (403) Forbidden" error whencontainer.CreateIfNotExistsAsync()
line get executed.
What is the reason for this?
async public void CreateAndConfigureAsync()
            try
                CloudStorageAccount storageAccount = StorageUtils.StorageAccount;
                // Create a blob client and retrieve reference to images container
                CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
                CloudBlobContainer container = blobClient.GetContainerReference("images");
                // Create the "images" container if it doesn't already exist.
                if (await container.CreateIfNotExistsAsync())
                    // Enable public access on the newly created "images" container
                    await container.SetPermissionsAsync(
                        new BlobContainerPermissions
                            PublicAccess =
                                BlobContainerPublicAccessType.Blob
            catch (Exception ex)
        }

Hi,
It seems there is something wrong with your code, from your code the account and key are the same, because their appsetting name are the same.
string account = ConfigurationManager.AppSettings["StorageAccountName"];
//string account = CloudConfigurationManager.GetSetting("StorageAccountName");
//string key = CloudConfigurationManager.GetSetting("StorageAccountAccessKey");
string key = ConfigurationManager.AppSettings["StorageAccountName"];
string connectionString = String.Format("DefaultEndpointsProtocol=https;AccountName={0};AccountKey={1}", account, key);
return CloudStorageAccount.Parse(connectionString);
If you use CloudConfigurationManager.GetSetting, please consider set azure project as the startup project, if not, this value will be null, this resulted in solution being started as a web project that didn't run inside the Azure emulator. Since CloudConfigurationManager.GetSetting
tries to get setting by contacting Azure (or Azure emulator in this case), and it is not running, it returns null.
Best Regards,
Jambor
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.

Similar Messages

  • Return The remote server returned an error: (403) Forbidden error for some file types

    hi
    am using below code to get the byte array 
    byte[] myDataBuffer = client.DownloadData((new Uri(sourceUrl)));
    for source of type .txt/.jpg no problem with accessing.but the file type with .master/.wsp/.cs
    it is returning "The remote server returned an error: (403) Forbidden error for some file types" Error.how can i get rid of this.please help me
    Thanks in Advance

    Hi,
    It seems there is something wrong with your code, from your code the account and key are the same, because their appsetting name are the same.
    string account = ConfigurationManager.AppSettings["StorageAccountName"];
    //string account = CloudConfigurationManager.GetSetting("StorageAccountName");
    //string key = CloudConfigurationManager.GetSetting("StorageAccountAccessKey");
    string key = ConfigurationManager.AppSettings["StorageAccountName"];
    string connectionString = String.Format("DefaultEndpointsProtocol=https;AccountName={0};AccountKey={1}", account, key);
    return CloudStorageAccount.Parse(connectionString);
    If you use CloudConfigurationManager.GetSetting, please consider set azure project as the startup project, if not, this value will be null, this resulted in solution being started as a web project that didn't run inside the Azure emulator. Since CloudConfigurationManager.GetSetting
    tries to get setting by contacting Azure (or Azure emulator in this case), and it is not running, it returns null.
    Best Regards,
    Jambor
    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.

  • 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

  • When using the OData Source I receive error "The remote server returned an error: (403) Forbidden. (System)"

    I get this error once I click the "Test Connection" button in the OData Connection manager. I am working against an O365 SharePoint List. I will add that I have this working just fine when running it from my Windows 8 workstation using Visual Studio
    2013.
    On my Windows 2012 R2 Server, using Visual Studio 2013 is wen I encounter the error so I know I have the connection settings correct.  I am going against the same SP list using the same credentials.  The only difference is when running on Server
    2012 vs. Winodws 8 workstation.  I don't know if there are some other security settings that need to be applied.
    I will also add that I can access on premise list successfully,  I am only having this issue with O365 List.
    Any help would be appreciated.  Thanks.
    Jim

    It might be due to the “Microsoft Online Services Authentication” NOT set to true.
    See
    http://whitepages.unlimitedviz.com/2014/03/using-the-odata-source-connector-with-sharepoint-online-authentication/
    Arthur
    MyBlog
    Twitter

  • Power BI analysis services connector - the remote server returned an error (403)

    Hi all, does any one have any suggestions what to try to identify the configuration problem I have?
    I have, a SSAS 2012 tabular instance with SP2, there is a database on the instance with a read role with everyone assigned permissions. 
    When configuring the Power BI analysis services connector, at the point where you enter Friendly Name, Description and Friendly error message, when you click next I receive the error "The remote server returned an error (403)." 
    I've tested connecting to the database from Excel on a desktop and connect fine.
    I don't use a "onmicrosoft" account so don't have that problem to deal with.
    We use Power BI Pro with our Office 365. As far as I can tell that part is working ok as I pass that stage of the configuration with a message saying connected to Power BI.
    The connector is installed on the same server as tabular services, its a Win2012 Standard server. The tabular instance is running a domain account that is the admin account for the instance (this is a dev environment) that account is what I've used in the
    connector configuration. It's also a local admin account. There is no gateway installed on the server.
    Any help would be greatly appreciated, thanks, Brian
    Brian Searle

    Brian-
    One other common issue I've seen is the UPN not quite matching. Log onto the SSAS server as the user who's logged into Power BI. Then open a command prompt and run:
    whoami /upn
    Hopefully the UPN it says will match your EffectiveUserName test and will match exactly how you're signing into the Power BI site.
    If that doesn't work, your best bet is to go to
    http://support.powerbi.com/ and click Contact Support and describe this situation and someone from the Power BI support team should get in touch with you to troubleshoot.
    http://artisconsulting.com/Blogs/GregGalloway

  • Error while executing script for sharepoint online (office 365) - the remote server returned an error: (503) server unavailable

    error while executing script for sharepoint online (office 365) - the remote server returned an error: (503) server unavailable.
    I am creating many site collections reading records from sharepoint list using powershell in sharepoint online tenant (office 365).
    Few site collections are created and then getting above error so this error record will be skipped then few succeeding record processed then again getting error.
    pattern is like:
    success
    success
    success
    success
    Error
    success
    success
    success
    success
    success
    success
    error
    success

    Hi,
    As it is an online environment, to troubleshoot this issue in an easier way, I suggest you contact Office 365 Support to see if there is any useful information in
    the log files in the server side:
    https://support.office.com/en-us/article/Contact-Office-365-for-business-support-32a17ca7-6fa0-4870-8a8d-e25ba4ccfd4b?ui=en-US&rs=en-US&ad=US
    Best regards
    Patrick Liang
    TechNet Community Support

  • 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

  • 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]

  • Error: Load operation failed for query 'GetAuthenticationInfo'. The remote server returned an error: NotFound.

    Hello,
    I have a lightswitch web-application in development, which I need to copy from one computer to the other. I have tried doing it both through Git and by simply copying the solution and opening the project on another machine. The project builds without errors,
    but when I try to debug it, it opens a web-browser, loads to 100% and pops up an error - Load operation failed for query 'GetAuthenticationInfo'. The remote server returned an error: NotFound.
    Now, I have tried repairing Visual Studio on my machine, reinstalling .NET framework and setting  <basicAuthentication enabled="false" /> in web.config, yet it still does not run.
    When using Fiddler, it shows an error while loading the application - "HTTP/1.1 500 Internal Server Error" , which I honestly don't know what it means.
    The application uses ComponentOne and Telerik modules, but they are both installed on both machines. 
    The application does run perfectly on the original machine, but it is not working on any other one.
    Both machines are using Win 8.1 and Visual Studio 2013 Update 4.
    I have tried to look this up online, but most people's problem are when they are deploying the app, not just debugging. I would be really happy for any help with this issue.
    Thanks!

    I have the same problem on one of my development machines. Whenever I create a new project, the System.IdentityModel.Tokens.Jwt nuget package is not referenced properly. The project compiles correctly but you are not able to debug as I get the same error
    as you.
    If you open up your references and there is an error next to any of your references make sure that you correct them. In the case of the jwt reference error, I have to remove the jwt reference and then add it back from the packages folder.
    This may not be your problem but could point you in a direction?

  • The remote server returned an error: (401) Unauthorized

    We are attempting to upload a file to SharePoint on Office 365 and get the following error:
    The remote server returned an error: (401) Unauthorized.
    We also tried using NetworkCredentials and that got the following error: The remote server returned an error: (404) Not Found.
    The code is shown below.
    Any idea on to fix this error?
    public
    void uploadDocument(string
    siteurl, string username,
    SecureString securepassword,
    string domain,
    string filestreamPath =
    "NewDocument.docx",
    string serverRelativeUrl =
    "/Shared Documents/NewDocument.docx")
    ClientContext context =
    new
    ClientContext(siteurl);
            //context.Credentials = new NetworkCredential(username, securepassword, domain);
    context.Credentials = new
    SharePointOnlineCredentials(username, securepassword);
    using (FileStream
    fileStream =
    new
    FileStream(filestreamPath,
    FileMode.Open))
    ClientOM.File.SaveBinaryDirect(context,
    serverRelativeUrl, fileStream, true);

    Yes, it has access.  In fact, it has no problem getting the site properties using the code below.  It is just when I am uploading a file that the error occurs.
    public Web getProperties(string
    siteurl, string username,
    SecureString securepassword)
    Web web = null;
    // Starting with ClientContext, the constructor requires a URL to the
    // server running SharePoint.
    ClientContext context = new ClientContext(siteurl);
    // The SharePoint web at the URL.
    web = context.Web;
    // We want to retrieve the web's properties.
    context.Load(web);
    // Execute the query to the server.
    context.Credentials = new SharePointOnlineCredentials(username, securepassword);
    context.ExecuteQuery();
    return web;

  • Powershell Error for SharePoint Online -"The remote server returned an error: (407) Proxy Authentication Required."

    I am trying to call sharepoint online from powershell. Below is the code. I get 
    Exception calling "ExecuteQuery" with "0" argument(s): "The remote server returned an error: (407) Proxy Authentication Required."
    $loadInfo1 = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client")
    $loadInfo2 = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.Runtime")
    $webUrl = "ZZZZ"
    $username = "XXX"
    $password = "YYYY"
    $ctx = New-Object Microsoft.SharePoint.Client.ClientContext($webUrl) 
    $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $password)
    $web = $ctx.Web
    $lists = $web.Lists 
    $ctx.Load($lists)
    $ctx.ExecuteQuery()
    $lists| select -Property Title
    Raj-Shpt

    Hi,
    About how to access SharePoint online site using PowerShell, the blog below would be helpful:
    http://social.technet.microsoft.com/wiki/contents/articles/29518.csom-sharepoint-powershell-reference-and-example-codes.aspx
    Another two demos for your reference:
    http://www.hartsteve.com/2013/06/sharepoint-online-powershell/
    http://www.sharepointnutsandbolts.com/2013/12/Using-CSOM-in-PowerShell-scripts-with-Office365.html
    Thanks
    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]

  • SharePoint List Error :[DataSource.Error] SharePoint: Request failed: The remote server returned an error: (500) Internal Server Error. (An error occurred while processing this request.)

    When I connect to the SharePoint site that contains the lists I need to build my query from , Power Query enumerates the list and displays them in the tool. I can click on the system tables and view the records but any table
    in the list I created returns this  error.
    I can connect fine with InfoPath
    [DataSource.Error] SharePoint:   Request failed: The remote server returned an error: (500) Internal Server   Error. (An error occurred while processing this request.)
    thank you for your help
    Andrew
     

    Hi Andrew. In order for us diagnose this issue, you'll need to capture some network traces using a tool such as Fiddler and share them by sending a Frown.
    To capture a trace using Fiddler, start Fiddler, enable the Tools > Fiddler Options > HTTPS > Decrypt HTTPS traffic option, start the capture, reproduce your issue, then stop and save the capture. You can find more information here.
    Once you've done that, please send a Frown through the Power Query ribbon and attach the traces.
    Thanks,
    Ehren

  • The remote server returned an error: (503) Server Unavailable in search service

    Hi
    I got this error message: when applying toplogy to search service
    I am applying admin component : SPINDEX Server
    crawl component-0 to : same index server spindex server
    in sharepoint farm has
    1 applicationserver
    1 index server
    1 wfe server
    1 db server
    I prepared like this try to configure search service on index server
    Microsoft.Office.Server.Search.Administration.SearchConfigWizard+SearchConfigWizardException: Topology provisioning failed due to an error.Object reference not set to an instance of an object. at Microsoft.Office.Server.Search.Administration.SearchConfigWizard.WaitForTopologyTimerJobToFinish()
    at Microsoft.Office.Server.Search.Administration.SearchConfigWizard.UpdateSearchApp() at Microsoft.Office.Server.Search.Administration.SearchConfigWizard.ProvisionSearchServiceApplication() at Microsoft.Office.Server.Search.Administration.SearchConfigurationJobDefinition.ExecuteTimerJob()
    in the event viewer I get this error
    Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance (e8ab042b-f884-4957-b328-631ba8bcb4a1).
    Reason: The remote server returned an error: (503) Server Unavailable.
    Technical Support Details:
    System.Net.WebException: The remote server returned an error: (503) Server Unavailable.
       at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.Synchronize()
       at Microsoft.Office.Server.Administration.ApplicationServerJob.ProvisionLocalSharedServiceInstances(Boolean isAdministrationServiceJob)
    adil

    Hi
    when  i set  crawl component,administration component to local computer  search service working properly
    but when i scale out search service application
    change above components  to diffrent server i get following error
    Errors were encountered during the
    configuration of the Search Service Application.
    Microsoft.Office.Server.Search.Administration.SearchConfigWizard+SearchConfigWizardException:
    Topology provisioning failed due to an error.Object reference not set to an
    instance of an object. at
    Microsoft.Office.Server.Search.Administration.SearchConfigWizard.WaitForTopologyTimerJobToFinish()
    at
    Microsoft.Office.Server.Search.Administration.SearchConfigWizard.UpdateSearchApp()
    at
    Microsoft.Office.Server.Search.Administration.SearchConfigWizard.ProvisionSearchServiceApplication()
    at
    Microsoft.Office.Server.Search.Administration.SearchConfigurationJobDefinition.ExecuteTimerJob()
    3/23/2014
    10:32:20 AM
    and in event viewer
    Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance (e8ab042b-f884-4957-b328-631ba8bcb4a1).
    Reason: The remote server returned an error: (503) Server Unavailable.
    Technical Support Details:
    System.Net.WebException: The remote server returned an error: (503) Server Unavailable.
       at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.Synchronize()
       at Microsoft.Office.Server.Administration.ApplicationServerJob.ProvisionLocalSharedServiceInstances(Boolean isAdministrationServiceJob)
    adil

  • 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: (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