I don’t think you can do it with zero changes in the .Net application, but I think you can do it with minimal changes. Please note that I assume that the Gateways portal is everything that happens with the .Net web application. That is, the portal receives each HTTP request from the browser, adds its own headers to it, sends the request to the .Net application, receives a response from the .Net application, rewrites things, and then returns the information to the browser.
, , (, ), , .Net- , - , , .Net . .
:
1. .Net
.Net. , - login.aspx. ( ) portallogin.aspx portallogin.cs.
portallogin.aspx portallogin.cs. . - , . , , PORTAL_SomeFunctionName, SDK , .
const string specialpassword = "ThisPasswordTellsTheBackendSystemThisUserIsOK";
Page_Load()
{
if (PORTAL_IsLoggedInToPortal())
{
string username = PORTAL_GetCurrentUserName();
System.Web.Security.FormsAuthentication.SetAuthCookie(username, false);
System.Web.Security.FormsAuthentication.Authenticate(username, specialpassword);
}
else
{
throw new Exception ("User isn't coming from the Portal");
}
}
web.config .Net , - portallogin.aspx login.aspx.
.
2. , # 1
. , .NET, , .
. System.Web.Security.MembershipProvider. , , GetUser ValidateUser ApplicationName. , . , , ( NotImplementedException (s)), , .
public override string ApplicationName
{
get
{
return "Portal";
}
set
{
;
}
}
private const string specialpassword =
"ThisPasswordTellsTheBackendSystemThisUserIsOK";
public override bool ValidateUser(string username, string password)
{
return (password == specialpassword);
}
public override MembershipUser GetUser(string username, bool userIsOnline)
{
string email = PORTAL_getemailfromusername(username);
System.Web.Security.MembershipUser u = new MembershipUser(
this.name, username, username, email, "", "", true, false,
DateTime.Now(), DateTime.Now(), DateTime.Now(),
DateTime.Now(), DateTime.Now(), DateTime.Now()
);
return u;
}
.Net RoleProvider ProfileProvider, .Net-. ( , ProfileProvider , , zipcode , , . HTTP- .
.Net, , .Net-, / . , .Net. , - , - .Net .
, . , - .Net. , - .Net. , , , .Net . HTML-, , , . - .Net, HTML-, IIS HTML ( , ... IIS, , ).
!
, , Plumtree ( BEA Aqualogic User Interaction) Microsoft SQL Server, IIS , Dynamics NAV. , .Net .
Tim