DataSource Controls :: Give Db_datareader Rights To A Different User?

Feb 16, 2010

I need to programmatically create a database, some tables in it and then give db_datareader rights to a different user. The DB is mssql server 2005.

I got half way, I managed to create the database with "CREATE DATABASE Test", create some tables in it with CREATE TABLE. I'm doing this with a user that is in sysadmin role.

Now I'd need to do with code what manually (with Server Management Studio Express) I accomplish by: opening Security/Logins/[USERNAME] properties Map the user to the database (Test)Add check db_datareader

View 2 Replies


Similar Messages:

Security :: Getting User Rights For Use In WebClient?

Jul 7, 2010

I've got a site that users can use to check in and out documents. To check out a document, the user slects a file from a list, and clicks 'check out' . The document is taken from a 3rd party source control tool and placed in a dedicated directory on the server. Then, the file needs to be copied from this directory to a client directory the user has specified.

Copying to the Server is no problem.

I'm trying to use the WebClient objects DownloadFile method to write to the clients directory, but I keep getting "Access to the path '<path>' is denied.". I've set the UseDefaultCredentials flag to true, but no joy.

I'm obviously missing something, but I'm not sure what.

View 3 Replies

Security :: How To Choose A User And Store Specify Their Rights In C#

Mar 14, 2011

Roles: - administators

If it administator shows menu "Admin".

If I want to display the menu: "Create new employee ', have to create Roles: new_employee?

If so, how to choose a user and store specify their rights in c#?

View 3 Replies

Configuration :: User Rights When Running Office?

Aug 31, 2010

I've got an ASP 4.0 website running on IIS 7.0 . Part of the web site creates an Excel document using C#, due to company policy I'm stuck with Excel 2003. I've noticed that when I deploy the site and use the part that creates the Excel file, its running Excel application object with the login of the user accessing the site. This causes problems with access rights to the Server.

How do I set the server up to run the Excel application using a fixed account? I've got the Application pool running under one, and I thought that would solve the problem, but it doesn't seem to.

View 1 Replies

VS 2008 - Showing Menus According To Assigned Rights Of User

Sep 2, 2011

I m developing a Web Based Inventory System Using ASP.NET which have a menu containing 16 options overall. I have created a menu using <ul> <li> tags. When I open my project in browser, it shows all the 16 options even i logged in with Administrator or Purchaser or Seller or Accountant etc.

I have a form to assign the Form Access Rights to every user. For example Administrator can use all the options but Seller can use only 3 options (Sales / Sales Return / Today's Sale Report). Purchaser can use 3 options (Purchase / Purchase Returns / Today's Purchase Report) Accountant can use 2 options (Payment / Receipts) etc.How can i show the menus to the users according to the rights assigned.

View 7 Replies

Security :: Sitemap Control User Rights Enable And Disable?

Aug 27, 2010

iam using masterpage and sitemap in my project, what i want to is that if user login is did, based on the user previlage in need to show the sitemap menu page if user i have the previlage to see the page then i should enable that page otherwise i need disable that page

View 1 Replies

How To Give User Controls Unique IDs When Added Dynamically

Jan 30, 2010

I have a user control, which is added dynamically, but I have noticed that when it is on the page and viewing the source that none of the controls within have been given unique ids. How do I give my user control and the controls within unique ids in order that I can use them in my events?

View 5 Replies

DataSource Controls :: Make An Algorithm That Will Give A Different Key Number?

May 11, 2010

I have two tables which at first I made both of their primary key auto increment.I finished what needed to be done and faced an error.I realised that auto increment was not a good solution for this case so I decided to make an algorithm that will give a different key number.So I went to tables properties and removed their ID Specification (is ID) and turned it no.

View 7 Replies

User Tree Like Show In Picture - How To Give Such A UI To The User

Aug 24, 2010

I need to develop a web applicaiton which will have a user tree like shown in the picture.Generate Labels dynamically with different "CSSCLASS" and design it like that.

Admin,
Coordinator,
TeamLeaders,
Endusers...

How to give such a UI to the user.... There no options required, but it want to show as group and team level.

View 4 Replies

Security :: Apply Rights In Login Form And Create User Form?

Dec 9, 2010

i have created loing form and create user form. then how to apply login rights..? i have 2 types of user. admin and normal user admin can move and use all pages while normal user can acces limited pages.

View 4 Replies

Forms Data Controls :: Want The User To Click Details And It Give Me A Pop-up Showing Details Of The Particular Row

Mar 11, 2011

I have a gridview control with a details column. I want the user to click details and it give me a pop-up showing details of the particular row. Any idea on how to do this using JQuery?? Looking for an example with code..

View 1 Replies

Give Full Control To User?

Mar 2, 2011

