7 Replies Latest reply on Aug 29, 2014 3:47 PM by gCubed

    C# and API


      I'm building an app in visual studio to work with the API and having difficulty finding the reference for psPortfoliosLib. 


      Can you point me in the right direction to  it's location.



        • 1. Re: C# and API

          Use browse and browse to C:\Program Files\Oracle\Primavera Portfolio Management\Portfolios\DLLs.


          Select the ProSight.Portfolios.OpenAPIDataTypes.dll and ProSight.Portfolios.OpenAPI.dll for use of the COM API.


          This is assuming you have ProSight installed on your development machine.




          • 2. Re: C# and API

            Thanks for the info.

            Yes have it loaded and partially working.  the database is running but the app will not load.  I get the login screen and rejection if invalid password is put in.  With correct user/password, the screen blanks out and nothing happens after that.


            Any suggestion on how to fix this?



            • 3. Re: C# and API

              If you are trying to log into ProSight via a browser make sure you have xmlhttp enabled.  What type of app are you developing, Web or widow / console?   If web app, make sure you run it in a prosight app pool.Gene

              • 4. Re: C# and API

                Thanks on the DLL  I as using the wrong one.

                What I'm trying to do is write data loader (VS C#) that uses the Prosight API . 

                prosight v 9.1 installed

                windows 7 with IIS running

                Database: Oracle 12g. 

                the pool is set to prosight app

                xmlhttp is enabled.


                It wouldn't load, so I tried to enable the SSL (userID/password only) and getting the same thing.  .

                • 5. Re: C# and API

                  OK, just so I understand.  You have ProSight install and you are able to log into to it normally.


                  You have develop a small console / window app to load data that will need to run on the server (COM API).  Are you developing on the server or do you have a copy of the ProSight environment on your development box?


                  When you run / debut your application the psPortfoliosSecurity login method doesn't return a token.


                  I believe that psPortfoliosSecurity is a type B with regards to error handling  Try Catch block to see if you are hitting an error.


                  psPortfoliosSecurity psSecurity = new psPortfoliosSecurity();




                      var token = psSecurity.Login("admin", "password", 100)

                      // Success


                  catch (Exception ex)


                      psRETURN_VALUES ErrorCode = (psRETURN_VALUES) (-ex.ErrorCode);

                      string ErrorText = ex.Message;



                  On a side note, I have some code that reads an Excel file and import / update category data if you would like a copy.  It uses web services instead of the COM API so one can run it from there laptop.




                  • 6. Re: C# and API

                    On the application I'm building, I'm not having any problems with psSecurity.Login.   That works fine.


                    Where the problem is happening is on the IE

                    URL:   https://localhost/prosight

                    I enter the userID/PW.   

                    When I click on the green arrow button,  the screen goes blank.

                    • 7. Re: C# and API

                      I have seen this when IE didn't have native XMLHTTP on.  Another thing I do is turn on IE compatibility mode for the ProSight URL.


                      The other thing is I don't think it works with I E11.  I use IE 9 and IE 10 works but has sorting issues in the UI.