How To Store The User Preferences

Jan 26, 2011

In my pages, the first thing I do when a page is being displayed is query a table called user preferences. I'm doing this for every page and I was wondering what are the options available to avoid repeating this query as the user jumps from page to page on my application.

View 1 Replies


Similar Messages:

LINQ Query Based On User Preferences?

May 12, 2010

I have a LINQ Query that includes an order by that is based on a user preference. The user can decide if they would like the results ordered asc or desc.

[code]....

View 2 Replies

C# - Setting Default Preferences To The Printer Through The Code?

Feb 27, 2011

Is there any way to set default setting to the printer through the code , so that i can imagine union and one layout for all users.

View 1 Replies

Perform User Management (store User Info, Login , Logout Etc) Without Using Session Or Cookie?

Dec 1, 2010

Is it possible to perform user management (store user info, login , logout etc) without using session or cookie?

View 3 Replies

Security :: Userid Of Newly Created User / To Store Additional Details Of The User In Another Database Table

Nov 10, 2010

Our application lets the administrator create new users. Since the administrator is logged in, I have set Logincreateduser = false so that the administrator is not logged out even after creating the new user.

The problem is :I need the userid of the newly created user to store additional details of the user in another database table. I see that i can get the username using Createuserwizard1.username; but how do I get the userID?

View 2 Replies

Security :: Store User Password In Custom Membership User

Aug 12, 2010

I have a custom membership user class and custom MembershipProvider working against database. Due to security reasons the user passwords are stored in the database as hashed values. So my procedure

public override bool ValidateUser(string username, string password) is
{
//select hashed password from db
return (EncodePassword(password) == dbpassword)
}
[code]....

View 4 Replies

How To Store User ID In Session

Feb 15, 2011

When the user logs in, I want to store his userID in the session with

HttpContext.Current.Session["UserID"] = 2354; (this is just a hard-coded example)

Then, when I run a page method, if I do

var test = HttpContext.Current.Session["UserID"];

will the variable test hold the value I stored when he logged in?

If this is a correct way of doing it, how do I access the session when I receive a call from a page method? I want to put the test =... line in a page method to identify which user the request is coming from.

View 5 Replies

MVC :: How To Store Active User Object

Apr 8, 2010

I'm not using the microsoft MembershipProvider system. I'm open to using bits and pieces of it.

In Web Forms I stored a lightweight User object in the Session Variable.

[Code]....

Then whenever I needed the full force of a user object I would ask my repository to return me the User object that matched (be it from the database or cache).

Where do I store my LightWeightUser object for the session's user in MVC, I see I still have access to Session, but is there a better place?

View 2 Replies

Store User Input In A Database?

Jan 7, 2010

I'm creating a website with ASP.net and I have a sign up page. The user has to enter a name and password in textboxex, and choose a location and reason for joining from dropdown lists. (There is a built in wizard for new user sign-up but I chose not to use it).I would like to save the information entered in a table in a database in the App_Data folder. How do I do this?

View 3 Replies

MVC :: How To Store Persistent-user-session Information's

Aug 8, 2010

i have a list of fields that i would store for all the user session. I thought to create a class, insert the information in it and store the class in the session but i'm not sure this is the best way to do it (performances, etc). I should have a list of these informations that i can display in views, i can delete and i can update. How could i do this?

View 10 Replies

Security :: How To Store / Get The Details Of The Logon User

Sep 5, 2010

We will put the active directory logon when the user access the website, the user needs to fill in his user name and password.

How do we store/get the details of the logon user once the user is logged in?

View 2 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

Security :: How To Store User Info In Web.config

Apr 26, 2010

Using visual studio 2010.

Dragged and dropped a login control onto a blank content page. Set up my web.config (i'll include the code for that at the end). It seems to want to use a sql database to store the info. I just want to use the web.config since it's just a single user and a simple site. I thought I could just drag and drop the login control to a page and that would be the end of it (besides setting up the web.config).

Here's what i have in the config file

[Code]....

View 2 Replies

Authentication - Where To Store The Username Of Logged In User

Sep 29, 2010

When a user log into my asp.net site I use the following code:

FormsAuthentication.RedirectFromLoginPage(userid, false);

As I often need to use the userid I can then later get the userid by:

string userid = System.Web.HttpContext.Current.User.Identity.Name;

Now I also want to show the logged in username on each page and my questions is therefore where do I place the username best if I need to use it on every page. User.Identity.Name is already taken by the userid so I can't use that one. Another solution would be to get the username from the database on each page, but that seems like a bad solution.

View 4 Replies

Session, FormsAuthenticationTicket, Store Data About The User?

Feb 1, 2011

I'm am building an web application that needs to be able to scale.We want to store, an connection string, an object that says what organization the user is working on right now and the identity of the user.

We could serialize down this and send through the userdata property in the FormsAuthenticationTicket, but that feels to not be the optimal solution, cause its is 4-5 strings of data that is unncessesary, but the main issue is that we are sending an encrypted connectionstring to the user which we dosent want to.

So what are our options?Can ASP.NET Cache be our solution?, can we couple the expiration of the asp.net cache and the formsauthenticationcookie?

View 2 Replies

Where To Store And Set User Site Wide Data In MVC

Feb 16, 2010

I have an application in which a user can choose from different (learning)groups. User has only access to registered groups. When the user enters the site, he can choose (in a dropdown) which group he wants to see, so the complete site filters content related to that group. So every controller needs to access this global "group" object.What is the best way to do this in ASP.NET MVC? I've thought about a BaseController or ActionFilters. Is there any other best practice?I've build a WebForms application and there I used a BasePage so that any other page has access to the group.

View 2 Replies

Using SQL Membership Provider - Store Own Per - User Data?

Mar 27, 2010

I'm using the ASP.NET SQL Membership Provider. So, there's an aspnet_Users table that has details of each of my users. (Actually, the aspnet_Membership table seems to contain most of the actual data). I now want to store some per-user information in my database, so I thought I'd just create a new table with a UserId (GUID) column and an FK relationship to aspnet_Users. However, I then discovered that I can't easily get access to the UserId since it's not exposed via the membership API. (I know I can access it via the ProviderUserKey, but it seems like the API is abstracting away the internal UserID in favor of the UserName, and I don't want to go too far against the grain).

So, I thought I should instead put a LoweredUserName column in my table, and create an FK relationship to aspnet_Users using that. Bzzzt. Wrong again, because while there is a unique index in aspnet_Users that includes the LoweredUserName, it also includes the ApplicationId - so in order to create my FK relationship, I'd need to have an ApplicationId column in my table too. At first I thought: fine, I'm only dealing with a single application, so I'll just add such a column and give it a default value. Then I realised that the ApplicationId is a GUID, so it'd be a pain to do this. Not hard exactly, but until I roll out my DB I can't predict what the GUID is going to be. I feel like I'm missing something, or going about things the wrong way. What am I supposed to do?

View 3 Replies

Web Forms :: Where Shall I Store User Selected Themes

Jan 23, 2010

I have a simple ASP.NET web site with membership (using SqlMemberShipProvider). I allow users to select a theme to setup a design of the pages they like.

Now the question is: Where shall I store this selected theme per user?

My initial idea was to use profiles. So I have defined a profile property called "Theme" in the web.config file. All this works so far as long as the user has logged in to the web site.

But there remains one open point:If the user isn't logged in and enters the login page how can I make sure that he sees the login page with the theme he has selected before?

Obviously (at least I think it's obvious) I cannot pull the theme of the login page from the profile of that user as long as he hasn't logged in.

So how can I overcome this issue? Is it perhaps the wrong place to store the theme in the user profile table? Should it be better stored somewhere on the client PC of the user?

View 5 Replies

Web Forms :: Best Way To Store User Specific Information?

Sep 18, 2010

What is the best way to keep track of user specific information?

I want to show information in querys etc based upon specific properties, for instance a users belongs to a dealer, and that dealer has an ID.

So is it a good way to store that dealer ID in a session variable or should I consider a other option to use this on multiple pages.

View 7 Replies

In Which Folder Can Store User Uploaded Images

Feb 10, 2011

I've a classified ads system on ASP.NET/c#/MS SQL, and I'm trying to figure out where to store the images that people upload when placing an ad. The ad itself is being stored in a SQL server database.

The images are now being stored in a subfolder of my webapp. It seems to work fine, however I only recently discovered a big problem. Everytime a user deletes an ad, the attached images are to be deleted as well including the folder they reside in. This leads to a restart of the asp.net application. I searched internet and found that restarting the web-app is actually intended behaviour when a subfolder is being deleted.

I can remove these images including the folders they are stored in?

I can acces them using a URL (the images need to be shown in the webpages) Without getting the web-app being restarted?

View 3 Replies

Security :: Use Or Store Roles For Add A New User Or Update?

Jul 2, 2010

Ive been exploring the tabls in the membership database to see how they are structured. If i add a new user or update an existing one i see it in the user and membership tables. But i dont understand how to use or store roles. I use the ASP.NET CONFIGURATION toll in the WEBSITE menu to create roles and create access rules, but those roles dont show up in the Roles table in the db!

Yet the roles are stored cause they keep apearing in the ASP.NET CONFIGURATION. How weird is not that? Where is it stored and how can i access it? I need to programatically check if the user who is logged in is in a certain role.

View 8 Replies

Security :: Using Same User Store For Multiple Apps?

Oct 5, 2010

I have spent hours on the forum trying to find this answer. I have a requirement on a project. There is an internal (intranet employees only) site which has much more control over the data etc. and i have an external site (to allow customers to enter usage data). I am using forms auth and hitting a common sql server 2008 db with the standard aspnet schema. I have an internal web server and an external web server both windows 2003. The problem that i am having is that if you are logged into the external site and then open a new ie window and enter into the internal site, even as a different user it logs you out of the external and vice versa. I don't have access to update the machine config.

I started out as a single app in the db but now have seperated into 2 apps and i am able to log in as an external admin and see only the external users and vice versa. Creating a seperate security only db for the external app is not an option because i have a I have the application name listed in the web.config for both internal and external which matches the app name in the aspnet_applications table.

external app

[Code]....

[Code]....

View 2 Replies

Database - Store User Information On Submit?

Dec 29, 2010

i have this form, that the data is stored in a SQL db using Linq.

my question is, how can i add a column, that will have all the information about the sender, meaning IP address, browser, referrer etc.

the thing is is i want to store it in one field. i come from a php knowledge that has been long forgotten by me, but i still remember there was some serialize command, that you could run on an array and store it in a db, then when you want it back to an array you would just run deserialize command and it would go back to an array.

View 1 Replies

MVC Use An Extra Table To Store User Profile?

Dec 27, 2010

ASP.NET MVC Can I use an extra table to store user profile? And how to do that?Something I've done here:I have a database table has userId name, email, password stuff.I want to use all the information in this table for user authentication, and also for user profile. How can I do that in Asp.net Mvc2 project

View 1 Replies

Configuration :: Xml File To Store User Credentials?

Oct 6, 2010

I'm looking for a way I can store username and password credentials in a web.config file & use these values to re-direct to another web service, once these are authenticated.

The process is as follows:

* User logs into our website with required credentials

* There is a link on our website which invokes a new webservice

* The webservice is a paid for subscribed service (which requires authentication)

* Usually, there is a web form for this type of web service but since we need to steam-line the process from initial application logon, the logon page is not required.

* So when the link on our website is clicked, the new webservice is invoked. Authentication should be done by using the credentials in the web.config file and user is redirected to webservice (avoiding logon page)

Could someone tell me using pseudocode or a small asp.net code example how we could achieve this process?

The key goal is to avoid user going into the Logon page and redirecting directly to the URL for usage of the webservice.

View 2 Replies







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