I have added a new example page to the web project template (http://www.ajaxpro.info) that will show how to use the AuthenticationService and SecurityPermission attribute.
See this example:
------------------------------ using System; using System.Data; using System.Configuration; using System.Web; using System.Security.Permissions;
public partial class SecurityCS : System.Web.UI.Page { [AjaxPro.AjaxMethod] [PrincipalPermission(SecurityAction.Demand, Role = "Admin")] public static string AdminMethod() { return "Hello Admin!"; }
protected void Page_Load(object sender, EventArgs e) { // Register Ajax.NET methods from this class AjaxPro.Utility.RegisterTypeForAjax(typeof(AjaxPro.Services.AuthenticationS ervice)); AjaxPro.Utility.RegisterTypeForAjax(typeof(SecurityCS)); }
}
------------------------------
The AuthenticationService lets you sign in and out directly from JavaScript code:
I will add more and more examples to show how powerful Ajax.NET Professional is today. As I can imagine not everything that is inside the lib is known by everyone, so, let me create these examples and tutorials next days.
Regards, Michael
PS: Do you have any need as an example? Next I will show how to use the ProfileService, after this I will build a page with DropDown controls...
yeah,there aren't enough tutorials now, esp the structure of AjaxPro lib,the usage of all classes... and more examples are really needed. well,i can see the power of AjaxPro, so Michael ,keep going. looking forward to more great works from you.
> yeah,there aren't enough tutorials now, esp the structure of AjaxPro > lib,the usage of all classes... and more examples are really needed. > well,i can see the power of AjaxPro, so Michael ,keep going. > looking forward to more great works from you.
Because I don't want to see my source built in own assemblies/products the source code will be everytime some weeks older than the current release. I hope you understand me... The source code was uploaded to show how the lib is done internal and not to build your own lib from the source code. I have already had a lot of discussions about this...
Regards, Michael
On 5/12/06, Gonzalo Brusella <gbruse...@gmail.com> wrote:
> > yeah,there aren't enough tutorials now, esp the structure of AjaxPro > > lib,the usage of all classes... and more examples are really needed. > > well,i can see the power of AjaxPro, so Michael ,keep going. > > looking forward to more great works from you.
> > great thanx
-- Best regards | Schöne Grüße Michael
Microsoft MVP - Most Valuable Professional Microsoft MCAD - Certified Application Developer