Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - bittercoder

Pages: [1] 2
1
Managed to resolve this issue (though running multiple instances of EA within ASP.Net for simultaneous access to multiple repositories appears very unreliable).  It turned out to be an oddity with profiles - such that even though we had logged on the server with our service account and provided a license, it was not finding that license when invoking the COM object.

The resolution was to use runas with the following command line:

runas /noprofile /user:<domainname\service account name> "ea.exe -Embedding"

At which point it prompts for the service accounts password, and then displays the EA license dialog - we added the apropriate license - clicked close and then killed off EA.exe from the task manager.  After that everything seemed to work ok without an interactive user being logged into the machine.

2
Hi All,

I'm currently writing an ASP.Net 2.0 application which takes advantage of the EA automation interface.

During development we can instantiate an EA.Repository etc. without any issues (using the visual studio.net development web server Cassini) because it's using the currently logged on user.  However when deploying to IIS 6  windows server 2003 this does not work, and instead have to perform some additional DCOM configuration, similar to these previous posts...

http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1126651471/7#7

http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1191235427/2#2

Here are the steps we're using:
  • Navigate to Control -> Administrative Tools -> Component Services.
  • Navigate to the My Computer -> DCOM Config folder.
  • Locate the EA.App component.
  • Right click and select properties.
  • From the properties dialog select the Security Tab.
  • Click the Customize radiobutton for the Launch & Activate Permissions.
  • Click Edit for the Launch & Activate Permissions.
  • Click Add to add  a new user.
  • Select "Network Service" for the local machine.
  • Give the Network Service "Local Launch" & "Local Activate" Permissions.
  • Repeat for Access Permissions, giving the Network Service "Local Access".
  • Click OK to save changes.
And once we've done that we then need to move to the identity tab and set the component to run with "this user" - supply a valid username and password (in this case we create a specific domain service account for this purpose).

Normally the only caveat with this is you must log on the server at least once with the account you're using to run EA.App, so you can supply a valid EA key.

This has worked fine on a couple of test machines - however we are now finding that "out in the wild" this is not working, and that the repository created by the first call to OpenFile2 hangs indefinitely, anyone have any thoughts on how to resolve this?  

p.s. In some cases we have found that being logged on the server with the service account resolves it too - but only until you log off, at which point asp.net starts hanging again.

Thoughts/suggestions?

3
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!

4
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

5
I have an add-in that's directly accessing the EAP file via OleDB (for performance reasons, the API is just too slow) and on rare occasions we're seeing this message displayed in EA:

DAO.Database (3159) Not a Valid Bookmark

Is there any way to further diagnose the cause of this issue - it's not a show stopper as users can click ok to continue, but it's not a good user experience - sadly it's rather random - so it's very hard to test if any changes I make are having an effect.

6
For an add-in we've developed we rely on the ConnectionString property of the EA Repository, to get the connection string or EAP filename, so we can connect directly to the database.

This works great for most clients, but in a small number, when connecting to a DBMS Repository, the ConnectionString property only returns the name of the connection i.e. "EA" instead of "EA --- DBType=1;Connect=Provider=SQLOLEDB.1;Password=secrete;Persist Security Info=True;User ID=ea_test;Initial Catalog=EA;Data Source=server" ... I think the build it's happening on is 813, but I suspect it's not related to any particular build, but the clients environment/setup, just waiting to confirm by getting one of the clients to upgrade.

Anyone come across this themselves, or know what could be causing it?

7
Hi All,

I'm looking for the fastest way to delete a Package or Element via Automation, when I know for instance the PackageGuid or ElementGuid...

At the moment I'm grabbing the parent of the package or element, iterating through the collection of children, finding the apropriate index for the element or package I want to delete, and then deleting via a call to:

Collection.RemoveAt(index, refresh)

This seems like a lot of work to do, just to delete an element or package (and is slow!) - surely I must be missing an easier way to do this?

8
Quote
...since there are defaults. However, if one of your users has MS Access (rather than just the Jet drivers) they may have set the defaults (via Options or something) to lock exclusively. David


David does this mean that say if I load Access 2007, go to advanced options, and change the "Default record locking" from "No locks" to "All records", and change the Default open mode from "Shared" to "Exclusive" that I'm likely to see this behavior with any edition of EA combined with my Add-in as well? ... nice little gotcha that one!

9
Your absolutely right, the Desktop edition certainly does cause this problem - is there any known work around for this, or will I have to resort to only making calls against the EA automation interface instead of making use of direct SQL calls?

10
Is there actually a limit imposed by EA or Jet when connecting to an EAP (MDB) file though?  ... This appears to be happening as soon as the code attempts to create any kind of connection, i.e. it's almost like EA has locked the EAP file for it's exclusive use... I was wondering if this could be related to the Lock file (i.e. LDB) though I'm not exactly sure what to look for.

11
I've been working on an Add-in that for performance reasons needs to open a connection directly to the EA project (either the SQL server or the EAP (access) database) - works well on 99% of machines, but on a small subset of machines it appears that when the OleDbConnection attempts to connect to an EA Project it fails, with the following exception being thrown (.Net Framework 2.0)

System.Data.OleDb.OleDbException: Could not use ''; file already in use.

I don't have access to the failing machine to perform additional diagnostics with a debugger etc. attached - but I was wondering if anyone had some ideas.. it appears to hang for about 200+ seconds, so I'm guessing the exception is thrown as a result of a timeout while waiting to get access to the database, the call is made after EA is already connected i.e. I'm grabbing the connection string details from the repository itself, I know the filename appears to be blank, but I believe that's just an oddity of the way the exception message is formatted.

Any thoughts on what the problem could be, or tips on how I could track down this issue without actually having access to the target machine?

12
I also noticed that disabling UI updates (Repository.EnableUIUpdates = false) appears to cause problems when adding child elements... thanks for confirming this ablaz.

Which leads me to wonder what use that property is at all... disabling UI updates while adding 30 child elements seems like  best practice to me.

13
Will do, thanks for the heads up.

14
I'm experiencing a similar problem (intermittent failure when executing Elements.AddNew via C# - it ends up raising a COMException with the message "Internal error" - which causes EA to be shut down..

I can't reliably reproduce it alas - but it seems to be when I execute AddNew in a loop for multiple new elements that it eventually bails out...

15
Automation Interface, Add-Ins and Tools / Re: Automated Testing
« on: January 09, 2007, 07:21:20 pm »
We've mostly tested creating "aggregate" elements (Elements, containing child elements and so on) and reading them back...     Mostly to ensure we have a suite of regression tests as we add new features to the Addin.

I can't really say much about the Addin itself, I'm under NDA until the product goes "public".

Cheers,

- Alex

Pages: [1] 2