Writing Custom PSI , Event Handlers & Impersonization

  • Thread starter www.projectserver.cz
  • Start date
W

www.projectserver.cz

Hi I noticed that in ProjectServer SDK isn't described where i can get
informations about environment, all examples which I saw using extra
config files and from my point of wiew it's really dirty approach.

So i'd like to know:

1) When I 'm writing custom PSI, i need to know how I can get
Connection string to project server databases.
2) When I 'm writing Event handler, I have no idea where i can find
URL of SSP
3) When I 'm writing Stub web service, I need to where is stored URL
of SSP.

I do not belive that I have to use extra config files.
 
C

Chris Boyd

1) When I 'm writing custom PSI, i need to know how I can get
Connection string to project server databases.

This is very true and unfortunately there is no way to get the connection
strings programmatically.
2) When I 'm writing Event handler, I have no idea where i can find
URL of SSP

Check out:

http://blogs.msdn.com/project_progr...etting-the-psi-url-from-an-event-handler.aspx

3) When I 'm writing Stub web service, I need to where is stored URL
of SSP.

You should be able to call into the SharePoint OM and get this information.
Similar to how you get the URL in an event handler.


--
Chris Boyd
MS Project
Program Manager

Blog: http://blogs.msdn.com/project_programmability/
 
W

www.projectserver.cz

This is very true and unfortunately there is no way to get the connection
strings programmatically.


Check out:

http://blogs.msdn.com/project_programmability/archive/2008/01/10/gett...


You should be able to call into the SharePoint OM and get this information..
Similar to how you get the URL in an event handler.

--
Chris Boyd
MS Project
Program Manager

Blog:http://blogs.msdn.com/project_programmability/








- Show quoted text -

1) Hi regarding the point 1 on MS Project Conference Chris Flessinger
wis an "....." when he show us so dirty approach on MS Project
conference, now I now that as MS employe he couln't tell us thete
there is such design bug :).

Regarding point 2 and 3
I sow you article and unfortunately your code is not complete.

SPSite ss= new SPSite(contextInfo.SiteGuid);
From the SPSite object, you can build up the URL to the PSI:
string.Format("{0}/_vti_bin/psi/{1}.asmx",ss.Url, wsName);
For impersonation, you will want to use:
string.Format("{0}//{1}:56737/{2}/psi/{3}.asmx", ss.Protocol,
ss.HostName, sspName, wsName);


You suppose that SSP using the same protocol (HTTP HTTPS) as PWA
site .
There isn't explained where you get variable sspName.

I also did same attempt to find the SSP URL see my post
http://projectserver.cz/cms/index.php?itemid=24
But my code isn't able detect which SSP is used by my PWA instance .

Regards Martin Winzig
 

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