HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old October 20th, 2009, 06:47 PM
dmagoku dmagoku is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2009
Posts: 2 dmagoku User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 20 sec
Reputation Power: 0
Homework - Displaying user names on VPN only website.

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" "(URL address blocked: See forum rules)">

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

<html xmlns="(URL address blocked: See forum rules)">
<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="(URL address blocked: See forum rules)"></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="(URL address blocked: See forum rules)" 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="(URL address blocked: See forum rules)/rss3/rss.php?url=http%3A%2F%2Fcacm.acm.org%2Fnews.rss%2  Chttp%3A%2F%2Fcacm.acm.org%2Fmagazine.rss%2Chttp%3  A%2F%2Fcacm.acm.org%2Fcareers.rss%2Chttp%3A%2F%2Fc  acm.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.

Reply With Quote
  #2  
Old October 21st, 2009, 04:28 PM
MEdelman MEdelman is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2009
Posts: 42 MEdelman User rank is Corporal (100 - 500 Reputation Level)MEdelman User rank is Corporal (100 - 500 Reputation Level)MEdelman User rank is Corporal (100 - 500 Reputation Level)MEdelman User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 15 h 58 m 33 sec
Reputation Power: 2
IIS Server Variables

If the users are logged into the local domain then you can the IIS server variables:
  • AUTH_USER
  • LOGON_USER
  • REMOTE_USER
  • UNMAPPED_REMOTE_USER
For ASP you can use the Request.ServerVariables function:
Code:
Request.ServerVariables("Var_Name")
For ASP.NET you can use the HttpRequest.ServerVariables Property:
Code:
Public ReadOnly Property ServerVariables As NameValueCollection

Dim instance As HttpRequest
Dim value As NameValueCollection

value = instance.ServerVariables
Which specific variable depends upon your site.

Last edited by MEdelman : October 21st, 2009 at 04:36 PM.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > Homework - Displaying user names on VPN only website.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek