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.

.NET Forum


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



Closed Thread
Displaying user names on VPN only website.
Old 10-20-2009, 08:42 PM Displaying user names on VPN only website.
Junior Talker

Posts: 3
Name: David
Trades: 0
I am new to building web sites but moderatly familiar with Visual studio.I am creating a website on a iis server and I made it using asp.net with VB as the master language.


Our users have to log into the VPN in order to access the site, so all the users are stored in the computer management section of the server. What I want to do is have the site display the user name on the page when they log into the site. That is all. Please provide some sort of code and detailed directions as to how to do this. Here is my master page.



Code:
<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<!-- template designed by: Subash Rijal -->

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>
    <style type="text/css">
        .style1
        {
            width: 1091px;
            height: 737px;
        }
        .style2
        {
            text-align: center;
            font-weight: bold;
            background-color: #D7E3F4;
        }
        .style3
        {
            height: 128px;
            text-align: center;
        }
        .style5
        {
            height: 600px;
            width: 158px;
            
        }
        .style7
        {
            height: 529px;
            width: 221px;
        }
        .style9
        {
            height: 21px;
            background-color: #CCCCCC;
        }
        .style13
        {
            font-size: small;
            font-weight: normal;
            text-align: center;
            background-color: #F7F6F3;
        }
        .style14
        {
            text-align: left;
        }
        .style16
        {
            height: 529px;
            width: 712px;
        }
        </style>
</head>
<body>
    <form id="form1" runat="server" 
    style="font-family: sans-serif; font-size: large; width: auto; height: auto; vertical-align: top;">
    
        <table class="style1" align="center" cellpadding="0" cellspacing="0"> 
            <tr>
                <td class="style3" colspan="3" 
                    style="background-image: none; background-color: #75A3D3;" align="center">
                    <asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server">
                  
                                      <asp:Image ID="Image1" runat="server" height=100% Width=100% ImageUrl="~/images/Banner.JPG" />
                  
                                      </asp:ContentPlaceHolder>
                    <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
                </td>
            </tr>
            <tr>
                <td class="style9" colspan="3">
                    <asp:ContentPlaceHolder ID="ContentPlaceHolder6" runat="server">
                     



<script src="http://www.clocklink.com/embed.js"></script><script type="text/javascript" language="JavaScript">     
  obj = new Object; obj.clockfile = "5002-blue.swf"; obj.TimeZone = "CST"; obj.width = 300; obj.height = 25; obj.Place = ""; obj.DateFormat = "MM-DD-YYYY"; obj.wmode = "transparent"; showClock(obj);</script>
    
  </asp:ContentPlaceHolder>
                </td>
            </tr>
            <tr>
                <td class="style5" style="vertical-align: top; background-color: #CBE4F3;">
                    <asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1" 
                        Height="311px" StaticDisplayLevels="2" 
                        Width="160px" DynamicHorizontalOffset="2" MaximumDynamicDisplayLevels="2" 
                        style="background-color: #CBE5F2" Font-Bold="True" Font-Names="Verdana" 
                        Font-Size="Medium" StaticSubMenuIndent="15px" BackColor="#F7F6F3" 
                        ForeColor="#C80000">
                        <StaticMenuStyle BorderStyle="Groove" Width="160px" />
                        <StaticSelectedStyle BackColor="#C80000" ForeColor="White" />
                        <StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
                        <DynamicHoverStyle BackColor="#090985" BorderColor="#000099" 
                            ForeColor="White" />
                        <DynamicMenuStyle BackColor="#F7F6F3" />
                        <DynamicSelectedStyle BorderColor="#003366" BackColor="White" />
                        <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
                        <StaticHoverStyle BackColor="#7C6F57" ForeColor="White" />
                    </asp:Menu>
                </td>
                <td class="style16" style="vertical-align: top">
                    <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
                        <p align="center" style="height: 35px; width: 395px;">
                             </p>
                    </asp:ContentPlaceHolder>
                </td>
                <td class="style7" 
                    style="vertical-align: top; background-color: #A2CFF7; text-align: left;">
   <asp:ContentPlaceHolder ID="ContentPlaceHolder4" runat="server">

