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
 

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

Back
Top