My global.asax is not being triggered on errors on my production server..It's works fine on my dev server but I can't figured out why. my app is using asp.net 4.xxxx and iis6. I've read on web about PrecompiledApp.config but I don't see that anywhere on dev or rod..what are some things to look for..also, On my dev server the error is written cleanly to eventlog but on prod I get message below. The description for Event ID ( 0 ) in Source ( Application ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: ........

View 5 Replies

Way To Give The Access To Many User At A Time

Jul 15, 2010

IBecuase if they the UrlReferrer is my applicatin then i want them to allow access to a file.Otherwise not.I know the urlReferrer is null if you go directly to the link, but thats not possible.In my test solution it works great, but if i put it online i got null values, sometimes he gives a value but mosly its null...

View 5 Replies

Web Forms :: Give Each User Own Page?

Dec 20, 2010

this might be a little bit random but im wondering how do i give each registered user his own page that is only editable by him but at the same time viewable by other users like :

1- user registers and gets his own page and then lets say he can add some text .

2- other users can view the page but not customize or edit it.

View 12 Replies

Give Permission To User Programmatically

Feb 7, 2011

i use this codes to give permision to user for some pages

[Code]....

i know that i can use IsUserInRole("UserName") method to give permision to user but, i'm looking for something else because, i can't check all roles for all pages and also i write the code in web.config file because of i use sitemap for menu and with this method i can show the user that part that's allow for that user. now my question is: can i write some code to do the same method that, i write some codes in web.config file?

View 1 Replies

Forms Data Controls :: Fill Gridview Based On Rights?

Oct 10, 2010

I have a master table that will hold the information for publications for my company. Not all of the publications can veiwed by all users. What I am trying to figure out is how can I load all of the publications that the user is allowed to see into one grid view table. For example: If Mary logs in she will only be able to see Accounts publications; if Sally logs in she can see General and Legal publications and if John logs in he can see IT, Legal and General publications.

I figured out how to do it with separate gridview tables on a page based on the roles. I would make a gridview viewable if the user was in that role. But I would really like to put all of this in one gridview if that is possible.

View 8 Replies

Web Forms :: Give Facility To User Add Details In DeopDownList?

Aug 20, 2010

I have bind DropDownList from database. I want to give facility to user such that, when user type in DropDownList ,it behave like textBox.

View 2 Replies

SQL Reporting :: Give The User 3 Options In The Form Of Radio Buttons

Jan 8, 2010

I have a report that I would like to give the user 3 options in the form of radio buttons. How do I implement this?

View 2 Replies

How To Give Javascript Alert To User On Leaving The Site / Domain

Nov 18, 2010

If I use this

window.onunload = unloadPage;
function unloadPage()
{
alert("Hello world");
}

this would cause an alert even when going to pages within the site.

Any way to use this but only when the user leaves the site/domain?

View 3 Replies

Forms Data Controls :: Show Columns In Gridview Based On Access Rights?

Feb 3, 2011

I want to show columns in gridview based on access rights/roles.That is i want to show parents column if there is parents login or else i want to show students column if there is students login.

View 2 Replies

Created One Exam Module Where User Will Give The Answers Of Objective Questions?

Feb 4, 2011

I have created one exam module where user will give the answers of objective questions.I have created next buttoon now i am getting first question in form load and now on click of next button shall i increase the question no +1 or some thing else.

View 1 Replies

Web Forms :: Give A Client Side Validation All The Function Work,but In Confirm Password Its Not Hide Wen Give A Correct Password?

Jun 16, 2010

I have create a masterpage and add content page include user (firsname,lastname,password,new password,confirm new password adn etc..)detail update field. i try to give a client side validation all the function work,but in confirm password its not hide wen give a correct password.. anybody give correct solution..code are below..

[Code]....

View 2 Replies

DataSource Controls :: Use Dataset To Display Sum Where User= User.identity.name(not Use Gridvew, Or Formview)?

Oct 27, 2010

i want to use dataset , or any thing ... to display Sum * where user= user.identity.name(not use gridvew, or formview) because i have more then 100 columns . i m newbie. realy , 1 month, it not solve, sometime , i want to give up

View 3 Replies

Default Access Rights Of IIS?

Jun 9, 2010

Im just wondering if the default access rights of IIS in the PC where it is running is administrator? and by default does IIS has access to computer resources e.g. Printer, Finger Print Scanner, Smartcard reader installed in the same computer where the IIS is running.

View 1 Replies

Lost Connection Rights To Access DB?

Mar 17, 2010

Somehow I deleted my App_Data folder and had to recreate it... it only had one database in it ... an Access Database. My .aspx pages that use the DB are giving permission errors when they load... I can't find anyplace in my DB or on my VWD Express where I can set the permissions (nor on my hosting service).

View 16 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved