Community
Showing results for 
Search instead for 
Do you mean 
Reply

Cannot connect via ASP .NET application to ACT! database

New Member
Posts: 6
Country: USA

Cannot connect via ASP .NET application to ACT! database

[ Edited ]

Folks,

    I am attempting to deploy a web application (C# ASP .NET v2.0) that interacts with our organization's ACT! database (2007 (9.x). No matter what I do, I can't get past the framework.Logon call no matter what signature I use:

 

ACTFM = new Act.Framework.ActFramework();

ACTFM.LogOn("admin", "password", "Sql", ".", "databaseName");

-OR-

ACTFM.LogOn("G:\\Production-Databases\\ACT\\databaseName.pad", "admin", "password");

 

I always end up getting the following exception:

 

Exception Type: System.ArgumentNullException

Exception Message: Value cannot be null. Parameter name: Value is null.

StackTrace: at Act.Framework.ActFramework.FailLogOn(Exception ex, TraceCategory tCat, TraceLevel tLevel) at Act.Framework.ActFramework.LogOn(String userName, String password, String databaseType, String databaseHost, String databaseName, Boolean fireEvents, Boolean suppressTierCheck, Boolean suppressSchemaCheck, Boolean suppressLicenseCheck, Boolean allowTrialModeDeparture) at Act.Framework.ActFramework.LogOn(String userName, String password, String databaseType, String databaseHost, String databaseName, Boolean fireEvents) at Act.Framework.ActFramework.LogOn(String userName, String password, String databaseType, String databaseHost, String databaseName) at ActPrivateQuery.ActPrivateQuery.ActStartup()

 

 

So here's the thing. If I alter the username/password so they would be incorrect, I get a valid username/password incorrect exception thrown back at me or if I alter the pad file in such a way that it wouldn't find the host I get a master database not found exception which again, I'd expect. So it seems as if I am indeed making a connection and something else during the login is going wrong. I've given the IIS IUSR account full read/write access to the database and its associated files.

 

Does anyone have a clue as to what might be going on here?

 

thanks in advance...

Employee
Posts: 1,163
Country: USA

Re: Cannot connect via ASP .NET application to ACT! database

Do you get the same results if the database is on a driver other than G?

 

I know some folks have run into issue where the database resided on a different drive from their protexis (licensing service) install.

Matthew Wood
Act! SDK Support
Community Moderator
New Member
Posts: 6
Country: USA

Re: Cannot connect via ASP .NET application to ACT! database

hmmm I don't think so for the simple reason that we've run in this setup just fine before on another machine. Additionally no clients (other computers) are having problems accessing the database shared by that machine over the network.

New Member
Posts: 6
Country: USA

Re: Cannot connect via ASP .NET application to ACT! database

Another bit of information, I do believe this must be a permissions issue of some kind. I built an NUnit test harness calling into the act DB and it was able to connect just fine from a remote machine, suggesting to me that the fact that my web service is running under IIS could be having permissions issues.

 

I have already granted the IUSR user full rights to the directory containing the PAD, ADF and supplemental files (as per other posts I've seen on these forums). Is there anything else I should be doing?

New Member
Posts: 6
Country: USA

Re: Cannot connect via ASP .NET application to ACT! database

ok - so a bit more progress, no amount of adjusting the IUSR permissions would let me log into act. However, I set up an impersonation within the asp .net web.config (allowing my IIS process to impersonate a legitimate login on the system) and this actually worked!

 

The question is why? I'm not particularly keen on this idea - I'd rather solve this within the constraints of the IUSR user as opposed to elevating the user the IIS process is running under...

New Member
Posts: 6
Country: USA

Re: Cannot connect via ASP .NET application to ACT! database

And the final piece of the puzzle is that the user I have to impersonate has to be a user in the administrator group. So there is obviously some directory or service that I need to be able to access that the IUSR user does not have access to by default. Now considering I have already eliminated the ACT database files (as I had granted all the permissions there) is there any other 'thing' I am supposed to grant IUSR the rights to access?

Employee
Posts: 1,163
Country: USA

Re: Cannot connect via ASP .NET application to ACT! database

Protexis Licensing? I know I sound like I'm beating a dead horse, but I've seen this be the issue with other folks getting null ref exceptions when attempting to log-on.

Matthew Wood
Act! SDK Support
Community Moderator
New Member
Posts: 6
Country: USA

Re: Cannot connect via ASP .NET application to ACT! Database

So for the sake of experimentation I moved the DB to the same drive as the licensing install and I got the exact same behavior.

 

Just to recap in some neat bullet points:

- Any remote user using ACT! has no problems accessing the DB

- Any local executable has no problems accessing the DB

- IIS process fails with the previously stated error even with IUSR granted full read/write access to database directories

- IIS only works when I allow the process to impersonate a local user from the administrator group.

 

I'm going to leave it this way for now, but if anyone ever comes up with an explanation as to what I'm doing wrong, I'd love to hear!