Community
Showing results for 
Search instead for 
Do you mean 
Reply

Error when logon through Framework

Copper Super Contributor
Posts: 88
Country: USA

Error when logon through Framework

[ Edited ]

Hi:

 

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)).

 

Any suggestions?

 

Thanks!

Employee
Posts: 1,163
Country: USA

Re: Error when logon through Framework

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.

Matthew Wood
Act! SDK Support
Community Moderator
Copper Super Contributor
Posts: 88
Country: USA

Re: Error when logon through Framework

[ Edited ]

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

 Any suggestions?

Bronze Elite Contributor
Posts: 2,117
Country: United_Kingdom

Re: Error when logon through Framework

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"

 

HTH

Vivek Gargav
Caldere Associates Ltd.
www.caldere.com
vgargav@caldere.com
My Blog
Nickel Contributor
Posts: 175
Country: USA

Re: Error when logon through Framework

[ Edited ]

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.

Copper Super Contributor
Posts: 88
Country: USA

Re: Error when logon through Framework

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'."

 

???

Highlighted
Nickel Contributor
Posts: 175
Country: USA

Re: Error when logon through Framework

I'm at a loss now. My honest opinion is to start with a new solution/project if you can, just to make sure that you have a clean slate and not a bunch of messed up references. Maybe you were a bit over-zealous when you added your references? I know I've made a mess of references before, and I eventually just bit the bullet and made a new solution and re-made all the references (but copied the code).

I wouldn't be able to do this, as I don't have ACT of any kind installed anymore (new computer last week), but if someone could post a screenshot/list of references in their working solution for ACT 2013 Pro, that should tell you what you need to add.
Bronze Elite Contributor
Posts: 2,117
Country: United_Kingdom

Re: Error when logon through Framework

KimKamp,

 

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.

Vivek Gargav
Caldere Associates Ltd.
www.caldere.com
vgargav@caldere.com
My Blog
gkl
Copper Contributor
Posts: 29
Country: Ecuador

Re: Error when logon through Framework

[ Edited ]

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

fgh
New Member
Posts: 12
Country: Estonia

Re: Error when logon through Framework

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?