I have a .Net(2.0) dll that tracks logon information. I have the dll registered on my server. When I call this dll from another .net site, I have no problems. I need to call this dll from a .asp site on this server as well. I want the dll to be able to get a few server variables from whichever site makes the call. Before I would just pass those variables into the function inside my dll, but would rather just get them inside the .net code. I think it is the way I am requesting my serverVariables...but not sure. Or am I completely off base.
Some example code:
(counter.vb)
Site1\logon.asp
Some example code:
(counter.vb)
Code:
'.NET code
Public Sub track()
Dim sUrl,sLclAddr as String
sUrl = System.Web.HttpContext.Current.Request.ServerVariables("URL")
sLclAddr = System.Web.HttpContext.Current.Request.ServerVariables("LOCAL_ADDR")
'...then do some stuff with this information...
End Sub
Site1\logon.asp
Code:
'.asp code
<%@ Language=VBScript %>
<%
Sub trackSome()
Dim Cntr
Set Cntr = Server.CreateObject("counter")
Call Cntr.track()
End Sub
If logon = "unSuccessful" Then
Call trackSome
End If
%>
'...do some more stuff...