Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: bittercoder on October 09, 2008, 01:19:52 pm

Title: Stop OpenFile/OpenFile2 prompting for username
Post by: bittercoder on October 09, 2008, 01:19:52 pm
I'm developing an application using the EA Api from an ASP.Net application.  Through the admin of this site people can edit the credentials, connection string etc. of one or more EA repositories they can connect to.

To validate the connection details I attempt to connect to the EA repository before saving them.  This works fine, but for secured EA models this presents an issue - as it prompts on screen with a modal dialog for the correct credentials - but this app is running in a completely disconnected fashion.

Is there a way to disable the user credentials dialog so that OpenFile/OpenFile2 just throw an exception when a secured repository is encountered and the username/password are invalid?  I've tried setting SupressEADialogs to true, but that had no effect.

I know I could just launch OpenFile2 in a separate thread and then just kill it if it didn't finish within a certain timeframe, but I suspect this is just going to leave the dialog hanging, eventually causing issues on the server.

Cheers,

 - Alex
Title: Re: Stop OpenFile/OpenFile2 prompting for username
Post by: «Midnight» on October 09, 2008, 09:39:53 pm
I don't think so.

This is definitely worth a feature request or bug report (depending on your viewpoint) to Sparx.
Title: Re: Stop OpenFile/OpenFile2 prompting for username
Post by: bittercoder on November 14, 2008, 05:23:51 am
As a follow up for anyone who's interested this is partially fixed in Build 833 - you can now set the "SuppressSecurityDialog" property to true on the repository before calling OpenFile2, and if authentication fails it will throw an exception instead of displaying a dialog.

At this stage it does not populate the details of the failure in an error message property, so unfortunately this could also represent some other error - but it's a start!
Title: Re: Stop OpenFile/OpenFile2 prompting for username
Post by: «Midnight» on November 14, 2008, 06:05:25 am
I assume you've made the followup feature request...