Access :: How To Pass Userid And Password In Web.config Got From Session Variable

Mar 19, 2011

I have got a requirement to pass password and UseriD to web.config placed in a session variable . How can I do this?

in VB file it is written in this way. So, I have to pass it in Web.congif the Session variable.

dataSource.ConnectionString = "Provider=MSDAORA.1;Password=ssa_nic_" & Session("dist_code") & ";User ID=dise" & Session("dist_code") & ";Data Source=dise;Persist Security Info=True"

View 8 Replies


Similar Messages:

State Management :: Public Variable Vs Session Variable To Store Logged In UserID

May 17, 2010

I have a web application which uses a session variable to store the logged in userid. If no user is logged in, of course this variable will be empty and the contents displayed on my website are meant for guests. If there is a user logged in, the user specific controls/access/links will then be a displayed.

I am now having issues with my hosting where on shared application pool, the worker recycle is triggered every 90 minutes, this will clear sessions causing all my users to be logged out. I opted for a dedicated application pool, which got worse because I am only allocated 50MB memory limit and if this is reached, the worker recycle is triggered and I lose my sessions again. I have tried as much as possible optimization techniques, e.g. dispose where possible, close connections, disable viewstate for static controls etc but my memory per instance keeps building up from page to page without any signs of improvement. I don't use loops nor store huge objects like bitmaps etc but my sessions are now gone even faster than 90 minutes in shared application pool before.

I have considered using SQL Session State but there isn't a simple guide on using this with MySQL. I am getting desperate and considering using a public variable, a string as a replacement to store logged in user id instead of in a session variable. I am pretty sure this will solve my issue with sessions being recycled but are there any negative consequences of doing this? One problem I can think of is if the user closes the browser, the system will never know that the user is now logged out and this public variable should be nothing. In this scenario, will the GC eventually clear this abandoned public variable.

View 10 Replies

Control Website Folder Access Using Web.config And Session Variable ?

Jan 27, 2011

the following web.config file is placed in a specific sub-folder on a website. It will allow the user John.Doe to access the pages inside the folder but will deny anonymous users

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web> [code]...

Is it possible to replace users in the following web.config file with certain session variable for example getting the day(sunday, monday, etc) from date and storing it in session("DayVar")

then the code should be something like this for the subfolder monday

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web> [code]...

is this doable ?

View 1 Replies

Web Forms :: How To Set Password TextBox Value From Session Variable

Jun 18, 2013

i have two pages

i just want to transfer my textbox value  into another page. my first page field is password. when i type something in my password field the value cannot be display the another page .

it as showing empty textbox. but if i change other field like name it can be display another page. so why not my password value cannot be display the another page. Code below...

defualt.aspx:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>

[CODE]....

View 1 Replies

VS 2008 Can Use A Session Variable In A Web Config Connection String

Jun 16, 2010

Can you use a session variable in a web config connection string? So instead of:

Code:

<add name="ConnectionString2" connectionString="Data Source=ora;Persist Security Info=True;User ID=SA;Password=PASS;Unicode=True"

something like this:

Code:

<add name="ConnectionString2" connectionString="Data Source=" & Session(DB) & ";Persist Security Info=True;User ID=SPAR;Password=;Unicode=True"

View 6 Replies

Web Forms :: Pass Session Variable Value In Query String

May 7, 2015

If that Possible then How? 

Response.Redirect("Manage Admin.aspx?AdminId=Select AdminId from Admins where UserName=" + Session["AdminSession"]);

View 1 Replies

AJAX :: How To Pass Session Variable As Context Key In Autocomplete Extender

May 27, 2013

I have AjaxAutocomplete textbox but its not taking session parameter, when I am typing some words its showing all data without any filter, means its not taking session variable after where, in select query.

View 1 Replies

State Management :: Create A Session Variable To Pass Some Data Between A Couple Of Pages?

Mar 20, 2011

I searched on this all morning, but I'm still not sure. If I create a session variable to pass some data between a couple of pages, does that variable time out after it reaches the timeout period set on IIS, or will it persist for the entire time the user keeps a session alive? For example, session variable is used shortly after login and then never again. Susy uses other pages for two hours and keeps session active. Did that first session variable die after 20 minutes, or is it still there 2 hours later?

View 4 Replies

Data Controls :: Send (Pass) GridView Row Values To Next Page Using Session Variable

Nov 6, 2013

i have a gridview with link button and one field called "ID" i have five values....when i click the link button that row value ill show in next page in textboxes ,txtid, txtage, txtsalary,......... if i click that link button that "Id" values should pass to next page using "SESSION" variable in C#.net

View 1 Replies

Access Session Variable In Facebook C# SDK?

Mar 18, 2011

I've my ASP.Net HTML 5 Application, Which have the image byte array in Session, I'm using the Latest 5.X C# facebook SDK from CodePlex.

But when user is authorized and Coming back to my canvas page at that time I can't access my ASP.Net Session, its give me a null value.

Here is my Code.

[code].....

Now pls give me some suggestion, Where I'm missing, How can I access my Application Session.

View 1 Replies

C# - Access Session Variable In Session_End?

Oct 14, 2010

in my web app users login to website normally and they have tagged in user table in database as online user in Session_End i want to log them outIn Session_End i have no access to HttpContext.Current.Session or Session only they are both null how can i access to session variable at (Session_End) event.

View 1 Replies

State Management :: Access Session Variable?

Jul 18, 2010

