473,396 Members | 1,892 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,396 software developers and data experts.

HOW TO: Get from the aspx context the current authenticate username ?

Hi,

in vb6 we could use the GetObjectContext("Request") of the
ASPTypeLibrary.Request

in order to get the ServerVariables("XXX") from the asp to the dll .

can we do that in aspx and vb dot net dll ?

the question is if there is a context switch between aspx to the dot net dll
?

10x

Nov 20 '05 #1
6 2544
Hi Tiraman,

From your description, you'd like to referece the current processing Web
Request's Context in asp.net application so as to retrieve the
ServerVariables from the Request object, yes?

I think the HttpContext.Current member in ASP.NET is the one you need, it
provide the reference to the current ASP.NET request's Context and it has
many members such as Request, Response. Session, Server...
You can view the following weblink for detailed reference:
#HttpContext.Current Property
http://msdn.microsoft.com/library/en...WebHttpContext
ClassCurrentTopic.asp?frame=true

So we can use the
HttpContext.Current.Request.ServerVariables to get ServerVariables

Also, the ASP.NET has its own Authentication and Authorization mechinasm
different from
classic ASP , here are some further references on ASP.NET's Authentication
and Authorization:
#ASP.NET Authentication
http://msdn.microsoft.com/library/en...ETAuthenticati
on.asp?frame=true

#ASP.NET Authorization
http://msdn.microsoft.com/library/en...etauthorizatio
n.asp?frame=true

Hope also helps.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 20 '05 #2
Hi Tiraman,

From your description, you'd like to referece the current processing Web
Request's Context in asp.net application so as to retrieve the
ServerVariables from the Request object, yes?

I think the HttpContext.Current member in ASP.NET is the one you need, it
provide the reference to the current ASP.NET request's Context and it has
many members such as Request, Response. Session, Server...
You can view the following weblink for detailed reference:
#HttpContext.Current Property
http://msdn.microsoft.com/library/en...WebHttpContext
ClassCurrentTopic.asp?frame=true

So we can use the
HttpContext.Current.Request.ServerVariables to get ServerVariables

Also, the ASP.NET has its own Authentication and Authorization mechinasm
different from
classic ASP , here are some further references on ASP.NET's Authentication
and Authorization:
#ASP.NET Authentication
http://msdn.microsoft.com/library/en...ETAuthenticati
on.asp?frame=true

#ASP.NET Authorization
http://msdn.microsoft.com/library/en...etauthorizatio
n.asp?frame=true

Hope also helps.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 20 '05 #3
Hi Steven ,

10x for the information

I will go over it and if I will have more questions I will ask .

bye and 10x again :-)

Tiraman
"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:ek**************@cpmsftngxa06.phx.gbl...
Hi Tiraman,

From your description, you'd like to referece the current processing Web
Request's Context in asp.net application so as to retrieve the
ServerVariables from the Request object, yes?

I think the HttpContext.Current member in ASP.NET is the one you need, it
provide the reference to the current ASP.NET request's Context and it has many members such as Request, Response. Session, Server...
You can view the following weblink for detailed reference:
#HttpContext.Current Property
http://msdn.microsoft.com/library/en...WebHttpContext ClassCurrentTopic.asp?frame=true

So we can use the
HttpContext.Current.Request.ServerVariables to get ServerVariables

Also, the ASP.NET has its own Authentication and Authorization mechinasm
different from
classic ASP , here are some further references on ASP.NET's Authentication
and Authorization:
#ASP.NET Authentication
http://msdn.microsoft.com/library/en...ETAuthenticati on.asp?frame=true

#ASP.NET Authorization
http://msdn.microsoft.com/library/en...etauthorizatio n.asp?frame=true

Hope also helps.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 20 '05 #4
Hi Steven ,

10x for the information

I will go over it and if I will have more questions I will ask .

bye and 10x again :-)

Tiraman
"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:ek**************@cpmsftngxa06.phx.gbl...
Hi Tiraman,

From your description, you'd like to referece the current processing Web
Request's Context in asp.net application so as to retrieve the
ServerVariables from the Request object, yes?

I think the HttpContext.Current member in ASP.NET is the one you need, it
provide the reference to the current ASP.NET request's Context and it has many members such as Request, Response. Session, Server...
You can view the following weblink for detailed reference:
#HttpContext.Current Property
http://msdn.microsoft.com/library/en...WebHttpContext ClassCurrentTopic.asp?frame=true

So we can use the
HttpContext.Current.Request.ServerVariables to get ServerVariables

