Roles.getallroles Method Not Appearing With Intellisence?
Apr 14, 2009
Trying to retrieve all roles for a user. Thought maybe I could select by User.
When I key " roles. " the getallroles method does not appear as an option. I get "Add,AddRange,BinarySearch,Capacity,Clear,Contains,Count,IndexOf,Insert,Item,Remove,RemoveAt,Sort,ToArray".
View 2 Replies
ADVERTISEMENT
May 30, 2009
I want to hide two specific roles from string Array(Admin,Member). Right now it lists all the roles
in my checkbox control. This is my code.[code...]
View 2 Replies
Aug 17, 2009
Last night 3 updates automatically installed from VS 2008 on my comp KB952241, KB971091 and KB973674 Today intellisence was not working for .net - I uninstalled the updates and everything is, once again, working fine I dont know what update did it ... But I was just wondering if anyone else has experienced this - I would rather not have the updates if they stuff things up.
Oh - and before anyone asks - I tried resetting the visual studio settings
View 1 Replies
Apr 7, 2011
While creating test in vb.net i found it pretty annoying when you start typing and autocompleet changes a class to something similar looking even it is a class you don't want. Image to illustrate : In the picture you can see I am trying to setup a controller (this controller does not exist at the moment) so when i press the spacebar i will get DienstControllerFacts.How do you disable this sort of auto-correction?
View 2 Replies
Jun 1, 2011
In visual studio programming in Vb.Net you get a special autocomplete around functions. If you add a name in front of a statement the rest of the line is treated like function parameters.
strInEditBy dsInfo.Tables(0).Rows(0).Item("plandesc").ToString()
strInEditBy ( dsInfo.Tables(0).Rows(0).Item("plandesc").ToString() )
I wanted to add a = operator in the place of the ( but unless I type really fast it auto-adds the ( ). How can I turn that off.
View 1 Replies
Nov 4, 2011
I have an issue to do with roles in mvc 3 vb.net app..Say I have Admin, Developer, PowerAdmin roles.. if I want to restrict view options based on roles I have been using a if statement in the view to hide the link all together such as:[code]I am also decorating controller actions with authorize in places. The Problem is this say I have several actions that should only be available to say a user who is in all three roles or even 2 of the roles in any combination.. Would I simply nest the if statements in the view to hide those view items? What about controller functions.. Is it possible to decorate controller functions with something like [code]and then have that function only accessible by someone with both roles????
View 2 Replies
Jun 21, 2010
Is there a method for checking which roles a user has in SQL using SMO? I can add a role via: user.AddToRole("Administrators") But cannot see an obvious method to progmatically list them.
View 2 Replies
Apr 23, 2010
I fiqured out how to create a new user in vb for SQL, but when I try to access the database, I get a select error. I went into SQLMSO and changed the membership role to db_datareader and db_datawriter and ran my form again and I was allowed to delete and add records. Is there a way with the below to add a user and let them add and delete records.
[Code]...
View 1 Replies
Jun 16, 2010
I am having a problem with my roles Identification. I am try to read all the roles for a given user. No matter what I try only the first role, only 1 role for the user is being returned. My code is as follows.
[Code]...
View 3 Replies
Jan 17, 2012
<authentication mode="Windows"/>
<authorization>
<allow users="USERS"/>
[code]....
Is there a way to write an if statement in here to detect what url I am on so I can allow a certain role for that certain URL.
Example code in my head of what I kind of want to see:
If (UCase(Url) = UCase("URL")) Then
<allow roles="ROLES"/>
ElseIF(UCase(Url) = UCase("URL")) Then
[code]....
Is this even allowed in the web.config? I have 3 websites. One for Dev, UAT and PROD. Now for each sites I have different user groups for each set up. I just want to find a way that I can just find what URL i'm at and point it at the certain user group. I'm guessing I have to make a web.config for each because you can't do conditional statements but I'm just making sure. If I have to make a web.config for each how can I go about setting that up?
View 3 Replies
Jan 15, 2010
I am creating a website using asp.net mvc model. When you create an mvc application asp.net automatically creates roles/profiles for user and admins (as far as i know) and corresponding tables in sql server database.I a need a new profile/role names "sponsor" that has all the benefits of users/admins (like authorization etc).
View 1 Replies
Dec 9, 2009
How to show menu according to their roles in vb.net2.0
View 8 Replies
May 13, 2010
[code]...
The code above throws a "Specified method is not supported." exception on the first line.
Any one knows what am doing wrong here?
View 2 Replies
Jan 22, 2011
How to add user to roles during CreateUserWizard.CreatedUser?What's wrong in this code:
Protected Sub CreateUserWizard1_CreatedUser(ByVal sender As Object, ByVal e As EventArgs) Handles CreateUserWizard1.CreatedUser
Dim username As TextBox =
[code]....
View 1 Replies
Dec 7, 2011
I am wanting to update our current windows forms security to something a lot more flexible. At the moment we have a single column in thew users table which is named 'Access_Level', this field holds an int value (1 to 4) which is then use to determine users access to certain areas of the application. This worked fine when the system was small, but the system is growing rapidly now so I think it is a good time to update the user access and possibly introduce roles.
[Code]...
View 1 Replies
Sep 2, 2009
I have a winforms (VB 2008) based app that I'm developing and I want to use custom roles for user access.Application Layout:I have a Main form that opens a login form when certain actions occur.The Login form intern uses an authentication class that I've created, to authenticate users and set access rights.On my Applications settings page, I have Authentication Mode set to Application-defined because I cannot use Windows Authentication in the environment where this will be deployed.
The application uses a MS SQL 2005 db and the 3 tables I'm using in the authentication process are the User_Account , User_Roles and User_Access tables. The combination of an account in the User_Account and the roles within the User_Roles table are the bases for the User_Access table. Using the User_Access table is how I assign access to the various functions within the application
Authentication Method:To authenticate a user, I'm using the "My.User.CurrentPrincipal" (Code below) method. The My.User object works great and allows the use of "My.User.Name" property throughout the app when referring to the currently authenticated user.
Access Method:In order to set the current users access levels I'm using a function within my Authentication class and passing in My.User.Name as a variable. The function uses a Dataset Table Adaptor and a Select Case statement inside a For loop to assign all the access levels for the user (Function code below).
My Problem:This method of assigning access rights to a user does work but it's not persistent throughout the application as the My.User object is.I would like to find a way to create custom roles through the My.User object using its .IsInRole property. I would like to have these roles dynamically created using my User_Roles table.This would allow the custom roles to be used throughout my application using the My.User.IsInRole ("MyRole")syntax ...similar to how I'm currently able to use My.User.Name.Unfortunately the only roles I can currently validate against are the built in Windows
type accounts (Adminisrator ...ect.).
'User Authentication example:
If Authenticate.CheckPassword(tbxUserName.Text, strPassword) Then
My.User.CurrentPrincipal = New GenericPrincipal(New GenericIdentity(tbxUserName.Text), Nothing)[code].....
View 1 Replies
Oct 19, 2010
Consider a MyForm class that contains a shadowed implementation of Show(). It also contains a CreateForm() method, which accepts an instance of the form and calls the shadowed sub:
[Code]....
View 3 Replies
Sep 13, 2011
I'm trying to host some static files for access by an ASP.Net web role and a separate data worker role that are both running on the same deployment (they use a global static interface).
However, I'm unsure how exactly to 'host' them, I've tried using virtual folders via HttpRuntime.AppDomainAppPath, but it only occasionally works in debug mode. The files also don't seem to get packaged into the deployment packages made by VS vis CSPack (though this might be a separate issue, is it possible to fix this too?)
The static files in question are actually WordNet, which I'm using through WordNet.Net, If that makes any difference. I also need the solution to work in both the cloud deployment and the emulator (if possible).
View 2 Replies
Apr 21, 2010
I am looking for ways to implement custom user-roles in windows application with vb.net. I got a database table called Roles with Administrator and User entries. User cannot see some of the form data. In ASP.NET MVC we can do like.
[Authorize(Roles = "Administrator")]
public function GetAccount() as Array
End Function
View 1 Replies
Feb 15, 2011
I'm developing a "small" warehouse-management WebApplication for few users(5-10 parralel) but with a complex authorization system(checking if pages,menus,TabPanels, UserControls and even single controls are visible or enabled) and permanent and frequent access. Because i've only limited experiences with the ASP.Net MembershipProvider, i'm unsure what's the best approach for following goal:
I want to hold all users, roles and frequently used masterdata in the Cache(in a Dataset). Hence every readonly access should be faster and causes less traffic than always using the database. On updates,deletes and inserts i would update the cached dataset and also the database.
Can i use or extend the SqlMembershipProvider to achieve this goal and if possible how?
View 1 Replies
Nov 22, 2010
Is it possible to use membership roles using sql provider in windows forms application
View 1 Replies
May 30, 2012
I am trying to restrict access to an intranet site via Windows authentication. I would like to control access via active directory user groups, but my added AD groups don't appear to be recognised by .net. I started with the following test code in my app to determine if the group could be used...
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Me.Label1.Text = User.Identity.Name
[Code]...
The isuserinrole returns false and the group is not shown in getrolesforuser. However, getrolesforuser returns all of the built in windows groups as well as custom admin user groups created by our anti virus software (SOPHOS). This tells me that .net doesn't seem to have any issue with reading our active directory but I don't understand why my custom group is not being recognised.
View 1 Replies
Dec 16, 2011
For example lets say I want only admins to be able to see and edit CustomerID in details view, moderators can see this value but it is not editable, and regular users cannot even see it.
View 2 Replies
Nov 23, 2009
How to enable / disable menu items based on allowed security roles specified for an item.
View 6 Replies
Aug 16, 2010
I start by using the ActiveX controls and access data from an Excel file but all it does is show the excel file and the changes I made The Visual Basic screen does not pop up directly afterwards.The graphics work in other programs.
Dim gphFormGraphics As Graphics = Me.CreateGraphics
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load[code]....
View 2 Replies
Nov 3, 2011
I have a problem where a button at the top left of a tab control will not appear in debug or compiled. There is no code telling it to hide.
Now, I can make it re-appear by moving it, then moving it back to the exact same position. If I then re-build it will be there.
It will then be there for a number of builds, at which point it might disappear again. This seems to happen for a few buttons in my project. The common factors are that they are on a tab control (standard dot net ctrl) and near the top left of a tab page.
View 13 Replies
Apr 14, 2011
[
Private Sub ExitButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitButton.Click
End
End Sub
[code].....
View 1 Replies
Oct 6, 2009
I have my software installed on numerous machines and on all but one it is fine, however on this final computer the font comes up very small. It is only in my software, nothing else on the computer. I'm using Arial size 10 and bold, nothing fancy and as i say it works on all the others.
View 2 Replies
Jun 9, 2011
I have a very annoying problem with adding new records to my Access Database, I'm not getting any syntax errors but there's obviously a symantic error of some kind causing this headache. I've been developing an RFID system for two months now and spent the last four weeks trying to fix this one issue, if anyone can see wher
Private Sub m_btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles m_btnSave.Click
Dim da As New OleDb.OleDbDataAdapter
[code].....
View 2 Replies
Mar 8, 2009
I have been running my project using F5, it says Ready and then nothing happens. It goes it debugging mode )Play button is disabled, pause and
View 9 Replies