Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
IIS and Windows Authentication
Old 08-13-2006, 07:02 AM IIS and Windows Authentication
Junior Talker

Posts: 3
Name: Matthew Rollins
Trades: 0
I have a web server running windows 2003, and IIS 6. At the moment i have a secure folder which is protected using windows authentication (mum be a user on the server to access the folder through the web). I want to make it so that when a user logs in it will display there name, which is grabed from the server.

Can anyone help ??

Thanks,
Matthew Rollins
rollins.matthe is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-13-2006, 08:52 AM Re: IIS and Windows Authentication
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
response.write request.servervariables("LOGON_USER")
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-14-2006, 07:39 AM Re: IIS and Windows Authentication
Junior Talker

Posts: 3
Name: Matthew Rollins
Trades: 0
Sorry, im a real beginer at this kind of stuff. I worked out that it is to be an .asp page. but i have absolutley no experiance with ASP. I tried inserting the code, as is, but that didnt work, i tried brackets < > and ( ) and [ ] and { }.

As i said before i am an absolute beginer in this.

and again PLEASE HELP

Thanks,
Matthew Rollins
rollins.matthe is offline
Reply With Quote
View Public Profile
 
Old 08-14-2006, 08:54 AM Re: IIS and Windows Authentication
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
The delimiters for ASP are "<%" & "%>"

So
Code:
<%
response.write request.servervariables("LOGON_USER")
%>
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-16-2006, 09:54 AM Re: IIS and Windows Authentication
Junior Talker

Posts: 3
Name: Matthew Rollins
Trades: 0
That works perfect, thanks.

Is there a way of making it so that it doesnt show the computer name, just the user ?


Thanks,
Matthew Rollins
rollins.matthe is offline
Reply With Quote
View Public Profile
 
Old 08-17-2006, 12:37 PM Re: IIS and Windows Authentication
yoemanspiffy's Avatar
Experienced Talker

Posts: 42
Trades: 0
Yes, you will have to parse the string that is returned.

I am assuming that the return value is something like:

//ComputerName/Paris.Hilton

And you just want:

Paris.Hilton

in the login field?

Then try this:
<%
strUser = request.servervariables("LOGON_USER") 'This gets your full user name
Response.write (Mid(strUser,(InstrRev(strUser,"/")+1))) 'this cuts it off at the last /
%>

YM
__________________
My grandfather used to work for your grandfather. Of course the rates have gone up.


Please login or register to view this content. Registration is FREE
yoemanspiffy is offline
Reply With Quote
View Public Profile Visit yoemanspiffy's homepage!
 
Old 08-24-2006, 08:42 AM Re: IIS and Windows Authentication
saadatshah's Avatar
Extreme Talker

Posts: 215
Name: Syed Saadat Ali
Location: Lahore, Pakistan
Trades: 0
<%
response.write request.servervariables("SERVER_NAME")
%>
would display ServerName

you can find a list of server variables here:
List of Request.ServerVariables
__________________
- -- --- ---- ----- ------ ------- ---------------
If you have knowledge, let others light their candles in it.
saadatshah is offline
Reply With Quote
View Public Profile Visit saadatshah's homepage!
 
Old 08-25-2006, 07:38 AM Re: IIS and Windows Authentication
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
request.servervariables("SERVER_NAME") will return the HTTP name (domain name) of the server NOT the NETBIOS name
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-25-2006, 09:46 AM Re: IIS and Windows Authentication
saadatshah's Avatar
Extreme Talker

Posts: 215
Name: Syed Saadat Ali
Location: Lahore, Pakistan
Trades: 0
I thought it was asked
__________________
- -- --- ---- ----- ------ ------- ---------------
If you have knowledge, let others light their candles in it.
saadatshah is offline
Reply With Quote
View Public Profile Visit saadatshah's homepage!
 
Old 08-26-2006, 06:28 AM Re: IIS and Windows Authentication
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
actually the OP asked how NOT to show the computer name.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-28-2006, 04:55 AM Re: IIS and Windows Authentication
saadatshah's Avatar
Extreme Talker

Posts: 215
Name: Syed Saadat Ali
Location: Lahore, Pakistan
Trades: 0
Ok...
__________________
- -- --- ---- ----- ------ ------- ---------------
If you have knowledge, let others light their candles in it.
saadatshah is offline
Reply With Quote
View Public Profile Visit saadatshah's homepage!
 
Old 09-09-2006, 10:29 AM Re: IIS and Windows Authentication
Skilled Talker

Posts: 95
Trades: -1
hmm it depends what your hosting .asp doesnt like that kinda stuff for sum strange reason
nitronfire is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to IIS and Windows Authentication
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.41190 seconds with 12 queries