none
How to add Missing assemblt refrences RRS feed

  • Question

  • Hi All,

    I am deploy a web application using visual studio-2010 and add web references like-http://devastro/pwa/_vti_bin/PSI/project.asmx?wsdl .All solution is  ....

    using System.Web;

    using System.Web.UI;

    using System.Web.UI.WebControls;

    using System.Net;

    using System.Web.Services.Protocols;

    using MyProject;

    using System.Web.Services;

    using System.IO;

    using PSLibrary = Microsoft.Office.Project.Server.Library;

     

    namespace MyProject

    {

        publicpartialclass_Default: System.Web.UI.Page

        {

            protectedvoidPage_Load(objectsender, EventArgse)

            {

     

            }

     

            protectedvoidButton1_Click(objectsender, EventArgse)

            {

                svcproject.Projects1 = newsvcproject.Project();

                svcproject.ProjectDataSetps = newsvcproject.ProjectDataSet();

                svcproject.Url = "http://devastro/pwa/_vti_bin/psi/Project.asmx";

                svcproject.Credentials = CredentialCache.DefaultCredentials;

                boolautoCheckOut = false;

                ps = svcproject.ReadProjectList();

                this.GridView1.DataSource = ps;

     

            }

        }

    }

    give some error...

     Error    1    The type or namespace name 'Url' does not exist in the namespace 'MyProject.svcproject' (are you missing an assembly reference?)    C:\Users\administrator.TEST\documents\visual studio 2010\Projects\MyProject\MyProject\Default.aspx.cs    27    24    MyProject
    Error    2    The type or namespace name 'Credentials' does not exist in the namespace 'MyProject.svcproject' (are you missing an assembly reference?)    C:\Users\administrator.TEST\documents\visual studio 2010\Projects\MyProject\MyProject\Default.aspx.cs    28    24    MyProject
    Error    3    The type or namespace name 'ReadProjectList' does not exist in the namespace 'MyProject.svcproject' (are you missing an assembly reference?)    C:\Users\administrator.TEST\documents\visual studio 2010\Projects\MyProject\MyProject\Default.aspx.cs    30    29    MyProject

    How to add some missing assembly refrences in Myproject...

    Please help...


    Neeraj

    Thursday, March 22, 2012 10:06 AM

All replies

  • Neeraj,

    You are using the "_vti_bin/psi/project.asmx" which is the asmx based code. the serviec reference you added is Web reference. You can call the web reference instead.

    http://msdn.microsoft.com/en-us/library/websvcproject.project.readprojectlist_di_pj14mref.aspx

    Prerequisites of ASMX based code:
    http://msdn.microsoft.com/en-us/library/aa568853.aspx


    Thanks, Amit Khare |EPM Consultant| Blog: http://amitkhare82.blogspot.com http://www.linkedin.com/in/amitkhare82

    Friday, March 23, 2012 6:48 AM
  • Hi Amit,

    Thanks your replay..

    I am again some changes in previous code and run application give some error again.. 

    using

    System;

    using

    System.Collections.Generic;

    using

    System.Linq;

    using

    System.Web;

    using

    System.Web.UI;

    using

    System.Web.UI.WebControls;

    using

    System.Net;

    using

    System.Web.Services.Protocols;

    using

    MyProject;

    using

    System.Web.Services;

    using

    System.IO;

    using

    PSLibrary = Microsoft.Office.Project.Server.Library;

    namespace

    MyProject

    {

    public partial class _Default : System.Web.UI.Page

    {

    protected void Page_Load(object sender, EventArgs e)

    {

    }

    protected void Button1_Click(object sender, EventArgs e)

    {

    svcproject.

    Project s1 = new svcproject.Project();

    svcproject.

    ProjectDataSet ps = new svcproject.ProjectDataSet();

    // svcproject.Url = "http://devastro/pwa/_vti_bin/psi/Project.asmx";

    //svcproject.Credentials = CredentialCache.DefaultCredentials;

    s1.Url =

    "http://devastro/pwa/_vti_bin/psi/Project.asmx";

    s1.Credentials =

    CredentialCache.DefaultCredentials;

    bool autoCheckOut = false;

    ps = s1.ReadProjectList();

    // ps = svcproject.ReadProjectList();

    this.GridView1.DataSource = ps;

    }

    }

    }

    Description: https://mail.google.com/mail/images/cleardot.gif


    Neeraj

    Monday, March 26, 2012 7:07 AM
  • What's your target platform? x86? Be sure to select "Any CPU".
    Monday, March 26, 2012 9:59 AM