Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 284379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:27:12+00:00 2026-05-12T05:27:12+00:00

Is it possible to get the currently logged in user’s username with Silverlight? You

  • 0

Is it possible to get the currently logged in user’s username with Silverlight? You can assume that user has Windows OS and the Silverlight application is hosted in Internet Explorer. Getting the identity from server side with ASP.NET is not an option, this Silverlight application will be hosted on a static HTML file.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T05:27:12+00:00Added an answer on May 12, 2026 at 5:27 am

    Unfortunately, I don’t think it’s possible.

    Although you say that we can assume Windows OS/IE, Silverlight itself certainly doesn’t assume this, so most of the normal .NET mechanisms that would ordinarily be available to us to get the current logged on user’s name do not exist within the subset of the framework available to Silverlight apps:

    ie.

    System.Net.CredentialCache.DefaultCredentials  
    System.Security.Principal.WindowsIdentity.GetCurrent().Name  
    Environment.UserName  
    

    are all unavailable within a Silverlight application, whereas in (say) a Windows Forms Application, each of these mechanisms is available to use.

    I suppose it makes sense, really, since there’s no guarantee that the Silverlight application is going to be running on top of a Windows/IE platform.

    Incidentally, this question was also asked over here:

    Current Windows Username and Domain

    and that thread seems to confirm that there’s no native way to achieve this. The thread then goes on to suggest “injecting” the current ASP.NET user name from the ASP.NET page “hosting” the Silverlight app. into the Silverlight application itself prior to it running in the context of the client’s machine. Of course, even if this works, it’ll only give you the ASP.NET user name from either ASP.NET’s forms or windows based authentication and not the Windows username of currently logged on user of the client machine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to get the name of the currently logged in user (Windows/Unix)
please let me know how to get the currently logged in user's name or
Possible Duplicate: How do I get the current logged in Active Directory username from
How do i get the current logged on user name in windows 7 (i.e
Possible Duplicate: get name of current PHP script in include file Can an included
Does any one know if its possible to animate app.current.mainwindow.width so that you get
How would I go about getting the Windows user credentials from a Swing application?
Is it possible to get a list of the user defined functions in JavaScript?
I'm building a flex application using the http://code.google.com/p/facebook-actionscript-api/ library. Is it possible to get
I have a check_user_access_control before_filter in my ApplicationController that checks the logged user's roles

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.