aspnet_Roles

  • Thread starter Thread starter ascll
  • Start date Start date
A

ascll

Greetings,

How do I use SQL script to insert record into aspnet_Roles?

The [ApplicationId] and [RoleId] are solely depend on machine, but we cannot
insert NULL value.

Any idea?

thanks
ascll
 
ascll,

There is a stored procedure installed by default when you run aspnet_regsql,
called "aspnet_Roles_CreateRole".

It expects @ApplicationName (nvarchar(256) and @RoleName (nvarchar(256)
parameters. If you know the specific ApplicationName, you can call this
procedure with the new Role name.

If the Role name already exists, or the ApplicationName does not correspond
to an existing application, it will throw an error.

Hope this helps,


Steve
 
Back
Top