Questions tagged [sqlroleprovider]
19 questions
9
votes
1 answer
Does Role Provider cache per request?
My MVC application makes use of a User's Role in multiple places during individual page requests. My question is whether the default SqlRoleProvider caches the current User's Roles for the lifetime of a page-request?
For example, I make use of…

Appetere
- 6,003
- 7
- 35
- 46
9
votes
7 answers
Do most people use .NET's SqlMembershipProvider, SqlRoleProvider, and SqlProfileProvider?
Do most people use .NET's SqlMembershipProvider, SqlRoleProvider, and SqlProfileProvider when developing a site with membership capabilities?
Or do many people make their own providers, or even their own membership systems entirely?
What are the…

John B
- 20,062
- 35
- 120
- 170
7
votes
2 answers
SqlRoleProvider: NullReferenceException when calling Roles.GetRolesForUser
Scenario:
WCF Service using SqlRoleProvider for authentication with a Sql Server 2012 Database server. WCF is hosted on a IIS7 webserver.
please see this error:
System.NullReferenceException: Object reference not set to an instance of an object.
…

Obelix
- 708
- 11
- 24
3
votes
1 answer
ASP.NET 3.5 IIS7 Roles Security Implementation
I'm working on a ASP.NET 3.5 application running on IIS7 (Server '08) using the stock MS Forms Authentication and SqlRolesProvider. (I used the aspnet_regsql tool to generate the tables).
We have three roles: SysAdmins, AppAdmins, and Users. All…

Toby
- 647
- 4
- 14
3
votes
3 answers
SqlRoleProvider on IIS8 Express
My web application (a WCF service) uses SqlRoleProvider, which works fine on Visual Studio Development Server. Switching it to IIS8 Express causes it to throw a NullReferenceException though:
Roles.IsUserInRole(username, role) // neither of them…

Matthias Meid
- 12,455
- 7
- 45
- 79
2
votes
2 answers
What do the ASP.NET Universal Providers enable that the default sql providers don't?
Inside the readme file of the ASP.NET Universal providers NuGet package is this quote
The SqlMembershipProvider, SqlRoleProvider, SqlProfileProvider classes that shipped in ASP.NET through version 4 support only Microsoft SQL Server and Microsoft…

David Burela
- 444
- 3
- 11
1
vote
1 answer
Add new Role to SiteMap
In my program, I have an option for Administrators to add new roles to the database. This, of course, utilizes the CreateRole method from System.Web.Security.Roles:
Roles.CreateRole(newRoleName);
Now I'm wondering, is it possible to modify my…

JamesP
- 195
- 1
- 3
- 17
1
vote
1 answer
How to assign users the security roles associated with Active Directory
I have a different access role for each of the pages in my application (using Windows Authentication) to restrict users from access, using SqlRoleProvider. So to add users to role, I would go,
Roles.AddUserToRole(userName, roleName);
Now, I need…

viv_acious
- 2,429
- 9
- 34
- 55
0
votes
1 answer
Database role can access the table through stored procedure for which it has no access
I have created a database level role: NonBillingRole.
CREATE ROLE NonBillingRole
then granted it all access and revoked/denyed access of Billing table through following command:
REVOKE SELECT, INSERT, UPDATE, DELETE ON TblBilling TO…

Yash
- 356
- 1
- 5
- 22
0
votes
2 answers
How can I manage stored procedure rights of the role in SQL Server
I want to create three SQL Server database roles.
That can CREATE, ALTER and EXECUTE all stored procedures in database
That can only EXECUTE all stored procedures in database
That have no access to any stored procedures in database
I have created…

Yash
- 356
- 1
- 5
- 22
0
votes
1 answer
Azure - Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'
This error just happens infrequently. When it occurs, I access the website form a different device then it goes away for a while and comes back about 10 mins later...
ERROR PAGE:
Could not find stored procedure…

Khoa Tran
- 121
- 1
- 9
0
votes
2 answers
Roles.CreateRole insert fails
I'm trying to learn how to use Sql Role Provider in a test mvc application. I have configured the web.config file and am connecting to a pre-existing sql server database (meaning I am not the one that created it).
protected void…

user3738893
- 425
- 1
- 6
- 18
0
votes
2 answers
ASP MySQLRoleProvider tie roles to users
I would like to use the mysql role provider for aspnet. I have setup a custom table for the users using the attribute userTableName="user". Now the problem is that when I assign users to roles, MYSQLRolesprovider creates an entry in a table…

Sello Mkantjwa
- 1,798
- 1
- 20
- 36
0
votes
1 answer
How to add role member for existing database
I want to add role member to my databases dynamically with the help of below query:
use MyExistingDatabase
GO
EXEC sp_addrolemember @rolename = 'db_owner', @membername = 'A38'
GO
execute as user='A38'
GO
CREATE TABLE [A38].[ABC] (
[Id] …

user3124690
- 413
- 1
- 12
- 25
0
votes
1 answer
ASP.Net MVC 4 Manage Roles - Windows Authentication
I have a MVC 4 web application which I want to implement SqlRoleProvider and Windows Authentication into it.
After I did search in Google I added SqlRoleProvider tables in my database by running aspnet_regsql command in VS command prompt.
Then I…

mhesabi
- 1,140
- 3
- 22
- 48