473,385 Members | 1,824 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

global login page

Can anybody help me out?

Here's what I want to do:

I'm redesigning my intranet site. I'm going to use .NET framework 2.0 for
this.
I get the username with request.servervariables("auth_user") which gives me
the domain username. I put this in a string and use this to query a database.
From the result I get from this query, I want to put four database fields in
4 strings.
Currently I'm using classic asp and I accomplished this by using a include
file on every page. How can I accomplish this in ASP.NET, so that these
strings are available to all ASP.NET applications?

thanks in advance

Nov 19 '06 #1
3 970
There are two ways:

1. Put "these strings" (I don't know what they are) in Session
2. If you need to "create them" on "every request", look into the interface
IHttpModule.
--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujinionline.com
http://eduzine.edujinionline.com
-----------------------------------------
"pherms" <u29329@uwewrote in message news:698709af7cf9c@uwe...
Can anybody help me out?

Here's what I want to do:

I'm redesigning my intranet site. I'm going to use .NET framework 2.0 for
this.
I get the username with request.servervariables("auth_user") which gives
me
the domain username. I put this in a string and use this to query a
database.
From the result I get from this query, I want to put four database fields
in
4 strings.
Currently I'm using classic asp and I accomplished this by using a include
file on every page. How can I accomplish this in ASP.NET, so that these
strings are available to all ASP.NET applications?

thanks in advance

Nov 20 '06 #2
There are two ways:

1. Put "these strings" (I don't know what they are) in Session
2. If you need to "create them" on "every request", look into the interface
IHttpModule.
--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujinionline.com
http://eduzine.edujinionline.com
-----------------------------------------
"pherms" <u29329@uwewrote in message news:698709af7cf9c@uwe...
Can anybody help me out?

Here's what I want to do:

I'm redesigning my intranet site. I'm going to use .NET framework 2.0 for
this.
I get the username with request.servervariables("auth_user") which gives
me
the domain username. I put this in a string and use this to query a
database.
From the result I get from this query, I want to put four database fields
in
4 strings.
Currently I'm using classic asp and I accomplished this by using a include
file on every page. How can I accomplish this in ASP.NET, so that these
strings are available to all ASP.NET applications?

thanks in advance


Nov 20 '06 #3
To put "these strings" in Session, check out the Session OnStart event in
the global.asax file.

"Gaurav Vaish (www.EdujiniOnline.com)"
<ga*****************@nospam.gmail.comwrote in message
news:On**************@TK2MSFTNGP04.phx.gbl...
>....
1. Put "these strings" (I don't know what they are) in Session
....

Tor Bådshaug
tor.badshaug(AT)bekk.no
Nov 20 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Matt Calhoon | last post by:
Hi there, How does IIS 6.0 treat the global.asa file? I had the following problem; 1. uploaded a new site to the win3k server 2. had incorrect db connection string in Session_OnStart in...
10
by: David P. Donahue | last post by:
When I wrote websites in VB .NET, I would often put functions in Global for all the pages to call. Now, in C#, doing so results in "references to non-static objects" and whatnot. I realize what...
4
by: Arjen | last post by:
Hi, I load my website settings inside the global.asax file. For this I have to use the context, to get the roles from the current browsing client. The problem is that there is no context at...
2
by: Bryan | last post by:
Hello, I'm just starting to develop in asp.net and i have a question about using a database connection globally in my app. I have set up the procedures for getting all my connection string info...
3
by: Doug | last post by:
Using Visual Studio 2005, SQL Server 2000, and ASP.NET/VB.NET for a Web Application. We have a System DSN using Windows NT authentication defined on the development box to connect to the SQL...
1
by: Mukesh_Singh_Nick | last post by:
I am learning classic ASP 3.0. Below are my questions: 1. Do we have to include (<!-- #include FILE="global.asa" -->) the global.asa file into every .asp page? I am doing the examples in Windows...
11
by: Sylvia A. | last post by:
How can I define global classes in web application ? Classes can be set to session variables ? Thanks
1
by: linda.chen | last post by:
I am not an experienced asp.net developer. A while ago I created a website related to my other project, which requires login before start. I created a global.asax file, set the user name and a...
0
by: daonho | last post by:
Protected Sub Application_BeginRequest(ByVal sender As Object, ByVal e As System.EventArgs) Dim strPath As String = HttpContext.Current.Request.Path() Dim cookie As...
4
by: damiensawyer | last post by:
Hi, I have the following situation. If a user browses to http://domain/somemiscURL.aspx without going through the front door I need to catch the request, forward them to a login page and then,...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.