Note that there are some explanatory texts on larger screens.

plurals
  1. POSimpleMembership WebForms Asp.net 4.0 roles
    primarykey
    data
    text
    <p>I am trying to find a way to manage roles for an existing WebForms ASP.NET 4.0) application. This is not MVC. I cannot change the existing project to MVC nor .NET 4.5, so please provide solutions given my requirements.</p> <p>I was looking at SimpleMembership as a possible way to manage roles without having to install the whole membership (aspnet_regsql.exe) with tables that I don't need. </p> <p>This is an intranet site. Users will be authenticated via their windows identity, so there is no login <em>per se</em>. Most users will not be in any user database, and I want to control roles so that if they are not specifically provided additional roles, they still have access (perhaps a public role, or simple no role). </p> <p>For the users that will be in a database, I want to be able to assign roles (Admin, Manager, etc) so that they have greater access to various pages and features. A user could have no role (or public, as mentioned above) or have a single role or multiple roles.</p> <p>So, is it possible? Can I have a role based system for only those users that are in a table and make everyone else access parts of the site without having to login?</p> <p>There is an existing table of users in SQL Server. I should be able to use this, not a text file / xml / manual approach. An admin page will be created to assign roles to users and add users. </p> <p>It seems that I should be able to use SimpleMembership according to this: <a href="http://blog.osbornm.com/2010/07/21/using-simplemembership-with-asp-net-webpages/" rel="nofollow">http://blog.osbornm.com/2010/07/21/using-simplemembership-with-asp-net-webpages/</a></p> <p>Though it says that I need to add _start.cshtml with some MVC code, this will be fine as long as I don't need to convert the whole site to MVC. </p> <p>Currently, I am getting an error with this: </p> <pre><code>The type 'WebMatrix.WebData.WebSecurity' exists in both 'c:\Windows\Microsoft.NET\assembly\GAC_MSIL\WebMatrix.WebData\v4.0_1.0.0.0__31bf3856ad364e35\WebMatrix.WebData.dll' and 'c:\Windows\Microsoft.NET\assembly\GAC_MSIL\WebMatrix.WebData\v4.0_2.0.0.0__31bf3856ad364e35\WebMatrix.WebData.dll' </code></pre> <p>I think that once I fix this, most likely a web.config setting, that I should be fine.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload