Community
Showing results for 
Search instead for 
Do you mean 
Reply

Help!! Getting Error: "Cannot open database \"DB PATH" requested by the login. The login failed.\r\nLogin failed for user 'ACTADMIN' "

Copper Super Contributor
Posts: 28
Country: Canada

Help!! Getting Error: "Cannot open database \"DB PATH" requested by the login. The login failed.\r\nLogin failed for user 'ACTADMIN' "

Overview:

 

OS: Tried on both win 7x64 and win8.1x64

Visual Studio version: Tried on VS 2013 (.net version 4.0 and 4.5), and VS 2010 (.net version 4.0)

DB used: ACT2014Default

Act version: Act! Premium Version 16.1.207.0, Hot Fix 1

 

Situation/Problem:

 

It should be noted that I am creating a local C# Web Application that will access the local '.pad' file. I'm not sure if it has to do with conflicting installations of mssql server or what, with VS 2013, it had installed mssql server 2012, however VS 2010 installed mssql server 2008. The issue was present in both implementations. Both were done on clean installs on virtual machines.

 

Using the Default example db, I've tried to connect to the database using the basic function like so:

ACTFM.LogOn(user, pass, "localhost", path);

 The 'user', 'pass', and 'path' are all loaded in from my Web.config file like so:

<appSettings>
    <add key="ACTFMPath" value="C:\Users\Public\Documents\ACT\ACTData\Databases\ACT2014Demo.pad"/>
    <add key="ACTFMUser" value="Chris Huffman"/>
    <add key="ACTFMPass" value=""/>
</appSettings>

I have tried two path variations, the one displayed there, and an explicitly escaped one like so:

<add key="ACTFMPath" value="C:\\Users\\Public\\Documents\\ACT\\ACT Data\\Databases\\ACT2014Demo.pad"/>

 

If anyone could shed some light on this, I have looked at a few posts that presented the same issue, but there really isn't much.

 

Thanks in advance!

 

Nickel Contributor
Posts: 175
Country: USA

Re: Help!! Getting Error: "Cannot open database \"DB PATH" requested by the login. The login failed.\r\nLogin failed for user 'ACTADMIN

Are you able to login successfully if you run the site in debug mode? In other words, does this issue only show up when running under full IIS, not IIS Express (which is what you get in debug mode)?

If so, it's probably due to the IIS application pool identity (user account) not having permissions to the pad's directory.
Copper Contributor
Posts: 42
Country: Germany

Re: Help!! Getting Error: "Cannot open database \"DB PATH" requested by the login. The login failed.\r\nLogin failed for user 'ACTADMIN

Hi,

 

to rule out any problems with the web.config and .pad file I would try to logon directly with:

 

ACTFM.LogOn("Chris Huffman", "", "databaseHost", "databaseName");

I guess you are using the wrong overload of ActFramework.LogOn, the one you are using (4 string parameters) does not take a path to the .PAD File

 

If the above is working and you can LogOn directly, try using the PAD-File with this overload of ActFramework.LogOn:

//ACTFM.LogOn(string xmlPADFile, string userName, string password)
ACTFM.LogOn(path, user, pass);

 

Copper Super Contributor
Posts: 52
Country: United_Kingdom

Re: Help!! Getting Error: "Cannot open database \"DB PATH" requested by the login. The login failed.\r\nLogin failed for user 'ACTADMIN

[ Edited ]

Hello 2gen,

 

Here's a list of the overloads available for ActFramework.LogOn

 

void ActFramework.LogOn(string xmlPADFile)
void ActFramework.LogOn(string xmlPADFile, string userName, string password)
void ActFramework.LogOn(string userName, string password, string databaseHost, string databaseName)
void ActFramework.LogOn(string userName, string password, string databaseType, string databaseHost, string databaseName)
void ActFramework.LogOn(string userName, string currentPassword, string databaseType, string databaseHost, string databaseName, string newPassword)

 

You can see that there are no overloads with 4 parameters that use the path to the PAD file so I'd agree with twolfram, take a look at using another overload. I'd recommend using #3, like this:

 

try
{
    Act.Framework.ActFramework oActFwk = new Act.Framework.ActFramework();
    oActFwk.LogOn("russell", "F&k3P@ss", "SWIFT01", "RussellsData");
    if (oActFwk.IsLoggedOn == true)
    {
        MessageBox.Show("Logged on");
    }
}
 catch (Exception ex)
{
    MessageBox.Show(ex.Message, "Act!", MessageBoxButtons.OK, MessageBoxIcon.Error);
}

 I hope this helps.

 

Regards,

 

 

Russell