How to get current user information in .Net Compact Frameword 3.5

Posted on 2012-08-17
Last Modified: 2013-12-27

I'm developing a mobile device project in VS 2008 using .net compace framework 3.5.  The device will be synced with exchange and the user will be able to do certain things with the device.  I need to be able to log what changes are being made and who is changing them for auditing purposes.  Is there a way to do this?  The program will be deployed to either windows mobile 5 or 6.1.  I will have the option restrict the mobile platform either way, so I can go either way if that would make a difference.  Thanks for any help.
Question by:rcblevins
    LVL 16

    Expert Comment

    by:Rose Babu

    Author Comment

    Thanks.  Does this work for the compact framework?  It will be a few days before I get to start testing the code, so I'll let you know if this works.

    Thanks for your help.
    LVL 16

    Expert Comment


    windows mobile devices including CE devices don support any user management, there is no local user. So normally you can only log what a users actions on the server side, when it is using a named account either to access remote shares or exchange or sql (for examples).

    To restrict any user actions on a device you can use System Center Mobile Device Manager: or other Mobile Device Management solutions by SOTI and others. There are also KIOSK mode launchers and applications to keep the device user from doing unwanted actions (like start games, browse internet etc).

    What is the intention of your question? What is the goal?


    Author Comment

    Hello, I'm hoping to be able identify the user using the device.  I was hoping that since the device will be synced with exchange, that I could get the exchange user, so I could log who's using the device and what changes are being made to inventory (which is what the device will be used for) using the program I am writing.  I hope that clarifyed my question more.

    LVL 16

    Accepted Solution

    So, you are creating an inventory application.

    All custom apps I have heard from use a built-in user management and not exchange:

    User starts custom app
    user provides name and password
    custom app starts inventory functions and logs user activity

    Doing inventory needs adatabase connection. DB connections can be secured. Database can reside on device (synced before and after changes to host, disconnected solution, GPRS) or is a single host database in network (always connected solution, WiFi).

    Author Comment

    Thanks.  That's the route I went.  I guess I was hoping that there was an easy way to tie back a windows mobile user to a windows user.  Thanks for the help.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    It’s quite interesting for me as I worked with Excel using for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
    Let me explain this picture a little bit.  First, in case you haven't already guessed, you are looking at my 2 phones, an Android Samsung Galaxy S5 on the left and an iPhone 5 on the right.  They are on their respective cradles on my desk.  But, you…
    This video discusses moving either the default database or any database to a new volume.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now