I'm creating a web service extension and I need to retreive logged in user information in the onLoad method of a class that implements IWebServiceExtension interface.
How can I retreive VaultContext?
In the onLogon method of the class implementing IExtension the IApplication interface was passed as parameters, but in the onLoad method this is not available...any idea?
VaultContext only applies to Vault Explorer extensions. IWebServiceExtensions can receive events from any vault client on that computer, such as AutoCAD.
So the first question is: What applications do you want to get events from?
If you only care about Vault Explorer, then you don't need to bother with the IWebServiceExtension interface. Just use IExtension like you do for custom commands and tab views. Hook to events in the OnStartup function. If you want the VaultContext, you can remember it from other places, such as OnLogOn.
If you want events from all Vault clients on that computer, then IWebServiceExtension is the right thing to use. However, it doesn't work well to have your IExtension and IWebServiceExtension in the same DLL, so you will need two projects. Because you don't have a VaultContext, you can use WebServiceCredentials to get the login information. See Solving the Four Eyes Problem for example code.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.
Upgrading to a 2015 product? Make sure to check these out 1st!