I have two projects ,one is webforms and other is Business logic, i am storing username in Session Variable, i have audit module in businss logic which has event handlers to do auditing on object create / remove. i want to store username in audit trail, i want to save username in some global place which is session bounded so that i can get the username in my audit module.i dont want to refer System.web, or httpcontext in my businesslogic project.pls help how i can acheive this. i found this article but cudnt understand much.

"Now one option if you want to have your DLL pull the stuff from Session is to abstract out session. So you could define an interface like IStorage, that your library will know how to use. Then you can have a SessionStorage or MemoryStorage class and use IoC to inject the appropiate class into your library classes. This gives you the freedom to code it how you wanted it to be coded without tying your code to Session. Oh and one other benefit if done properly can be used to not tie your code to session in the web either.

View 7 Replies

Forms Data Controls :: How To Pass Session Variable As A Parameter To Inline Function Written Inside A Repeater

Jun 26, 2010

I am working with a repeater control for a reporting purpose.

I have 2 repeaters one inside another , i hvae to bind the second repeater with the help of function which is having two parameters to pass in it

<asp:Repeater
ID="Rptgsaaccount"
runat ="server"
DataSource ='<%#bindcourse(Eval("Session_Id"),2nd parameter)%>'>

the first parameter is i am easily getting from outer repeater, but the second parameter value is exist on the server side and in a session variable

i have to pass this server side session variable value in above mentioned function as a second parameter .

View 2 Replies

How To Access A Simple Session State Variable From Any Page

Jun 24, 2010

how can I access a simple session state variable from any page?i would think to use: session("variableName")but that just doesnt work....

View 3 Replies

Access Session Variable Created In Page From MasterPage?

Oct 21, 2010

I am creating some sessions on successful login and I need to access them from my master page. How do I go about this?

public void showUser()
{
if (!string.IsNullOrEmpty(Session["User"].ToString()))
{
Response.Write(Session["User"].ToString());
}
else
{
Response.Write("Not Logged In");
}
}

View 1 Replies

State Management :: How To Access Session Variable In The Class

Mar 27, 2010

How to access session variable in the class?

View 5 Replies

Web Forms :: How To Access Session Variable In Global.asax File

Mar 10, 2011

I am have declared a session variable in login page of my application. I want to access that session variable in Application_BeginRequest of global.asax file. But I am not able to do it. Could you please suggest how to access the session variable in my global.asax file

void Application_BeginRequest(Object sender, EventArgs args)
{
string language = HttpContext.Current.Application["language"].ToString();
}

View 2 Replies

Security :: How To Retrieve UserID Off From The Session, Or Are There Other Ways To Retrieve UserID From

Jun 28, 2010

I have used session to the creation of user and led them to the edit page ..But how do I retrieve my userID off from the session, or are there other ways to retrieve userID from?

View 3 Replies

Web Forms :: How To Pass A Session Variable From Child Window To Parent Window

Feb 22, 2011

I have a page (parent) that open up a popup window using window.open javascript. User will then work on the popup window and the result will be stored in a session variable. When the user close the popup window, how can I put the value of the session variable back to the server control textbox of the parent window?

View 3 Replies

Web Forms :: UserID And Password Must Be Remembered In TextBox

Aug 22, 2013

I stuck in the login page ,i want if user write the userid and password to login next time when he open that login page userid already written automatically which user write last time.

View 1 Replies

How To Store A Value Into A Session Variable And Load From That Value Back From The Session Variable

Nov 22, 2010

Currently in an .aspx file, I am storing a value (filename that was created in that session) in an hidden text box. When the user clicks on the "Print" labeled Hyperlink control, it opens the file that was stored in the hidden text box control. But when the user goes to different screen (in the same session), I loose the filename value that is stored in the hidden text box control. So I would like to store the filename variable in a session variable. So that if the user leaves this .aspx file and comes back to this .aspx file I can load the value into the hidden text box from the session variable.

View 11 Replies

Security :: Using Login Control After Entering Userid And Password?

May 12, 2010

using Login control after entering userid and password if i press enter it is navigating to the defaulturl page mentioned in web.config.what shall i modify so tht if i press enter i should login

View 3 Replies

Security :: GoDaddy - The UserID/Password Is Working Fine - But The Profile Isn't?

Jan 29, 2010

I got the login to work fine- go to [URL]if you want to give it a try. Here is the thing. The profile functionality doesn't work. It draws from the same set of files, it used the same connection string as the users, it work on my local machine, but blows up on GoDaddy because it cannot find the file, and when it tries to create it. The file it uses for the profile, aspnet_Profiles, is on there along with the rest of the membership files. The connection string is not defined individually. Why is it finding the user files, but not the profile file.

Here are the files

aspnet_Applications
aspnet_Memberships
aspnet_Paths
aspnet_PersonalizationAllUsers
aspnet_PersonalizationPerUser
aspnet_Profile
aspnet_Roles
aspnet_SchemaVersions
aspnet_Users
aspnet_UserInRoles
aspnet_WebEvents_Events

Here is the Wec.config

[Code]....

Here is the Profile User Control

[Code]....

Here is the profile wrapper

[Code]....

View 3 Replies

Need Certain Algorithem/formula Or Code Where Admin Assign Userid/password To User?

Oct 26, 2010

i need certain algorithem/formula or code where admin assign userid/password to user ,means multiple user get registered site but user id and password are assign by admin after registered . did not any thing on google yet !!

View 3 Replies

Data Controls :: How To View UserID Username And Password Generated Using Configuration Tool

Dec 29, 2013

How to view the created id password in asp.net configuration

View 1 Replies







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