Passing .NET object from CCW to ASP Classic

C

C.

Hey guys,

Time to take a trip in the way back machine. I need to pass a .Net
object to calling code in ASP Classic. The object is defined as :

public class UserInfo : IUserInfo
{
public string FirstName { get; set; }
public string LastName { get; set; }
public string AccessLevel { get; set; }
}

The CCW exposes the following method:

public UserInfo ValidateCredentials(string Username, string Password,
string AdminGroup)
{
UserInfo ui = new UserInfo();
if (Username.Equals("John") &&
Username.Equals("Does") &&
AdminGroup.Equals("1"))
{
ui.FirstName = "John";
ui.LastName = "Doe";
ui.AccessLevel = "1";
}
else
{
ui.FirstName = "Jane";
ui.LastName = "Doe2";
ui.AccessLevel = "2";
}
return ui;
}

I am able to successfully execute the following ASP Classic code:

DIM access
SET access = Server.CreateObject("AccessAPI.AccessController")
dim user
Set user = AccessControlWS.ValidateCredentials( username,
password, adminGroup )
Response.Write user.FirstName 'THIS IS ALWAYS BLANK

All of the user's fields are empty, however. According to the
ValidateCredentials method in my AccessAPI object, those fields should
always be populated, one way or the other. Why are they getting
scrubbed?

Cheers,

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top