walleye
10th February 2004, 00:45
I am trying to access BaaN DLL's using VB script in an ASP page for my web site.
My current setup is , Win 2K, IIS 5.0 and using VB scripts in an ASP page.
The following code works, when I setup a Virtual page on my webserver and use Windows authentication security instead of Anonymous. It only works for the Administrator account.
I would like to do this using the IUSR_<machine> account so my users do not have to login every time they access this specific ASP page.
Any help would be appreciated.
<%
Dim BaanObj
Dim dllname
Dim dllfunction
Response.Write("LOGON_USER: " & _
Request.ServerVariables("LOGON_USER"))
Set BaanObj = Server.CreateObject ("Baan4.Application")
dllname = "ocwmscdll001"
dllfunction = "get.Company_Number()"
BaanObj.ParseExecFunction dllname, dllfunction
response.write "<BR> ERROR - " & BaanObj.Error
if BaanObj.Error <> 0 then
Select case BaanObj.Error
Case -1
response.write "<BR>" & "DLL UNKNOWN"
Case -2
response.write "<BR>" & "FUNCTION UNKNOWN"
Case -3
response.write "<BR>" & "Syntax Error In Function Call"
End Select
end if
response.write "<BR> COMPANY NUMBER - " & (BaanObj.returnvalue)
dllname = "ocwmscdll001"
dllfunction = "change.Company_Number(504)"
BaanObj.ParseExecFunction dllname, dllfunction
response.write "<BR> RETURN - " & (BaanObj.returnvalue)
dllname = "ocwmscdll001"
dllfunction = "get.Company_Number()"
BaanObj.ParseExecFunction dllname, dllfunction
response.write "<BR> NEW COMPANY NUMBER - " & (BaanObj.returnvalue)
response.write "<BR> DONE - "
%>
My current setup is , Win 2K, IIS 5.0 and using VB scripts in an ASP page.
The following code works, when I setup a Virtual page on my webserver and use Windows authentication security instead of Anonymous. It only works for the Administrator account.
I would like to do this using the IUSR_<machine> account so my users do not have to login every time they access this specific ASP page.
Any help would be appreciated.
<%
Dim BaanObj
Dim dllname
Dim dllfunction
Response.Write("LOGON_USER: " & _
Request.ServerVariables("LOGON_USER"))
Set BaanObj = Server.CreateObject ("Baan4.Application")
dllname = "ocwmscdll001"
dllfunction = "get.Company_Number()"
BaanObj.ParseExecFunction dllname, dllfunction
response.write "<BR> ERROR - " & BaanObj.Error
if BaanObj.Error <> 0 then
Select case BaanObj.Error
Case -1
response.write "<BR>" & "DLL UNKNOWN"
Case -2
response.write "<BR>" & "FUNCTION UNKNOWN"
Case -3
response.write "<BR>" & "Syntax Error In Function Call"
End Select
end if
response.write "<BR> COMPANY NUMBER - " & (BaanObj.returnvalue)
dllname = "ocwmscdll001"
dllfunction = "change.Company_Number(504)"
BaanObj.ParseExecFunction dllname, dllfunction
response.write "<BR> RETURN - " & (BaanObj.returnvalue)
dllname = "ocwmscdll001"
dllfunction = "get.Company_Number()"
BaanObj.ParseExecFunction dllname, dllfunction
response.write "<BR> NEW COMPANY NUMBER - " & (BaanObj.returnvalue)
response.write "<BR> DONE - "
%>