VB.NET Mixed authentication mode & obtaining logged domain accout name from remote website?

Posted on 2009-12-29
Last Modified: 2013-12-24
Hi Sir/Madam,

Most users in my network environment logged into their system using domain accounts, which is managed by the company AD server. Most of their computers have joined the company domain, however, some haven't. The web application to be created is a portal service which will be hosted on one of the machines, and users will log onto the site remotely from their own machines or external network.

This situation requires mixed authentication to be used. The users will be able to directly bypass the login page when they logged into their computer that has joined the domain with their domain account. Otherwise, they will be prompted to the login page (computer not joined to the domain or access from external network) and manually input their domain user/pass to login.

I have no problem implementing the forms authentication and authenticate the AD via LDAP. However, I cannot get the NTLM authentication part working properly with VB.NET. Should I use Windows authentication mode or forms for my situation? I just cant find the right sample online.

During my testing, I have encountered problems when tried to obtain local User.Identity.Name from website hosted on remote server. For example, I logged into my computer A with "domain\steven". I want to access a website hosted on computer B and obtain "domain\steven", however, currently it returns the user logged for computer B. Furthermore, is it correct to obtain the domain account name logged for the currernt system by using User.Identity.Name and trim the machine name out afterwards?

Thanks for the help in advance.

Question by:chokobu22
    LVL 4

    Accepted Solution


    Author Closing Comment

    Not all question has been answered in the article provided.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
    Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    737 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

    19 Experts available now in Live!

    Get 1:1 Help Now