Book a Demo

Author Topic: Stop OpenFile/OpenFile2 prompting for username  (Read 3231 times)

bittercoder

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
  • .Net developer
    • View Profile
Stop OpenFile/OpenFile2 prompting for username
« 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

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Stop OpenFile/OpenFile2 prompting for username
« Reply #1 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.
No, you can't have it!

bittercoder

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
  • .Net developer
    • View Profile
Re: Stop OpenFile/OpenFile2 prompting for username
« Reply #2 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!

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Stop OpenFile/OpenFile2 prompting for username
« Reply #3 on: November 14, 2008, 06:05:25 am »
I assume you've made the followup feature request...
No, you can't have it!