How to:publish a plan from project to projectServer automatically

F

frank

Hi:
I want to publish a plan into ProjectServer,but I don't konw how to pass
the Security Authentication?
help me, Thanks!!!
 
M

Magnus S

Please explain what the problem is and what environment you have set up

regards
Magnus
 
F

frank

Hi Magnus:
I want to write a program to publish a MS project plan file to Project
Server using MS Project. actually i know which function should be called,
below is the code i used:

[C#]
MSProject.ApplicationClass objApp = new ApplicationClass();
objApp.Visible = true
objApp.FileOpen("c:\\sanfenxian.mpp",Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,MSProject.PjPoolOpen.pjPoolReadWrite,Missing.Value,Missing.Value,Missing.Value,Missing.Value);
objApp.ActiveProject.ServerURL = "http://projectvol/projectserver";
objApp.PublishAllInformation();

But, Before MS Project publish the plan, a pop-up dialog is displayed asking
me to logon the Project Server. How can I logon to Project Server
automatically in my code?

My environment:
Client: MS Project 2003 Professional
Server: Project Server 2003
 
F

fred

Hi Frank,

any updates? have you logon to Project Server automatically in code?
have the same problem with it...

thank
 
E

Ed Morrison

Fred,
Use a command line or shell app to open Project Pro. The format is
winproj.exe /s serverurl /u
projectuser /P password where serverurl is the project server url (ex
http://myserver/projectserver). You only need projectuser and password if
you are trying to connect using a Project Authenticated User. Otherwise,
make sure the user that is running your app has the correct permissions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top