<asp:HyperLink ID="HyperLink1" runat="server" 
        NavigateUrl="http://www.acm.org/news" style="font-weight: 700" Target="_blank">ACM News & Articles</asp:HyperLink>

<div style="border:0px white solid;width:auto; height:800px; overflow:auto; background-color: #CEE6F3;" 
        class="style14">
<script language=javascript src="http://rssfeedreader.com/rss3/rss.php?url=http%3A%2F%2Fcacm.acm.org%2Fnews.rss%2Chttp%3A%2F%2Fcacm.acm.org%2Fmagazine.rss%2Chttp%3A%2F%2Fcacm.acm.org%2Fcareers.rss%2Chttp%3A%2F%2Fcacm.acm.org%2Fopinion.rss%2Chttp%3A%2F%2Fcacm.acm.org%2Fblogs%2Fblog-cacm.rss&newpage=1&chead=1&atl=&desc=1&owncss=&eleminate=&auth=1&dts=1&width=200&max=20&tlen=0&rnd=1&bt=3&bs=None&nmb=&ntb=&naf=&nst=&nwd=0&nht=0&dlen=55&lstyle=2&lc=%23CC0000&bg=%82ACD9&bc=Gray&spc=1&ims=&tc=&ts=11&tfont=Verdana,+Arial,+Sans-serif">
</script> 

<!-- by: Subash Rijal -->

</div>

</asp:ContentPlaceHolder>
                </td>
            </tr>
            <tr>
                <td class="style2" colspan="3">
                    <asp:ContentPlaceHolder ID="ContentPlaceHolder5" runat="server">
                        <p class="style13" align="center" style="color: #C80000">
                            Copyright 2009 Intranet3, Version 2.3</p>
                    </asp:ContentPlaceHolder>
                </td>
            </tr>
       
        </table>
    
    </form>
</body>
</html>

I would be great if someone could help quickly.Thanks.
dmagoku is offline
View Public Profile
 
 
Register now for full access!
Old 10-21-2009, 01:17 AM LoginName Tool being stupid
Junior Talker

Posts: 3
Name: David
Trades: 0
I am using

<asp:LoginName id="LoginName1" runat="server"
FormatString ="Welcome, {0}" />


and it always returns Servername/username instead of just the user name. Can I get some help?

Instead of just " welcome John" it shows " Welcome IISServer/John".
dmagoku is offline
View Public Profile
 
Old 10-21-2009, 03:08 AM Re: Displaying user names on VPN only website.
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
I don't know much of .net and the ms world, but what I know, is that you can recover the logged user informations via the ntlm manager.

Searching a bit with google, I've found this:
http://www.experts-exchange.com/Prog..._20185064.html
Scroll to the bottom, and you will find links to pages that either implements api to dialog with sspi or ntlm.

Maybe you'll find what you need there.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
View Public Profile Visit tripy's homepage!
 
Old 10-21-2009, 05:00 AM Re: LoginName Tool being stupid
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
It's doing exactly what it is intended to do and returning the FULL user identity.
__________________
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 offline
View Public Profile Visit chrishirst's homepage!
 
Old 10-21-2009, 05:29 AM Re: Displaying user names on VPN only website.
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
two related threads merged
__________________
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 offline
View Public Profile Visit chrishirst's homepage!
 
Old 10-21-2009, 01:25 PM Re: LoginName Tool being stupid
Junior Talker

Posts: 3
Name: David
Trades: 0
Quote:
Originally Posted by chrishirst View Post
It's doing exactly what it is intended to do and returning the FULL user identity.
I Just want the login name and not the server name attached. Does this have something to do with my server permission or something?
dmagoku is offline
View Public Profile
 
Old 10-21-2009, 02:56 PM Re: Displaying user names on VPN only website.
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
nope the server name and username is the full identity that the server uses to run the page, if you were on Active Directory it would retun domain/username instead.

Remove the server name by a replace function or by slicing or splitting the username string.
__________________
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 offline
View Public Profile Visit chrishirst's homepage!
 
Closed Thread     « Reply to Displaying user names on VPN only website.
 

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.25252 seconds with 12 queries