Also, the ASP.NET has its own Authentication and Authorization mechinasm
different from
classic ASP , here are some further references on ASP.NET's Authentication
and Authorization:
#ASP.NET Authentication
http://msdn.microsoft.com/library/en...ETAuthenticati on.asp?frame=true

#ASP.NET Authorization
http://msdn.microsoft.com/library/en...etauthorizatio n.asp?frame=true

Hope also helps.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 20 '05 #5
Hello Steven ,

Those articles helped me a lot so 10x and have a nice day ;-)
"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:ek**************@cpmsftngxa06.phx.gbl...
Hi Tiraman,

From your description, you'd like to referece the current processing Web
Request's Context in asp.net application so as to retrieve the
ServerVariables from the Request object, yes?

I think the HttpContext.Current member in ASP.NET is the one you need, it
provide the reference to the current ASP.NET request's Context and it has many members such as Request, Response. Session, Server...
You can view the following weblink for detailed reference:
#HttpContext.Current Property
http://msdn.microsoft.com/library/en...WebHttpContext ClassCurrentTopic.asp?frame=true

So we can use the
HttpContext.Current.Request.ServerVariables to get ServerVariables

Also, the ASP.NET has its own Authentication and Authorization mechinasm
different from
classic ASP , here are some further references on ASP.NET's Authentication
and Authorization:
#ASP.NET Authentication
http://msdn.microsoft.com/library/en...ETAuthenticati on.asp?frame=true

#ASP.NET Authorization
http://msdn.microsoft.com/library/en...etauthorizatio n.asp?frame=true

Hope also helps.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 20 '05 #6
Hello Steven ,

Those articles helped me a lot so 10x and have a nice day ;-)
"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:ek**************@cpmsftngxa06.phx.gbl...
Hi Tiraman,

From your description, you'd like to referece the current processing Web
Request's Context in asp.net application so as to retrieve the
ServerVariables from the Request object, yes?

I think the HttpContext.Current member in ASP.NET is the one you need, it
provide the reference to the current ASP.NET request's Context and it has many members such as Request, Response. Session, Server...
You can view the following weblink for detailed reference:
#HttpContext.Current Property
http://msdn.microsoft.com/library/en...WebHttpContext ClassCurrentTopic.asp?frame=true

So we can use the
HttpContext.Current.Request.ServerVariables to get ServerVariables

Also, the ASP.NET has its own Authentication and Authorization mechinasm
different from
classic ASP , here are some further references on ASP.NET's Authentication
and Authorization:
#ASP.NET Authentication
http://msdn.microsoft.com/library/en...ETAuthenticati on.asp?frame=true

#ASP.NET Authorization
http://msdn.microsoft.com/library/en...etauthorizatio n.asp?frame=true

Hope also helps.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 20 '05 #7

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

Similar topics

4
by: hazz | last post by:
If I successfully run a VS.NET app which includes the following; ************************** APP 1 **************************** m_iIdnt = new...
8
by: ajamrozek | last post by:
I have an ASPX page that needs to display data from an Access DB that resides on a network resource other than the running server. To access the web page itself, I need IIS to have anonymous login...
4
by: darrel | last post by:
Karl has helped me in the past in regards to communicating between controls and pages: http://www.openmymind.net/communication/index.html#3.1 I ended up going down the interfaces path and...
4
by: Dan Higman | last post by:
I'm sure this is easy and I'll be embarrassed when I see the answer, but I just can't figure this one out. Using .Net/ASP 1.1 on a server using integrated authentication-- I have a web page...
6
by: Tiraman | last post by:
Hi, in vb6 we could use the GetObjectContext("Request") of the ASPTypeLibrary.Request in order to get the ServerVariables("XXX") from the asp to the dll . can we do that in aspx and vb dot...
10
by: Robert | last post by:
I have an app that was originally 1.1, now migrated to 2.0 and have run into some sporadic viewstate errors...usually saying the viewstate is invalid, eventvalidation failed or mac error. My web...
7
by: Alice Wong | last post by:
I am setting up my Web ASP.net application to connect to Sql server using windows authentication. I set up IIS to have integrated windows authenication and sql to allow Windows authentication....
7
by: Ronald S. Cook | last post by:
In my .aspx page, I am trying to read file that is on a different on the company network. When I map a drive to it and call from within my .aspx page, I get this error:
7
by: Andy B | last post by:
I have a class I am creating for data access. I need to access controls from inside the class that are on a particular page. How do I do this? or is creating an instance of the page class and using...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.