Author: Scott Kao | Posted on: 3/1/2010 8:01:28 PM | Views : 490

Hi,


I am trying to use windows authentication in my ASP.net site for project server web service. It works fine when I debug my program, but after deployment, I always get 401 error.
Here is my code
public static PwaProject.Project project = new PwaProject.Project(); private const string PROJECTWEBSERVICE = "_vti_bin/PSI/Project.asmx"; private const string BASEURL = "http://mysite/"; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { project.Url = BASEURL + PROJECTWEBSERVICE; project.Credentials = CredentialCache.DefaultCredentials; PwaProject.ProjectDataSet pds = project.ReadProjectList(); this.GridView1.DataSource = pds.Task; this.GridView1.DataSource = pds; this.GridView1.DataBind(); } }

Go to the complete details ...