locked
WCF ProjectServer.svc - http service is unavailable RRS feed

  • Question

  • hello forum users,

    I had a WCF console application that was updating custom fields for project working fine until yesterday. I believe the server may had some updates installed. Now i am getting the following error and don't know how to fix it. Please help!

    Error: The HTTP service located at htpp: servername/pwa/_vti_bin/PSI/ProjectServer.svc is unavailable. This could be because the service is too busy or because no endpoint was found listening at the specified address. Please ensure that the address is correct and try accessing the service again later.

    I believe the it maybe timing out when looping through resources:                           

    foreach (SvcResource.ResourceDataSet.ResourcesRow row in resourceDs.Resources.Rows)
                {

                    object value = row["WRES_ACCOUNT"];

                    if (row.RES_IS_WINDOWS_USER == true)
                    {
                        if (value != DBNull.Value)
                        {

                            if (row.WRES_ACCOUNT.Replace(junk, "").Trim() == UserName)
                            {
                                return row.RES_UID;
                            }
                        }
                        else
                        {

                        }
                    }


                }

    here is the binding code: 

     const int MAXSIZE = 500000000;
                const string svcRouter = "_vti_bin/PSI/ProjectServer.svc";

                pwaUrl = pwaUri.Scheme + Uri.SchemeDelimiter + pwaUri.Host + ":"
                    + pwaUri.Port + pwaUri.AbsolutePath;
                Console.WriteLine("URL: {0}", pwaUrl);  if (pwaUri.Scheme.Equals(Uri.UriSchemeHttps))
                {
                    // Create binding for HTTPS.
                    binding = new BasicHttpBinding(BasicHttpSecurityMode.Transport);
                }
                else
                {
                    // Create binding for HTTP.
                    binding = new BasicHttpBinding(BasicHttpSecurityMode.TransportCredentialOnly);
                }

                binding.Name = "basicHttpConf";
                binding.SendTimeout = TimeSpan.MaxValue; binding.MaxReceivedMessageSize = MAXSIZE;
                binding.ReaderQuotas.MaxNameTableCharCount = MAXSIZE;
                binding.MessageEncoding = WSMessageEncoding.Text;
                binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Ntlm;

                // The endpoint address is the ProjectServer.svc router for all public PSI calls.
                EndpointAddress address = new EndpointAddress(pwaUrl + svcRouter);


    tatiana



    Monday, September 22, 2014 5:23 PM

Answers

  • Hello,

    That error message has many potential causes, in particular if you had it working previously and now after an update / reboot it has stopped then I would check the following (perhaps before looking too far into the code):

    • Manually try connecting to PWA from the server console, an unexpected password failure may indicate one of the following;
    • URL used / hostheader / alternate access mapping configuration
    • Local loopback configuration 
    • Local firewall, DNS, etc

    Some of those can be updated by server policy and or windows updates so in this case it's worth double checking the obvious.

    As for your code, that looks fine from a cursory glance, but if you suspect a timeout due to too many items, then does it work if you break from the loop after the first one?

    Hope that helps,


    Martin Laukkanen <br/> Nearbaseline blog - <a href="http://www.nearbaseline.com/blog">nearbaseline.com/blog</a><br/> Bulk Edit and other Apps - <a href="http://www.nearbaseline.com/apps">nearbaseline.com/apps</a>

    Tuesday, September 30, 2014 3:22 PM
  • thanks Martin.

    This error stopped after I added a resource filter. I think the web service was timing out because of the volume of resources. 


    tatiana

    Tuesday, September 30, 2014 9:11 PM

All replies

  • Hello,

    That error message has many potential causes, in particular if you had it working previously and now after an update / reboot it has stopped then I would check the following (perhaps before looking too far into the code):

    • Manually try connecting to PWA from the server console, an unexpected password failure may indicate one of the following;
    • URL used / hostheader / alternate access mapping configuration
    • Local loopback configuration 
    • Local firewall, DNS, etc

    Some of those can be updated by server policy and or windows updates so in this case it's worth double checking the obvious.

    As for your code, that looks fine from a cursory glance, but if you suspect a timeout due to too many items, then does it work if you break from the loop after the first one?

    Hope that helps,


    Martin Laukkanen <br/> Nearbaseline blog - <a href="http://www.nearbaseline.com/blog">nearbaseline.com/blog</a><br/> Bulk Edit and other Apps - <a href="http://www.nearbaseline.com/apps">nearbaseline.com/apps</a>

    Tuesday, September 30, 2014 3:22 PM
  • thanks Martin.

    This error stopped after I added a resource filter. I think the web service was timing out because of the volume of resources. 


    tatiana

    Tuesday, September 30, 2014 9:11 PM