473,997 Members | 2,352 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 GetObjectContex t("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 2598
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.Cur rent 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.Cu rrent Property
http://msdn.microsoft.com/library/en...WebHttpContext
ClassCurrentTop ic.asp?frame=tr ue

So we can use the
HttpContext.Cur rent.Request.Se rverVariables 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=tr ue

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

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.Cur rent 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.Cu rrent Property
http://msdn.microsoft.com/library/en...WebHttpContext
ClassCurrentTop ic.asp?frame=tr ue

So we can use the
HttpContext.Cur rent.Request.Se rverVariables 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=tr ue

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

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.m icrosoft.com> wrote in message
news:ek******** ******@cpmsftng xa06.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.Cur rent 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.Cu rrent Property
http://msdn.microsoft.com/library/en...WebHttpContext ClassCurrentTop ic.asp?frame=tr ue

So we can use the
HttpContext.Cur rent.Request.Se rverVariables 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=tr ue

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

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.m icrosoft.com> wrote in message
news:ek******** ******@cpmsftng xa06.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.Cur rent 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.Cu rrent Property
http://msdn.microsoft.com/library/en...WebHttpContext ClassCurrentTop ic.asp?frame=tr ue

So we can use the
HttpContext.Cur rent.Request.Se rverVariables 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=tr ue

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

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.m icrosoft.com> wrote in message
news:ek******** ******@cpmsftng xa06.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.Cur rent 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.Cu rrent Property
http://msdn.microsoft.com/library/en...WebHttpContext ClassCurrentTop ic.asp?frame=tr ue

So we can use the
HttpContext.Cur rent.Request.Se rverVariables 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=tr ue

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

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.m icrosoft.com> wrote in message
news:ek******** ******@cpmsftng xa06.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.Cur rent 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.Cu rrent Property
http://msdn.microsoft.com/library/en...WebHttpContext ClassCurrentTop ic.asp?frame=tr ue

So we can use the
HttpContext.Cur rent.Request.Se rverVariables 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=tr ue

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

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
2955
by: hazz | last post by:
If I successfully run a VS.NET app which includes the following; ************************** APP 1 **************************** m_iIdnt = new System.Security.Principal.GenericIdentity(t.UserName,"MyAuthentication"); //user and My authentication type added to Identity string roles = {"Chief Cook and Bottle Washer", "Master Gardener"};
8
2161
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 set to true, but to access the Access DB I need to pass an authenticated network user. Not for the DB's sake but for the network directory that it resides on. Some more environment background: large company with tight server control. I don't...
4
1306
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 actually got that working fairly well, but, then, in the end, decided that was overkill and that it would perhaps make more sense to start over using a much more simpler communication between pages.
4
2031
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 (.aspx) that will collect some data from the user, call a web service to get additional data, and then merge and format the data back to the user's browser. But I want the web service to authenticate with the user's credentials, not the credentials of...
6
1122
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 net dll ? the question is if there is a context switch between aspx to the dot net dll
10
3125
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 config does specify a machinekey setting: <machineKey validationKey="447C05E8B3A71401CC4CAE5513A7F1A3494A3618EE819316AAD1D58433F236A759D66FB4154500E01EB4E1BC1DE42046E2D652D391CB8367A1649438867A02EB"...
7
3044
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. And I trun annonymous login. I use this connection to connect. server={0};database={1};Integrated Security=SSPI where {0} servname and {1} database name
7
4499
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
2311
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 FindControl the only way to do it?
0
11944
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11504
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11753
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
11009
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
10175
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8566
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6514
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
5271
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3853
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.