Click here to Skip to main content
15,886,018 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I am fairly new to Project server on MS-Project 2010.
I am asked to use the basic web service to get the list of projects on MS-Project 2010 using the web services provided by MS-Project. I have included the web references to Project service and Login windows web service in the web application.

I am getting the following error:
"Unhandled communication fault occured"

I have written the following code:

C#
try
            {
                string url = "http://sharepoint.xxx.com";

                ProjectService.Project p = new SharepointProjectTest1.ProjectService.Project();
                p.Url = url + "/_vti_bin/psi/Project.asmx";
                p.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;


                //Access the out of box LoginWindows web servcie   
                LoginWindowsService.LoginWindows loginWindows = new LoginWindowsService.LoginWindows();
                loginWindows.Url = url + "/_vti_bin/psi/LoginWindows.asmx";
                loginWindows.Credentials = System.Net.CredentialCache.DefaultCredentials;

                loginWindows.CookieContainer = new System.Net.CookieContainer();
                p.CookieContainer = loginWindows.CookieContainer;
                ProjectService.ProjectDataSet pjDataSet = p.ReadProjectList();
                
            }
                
            catch (System.Web.Services.Protocols.SoapException exx)
            {
                string StrException = exx.ToString();
                Response.Write(StrException);
            }
            catch (Exception ex)
            {

            }


Any help would be greatly appreciated.

Thanks.

Regards,
Nayan
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900