CathyB
23rd January 2003, 19:54
I am trying to access the Baan OLE Object from ASP.Net and I am receiving an Access is Denied error. Does anyone have any suggestions?
Here is my code:
Dim BaanObj as Object
Sub BaanConnect()
If BaanObj Is Nothing Then
BaanObj = Server.CreateObject("Baan4.Application")
BaanObj.Timeout = 10
End If
End Sub
pedromrs
24th January 2003, 15:10
Hi,
Wild guess here but are you accessing the webpage from the local intranet/machine or from the Internet?
You might wan't to check .NET security in Administrative Tools -> Microsoft .NET Framework Configuration. The default security setting for Internet is supposed to be very strict.
Also is that message from a BWmessage window or from the IIS server?
If you can be more specific maybe I can have other ideas. I never used the OLE object from ASP.NET but I use it from C# .NET applications regularly. I also have some experience with ASP.NET but with C# also.
CathyB
27th January 2003, 16:28
Thank you for your reply. I am accessing the web page from the local intranet/machine. The local Intranet security in the .NET security is set to full trust. The error message that I am receiving is an IIS error (See the attached text).
The error message mentions the local user {machinename}\ASPNET. I verified that the {machinename}\ASPNET user has full control to the local machine.
pedromrs
27th January 2003, 21:43
Hi,
I just did a quick test here at the office.
I got the same security warning.
After reading some notes I had about machine.config I changed the parameter userName attribute of the processModel in that file to SYSTEM (needs a reboot), This is not the best solution. :
<processModel
enable="true"
timeout="Infinite"
idleTimeout="Infinite"
shutdownTimeout="0:00:05"
requestLimit="Infinite"
requestQueueLimit="5000"
restartQueueLimit="10"
memoryLimit="60"
webGarden="false"
cpuMask="0xffffffff"
userName="SYSTEM" - change from machine
password="AutoGenerate"
logLevel="Errors"
clientConnectedCheck="0:00:05"
comAuthenticationLevel="Connect"
comImpersonationLevel="Impersonate"
responseRestartDeadlockInterval="00:09:00"
responseDeadlockInterval="00:03:00"
maxWorkerThreads="25"
maxIoThreads="25"
/>
Be carefull with this change. This will give the ASPNET process potencially full control of the system. I recommend you to use this just for testing until you get a better solution.
This way it will not give a warning at least over here. But I noticed a similar problem in this approach to that of running the object through a system service.
It will hang in the creation phase :rolleyes: . Probably, and this is just my guess, because the service (this one for sure) and the asp.net process will not allow the option window to be created, so it fails.
My approach to this problem is to create a .NET console application just like it was a function sending parameters as the program arguments and getting the results from a XML file or string.
If you really want to continue exploring the same approach I will recommend this link to find a better solution to the security problem (Sorry, I didn't have time to explore):
ASP.NET Security (http://www.microsoft.com/mspress/books/sampchap/6501.asp)
Hope this helps,