wmickey
2nd April 2005, 07:43
This is my first attempt at doing OLE and ASP.NET. We are runnning Baan IVc4 Service Pack 16 with BW Client BaanIVc4.66.

I'm using Microsoft Visual Studio .NET 2003. I'm coding in the codebehind with VB.NET.

I can't seem to get a connection to the bshell. I have tested the samples that is installed with the BW Client and they work fine. I did setup an impersonate user line in my web.config.

Here is my error:

[Exception: Cannot create ActiveX component.]
Microsoft.VisualBasic.Interaction.CreateObject(String ProgId, String ServerName)
BaanWeb.BaanUsers.GetBaanUsers() in C:\WEBDEV\BaanCall\BaanWeb\BaanUsers.aspx.vb:60
BaanWeb.BaanUsers.btnGetUsers_Click(Object sender, EventArgs e) in C:\WEBDEV\BaanCall\BaanWeb\BaanUsers.aspx.vb:31
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()


This is the code that's failing:

Sub GetBaanUsers()
Dim BaanObj As Object
Dim B_function As String
Dim B_function2 As String
Dim Query As String
Dim user As String
Dim temp_string As String
Dim query_id As Long
Dim RetVal As Long
'On Error GoTo CannotCreateBaan

'run Baan Application
BaanObj = CreateObject("Baan4.Application")
BaanObj.Timeout = 10

End Sub

Does anyone have any working examples that they could share with ASP.NET?

mark_h
6th April 2005, 16:04
Have you seen this thread (http://www.baanboard.com/baanboard/showthread.php?t=23253&highlight=impersonate)? Not sure if it helps or not. Maybe you can get a conversation going with sandycrum.

wmickey
6th April 2005, 16:13
Thanks Mark, I had checked out that post and tried to make the adjustments to my web.config,etc. So far still no go. I'm not sure if Baan Support would give me any help or not. It sounds like OLE is not officially supported anymore from some of the reading I've done.

Thanks for your help.
Bill

mark_h
6th April 2005, 16:51
I would give them a call. Some others have reported that it is supported, but I was told "no longer supported" start using Openworld. One of the reasons I never fully explored OLE. I did use it, but only for my use, never for users and a production environment.