473,513 Members | 2,443 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2560
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
2911
by: hazz | last post by:
If I successfully run a VS.NET app which includes the following; ************************** APP 1 **************************** m_iIdnt = new...
8
2143
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
1277
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
2016
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
1107
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
3063
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
3012
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
4482
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
2282
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
7265
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7388
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7545
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...
1
7111
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
7539
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4751
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3228
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
807
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
461
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.