Hi
I'm not sure what you mean by "private key". Is it within the database?
When it comes to payment over the Internet I always recomend you to use one
of the major payment services on the Internet. Such as
www.Shareit.com,
www.Plimus.com or
www.RegNow.com. The major reason is that these companies
are trusted by users. I would never go to a minor companies homepage and by
any thing with a credit card.
If it is for paying your affiliates
www.RegNow.com can help you with this
to. They have components that can do the trick for you. Or ask your
affiliates for an IBAN account number so you can wire the money.
I have made money from programs available on the Internet since 1999. At
start I used Share but due to VAT laws in Europe where I live it was easier
to use Plimus and RegNow. They pay all the VAT for you customers so you
never have to think about VAT.
If you have to create your own page you might be interested in using Roles
on the pages. Create an account for each affiliate or customer then set the
role for each affiliate or customer to for example Affiliate or Customer.
I have users who are licensed users after payning through Plimus or ShareIt.
I have a role called Affiliate and one role called licensed. When the user
logs in using the login page the site knoe what kind of uer it is. So that
way my licensed users and affiliates have their own pages.
You can also create folders that are only for users in a specified role.
Here's one example how to write the Login page which I calle Account.aspx.
For some reason my ISP's ASP.NET server doesn't like script to be called
Login.aspx. The parameter RedirectURL should be set to the page you want the
user to return to. For example:
If the page ~/Licensed/Default.aspx calls the ~/Account.aspx script call the
stricpt the with the following parameter
~/Account.aspx?RedirectURL=~/Licensed/Default.aspx
If the user is logged in and is in the role Licensed.aspx the user ends up
on the page ~/Licensed/Default.aspx
In the Licensed folder place a file called web.config. I have written to
code for that page after the C# script.
If any one tries to access a page in the folder Licensed who doesn't have
the role Licensed the user will not reach the page.
========================
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
public partial class LoginPage : System.Web.UI.Page
{
protected void RedirectToPage()
{
try
{
String sRedirectURL = (String)Session["RedirectURL"];
String Name = User.Identity.Name;
if (User.Identity.IsAuthenticated)
{
if (User.IsInRole("Administrator"))
{
Response.Redirect("Admin/Default.aspx");
}
else if (User.IsInRole("Basic User"))
{
if (sRedirectURL == null)
{
Response.Redirect("Default.aspx");
}
else
{
Response.Redirect(sRedirectURL);
}
}
else if (User.IsInRole("Licensed"))
{
if (sRedirectURL == null)
{
Response.Redirect("~/Licensed/Default.aspx");
}
else
{
Response.Redirect(sRedirectURL);
}
}
else if (User.IsInRole("Affiliate"))
{
if (sRedirectURL == null)
{
Response.Redirect("Default.aspx");
}
else
{
Response.Redirect(sRedirectURL);
}
}
}
if (sRedirectURL != null)
{
Response.Redirect(sRedirectURL);
}
}
catch (Exception ex)
{
}
}
protected void Login1_LoggedIn(object sender, EventArgs e)
{
RedirectToPage();
}
}
========================
==== web.congig ==========
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns="
http://schemas.microsoft.com/.NetConfiguration/v2.0">
<system.web>
<authorization>
<allow roles="Licensed" />
<deny users="*" />
</authorization>
</system.web>
</configuration>
========================
Yours
Lars