Book a Demo

Author Topic: Suppress login window while using openFile2() method  (Read 5917 times)

priombiswas89

  • EA User
  • **
  • Posts: 47
  • Karma: +0/-0
    • View Profile
Suppress login window while using openFile2() method
« on: January 08, 2022, 04:54:26 am »
I am trying to connect to a model protected by username and password by using openFile2() method. Every time it shows me the Login to EA Repository dialog which should be suppressed by default if I provide correct username and password. Setting SuppressSecurityDialog to true is also not working. I am using version EA 13.5.1315. Is this a bug? I don't know about the latest version of EA as I don't have license. Is there any fix for this? I have tried the below code:

Code: [Select]
Repository eaRepo = new Repository();
eaRepo.OpenFile2(inputFilePath, "user", "password");
eaRepo.SuppressSecurityDialog = true;

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Suppress login window while using openFile2() method
« Reply #1 on: January 08, 2022, 05:10:20 am »
setting eaRepo.SuppressSecurityDialog = true; after trying to open the repository (and thus showing the security dialog) isn't going to help much I guess.

Geert

priombiswas89

  • EA User
  • **
  • Posts: 47
  • Karma: +0/-0
    • View Profile
Re: Suppress login window while using openFile2() method
« Reply #2 on: January 09, 2022, 03:05:01 am »
Setting it before also not working.

setting eaRepo.SuppressSecurityDialog = true; after trying to open the repository (and thus showing the security dialog) isn't going to help much I guess.

Geert

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Suppress login window while using openFile2() method
« Reply #3 on: January 10, 2022, 09:31:32 am »
I suspect that what you're seeing is the Windows https authentication. This is separate from EA security (and shows up before EA knows that security is enabled.)

If I'm right, the instructions for configuring the worker will help.

https://sparxsystems.com/enterprise_architect_user_guide/15.2/pro_cloud_server/manual_worker_config.html
Quote
However, when the model has security enabled the connection string requires USER and PASSWORD parameters:
EAConnectString:model1 --- ;Connect=Cloud=protocol:http,address:localhost,port:804,user:fred,pwd:pwdxxx;Data Source=model1;

priombiswas89

  • EA User
  • **
  • Posts: 47
  • Karma: +0/-0
    • View Profile
Re: Suppress login window while using openFile2() method
« Reply #4 on: January 11, 2022, 07:19:46 pm »
Yes, it worked. Thank you very much.

I suspect that what you're seeing is the Windows https authentication. This is separate from EA security (and shows up before EA knows that security is enabled.)

If I'm right, the instructions for configuring the worker will help.

https://sparxsystems.com/enterprise_architect_user_guide/15.2/pro_cloud_server/manual_worker_config.html
Quote
However, when the model has security enabled the connection string requires USER and PASSWORD parameters:
EAConnectString:model1 --- ;Connect=Cloud=protocol:http,address:localhost,port:804,user:fred,pwd:pwdxxx;Data Source=model1;