Prev   Next

Back to the top of the FAQ

Q. Loading up the AuthentiX COM object in .Net

A. Here is a sample of loading up the AuthentiX COM object in .Net:

Add the following refrence to my project ( :

< Reference
	Name = "AUTHXOCXLib"
	Guid = "{2C3A2917-E7FA-11D0-BC0F-02608CAD9C7D}"
	VersionMajor = "1"
	VersionMinor = "0"
	Lcid = "0"
	WrapperTool = "tlbimp"

then use the AUTHXOCXLib.AuthXOCXClass.

I have got the problem solved perfectly on my local server (!!) by following your instructions:

- Adding the AUTHXOCXLib COM object to the project.

Here's how Microsoft suggests:
In Solution Explorer, right-click References, and then click Add Reference.
Click the COM tab, and then click Browse.
Locate Project1.dll, and then click Open.
On the Add Reference window, click OK.
Instead of locating "Project1.dll" locate "AuthCOM ActiveX Control module" and NOT the "AXSupport ActiveX Control module"

Oops! Phil says:
However, if I locate and add "AuthCOM ActiveX Control module" then I gain a reference to C:\Program Files\Flicks Software\AuthentiX\ByCOM\AuthCOM\AuthCOM.ocx which is your example "ByCOM" module with a empty Authenticate method!
The reference should be to C:\Program Files\Flicks Software\AuthentiX\authxocx.ocx in order to gain access to methods including CurrentUserName.

- And using the following lines in my code behind file:

Dim auth As New AUTHXOCXLib.AuthXOCXClass()

Label1.Text = auth.CurrentUserName(Request.ServerVariables("LOCAL_ADDR"),

Note, use HTTP_AUTHORIZATION instead of HTTP_AUTHXAUTHORIZATION above, if you are not using the workaround.

Here is a complete VB .NET project, which uses the AuthentiX COM component in a "code-behind" page. Protect the directory with AuthentiX. The sample calls CurrentUserName from Page_Load.

Download codebehind now.

How to call classic ASP COM components from a page

When using the AuthentiX "Impersonate User" functionality:
In the .NET application file web.config, you MUST put in the tag
<identity impersonate="true">
under the <system.web>
tag, otherwise .NET impersonates the user ASPNET.
You mustn't put in the user name/password with the identity tag either.
Then everything works as expected.

Back to the top of the FAQ

Prev   Next