11-26-2012 10:27 AM - edited 11-26-2012 10:28 AM
Using ACT!2013 PRO, .Net 4.0.
I'm having trouble logging into the database through vb.net.
Dim ActFwk As New Act.Framework.ActFramework() Dim iPath As String = "K:\ACT for Windows\Databases\glfm.pad" Dim iUser As String = "Kim" Dim iPass As String = "k2" ActFwk.LogOn(iPath, iUser, iPass) If ActFwk.IsLoggedOn = True Then MsgBox("Logged in") Else MsgBox("NOT Logged in") End If
When I run this, I get a "System.IO.FileNotFoundException"
I have verified that the .PAD file is indeed value (using File.exists(iPath)).
11-26-2012 10:45 AM
I'm assuming the exception is being thrown when the LogOn method is called.
Could be an issue with the path K:, you could create an empty database located somewhere locally and see if that's the problem.
11-27-2012 06:14 AM - edited 11-27-2012 06:14 AM
Thanks for the quick reply.
I created a local database on my C:\ drive, and got the same result:
"System.IO.FileNotFoundException: Could not load file or assembly 'Act.Shared.LicProvider' or one of its dependencies. The system cannot find the file specified."
I have "Act.Shared.LicProvider" in the References section of my program.
Also, I cannot trap the error with a Try...Catch...End Try code segment.
Here is my code:
Dim ActFwk As New Act.Framework.ActFramework() Dim iPath As String = "C:\Program Files (x86)\ACT\Act for Windows\Databases\ACT2013DemoBak.pad" Dim iUser As String = "Chris Huffman" Dim iPass As String = "" Try ActFwk.LogOn(iPath, iUser, iPass) Catch ex As Exception Dim iEx As String = ex.Message MsgBox(iEx) End Try If ActFwk.IsLoggedOn = True Then MsgBox("Logged in") Else MsgBox("NOT Logged in") End If
11-28-2012 10:10 AM
I'm not that au fait with VB syntax but in C# we have to use the '@' before the path to ensure we escape out the '\' chars in a path string.
Another thing to check is network permissions. Ensure you've got full access rights to the location and if you're running VS in Win7 run it "as administrator"
11-29-2012 05:53 AM - edited 11-29-2012 05:53 AM
The path string declaration is fine.
Based on what you are describing, I think there is an issue with the reference. If you have the line "Imports Act.Shared.LicProvider", but no actual reference to it, there will be problems. I'm thinking the more likely situation is that you have a reference set to the DLL, but its path is no longer valid. If you look in the Solution Explorer for the project (with All Files showing), you can check the properties of that reference to see the path. You'd have to manually check if the path is still valid.
11-29-2012 06:22 AM
Thanks for the reply.
So... I verified that the file was actually in my C:\Windows... folder. I set it to be a local copy, to be sure that it was present when my program ran.
Now I'm getting a new message: "System.IO.FileNotFoundException: Could not find file 'C:\ProgramData\Act\ActData\irritum'."
11-29-2012 06:37 AM
11-29-2012 08:02 AM
Could you confirm which versions of dll's your using. Are you using 2013 Act.Framework.dlls or earlier versions?
The reason I ask is that you will get similar weird kind of errors if you use earlier ACT! dlls against 2013.
05-24-2015 03:33 PM - edited 05-24-2015 03:34 PM
I get the samme error.How did you resolve it?
I start to get this problem when I upgraded to newer version of act. Propably that has something to do with it. I copy paste my service and I get the same error: Could not load file or assembly 'Act.Shared.LicProvider' or one of its dependencies
05-25-2015 10:17 AM
This may have to do with the IIS configuration. Act version17 has some issues with 64 bit. Are you getting the error from visual studio Debug mode or you have already deployed you code in IIS?