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 6368653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:42:10+00:00 2026-05-25T00:42:10+00:00

I have an ASP.NET application running on IIS 7 and using Windows Authentication. For

  • 0

I have an ASP.NET application running on IIS 7 and using Windows Authentication. For testing purposes each of our test users has 5 test accounts set up for them on the domain. They need multiple accounts because they need to test different roles within the application. Users are using IE7.

The options that I can see available for allowing the user to log into the application under the different accounts are:

1) Log off Windows and log back in as the required test account. (Not very practical for the user).

2) Get the user to right click on Internet Explorer and choose “Run as…”, then enter the credentials for the required test account. (Not very intuiative for the user. Also some features don’t work properly in IE7 when running like this, e.g. Bookmarks, Printers)

3) Use Firefox or Chrome. (Not an option unfortunately)

4) Don’t use Windows Authentication (Windows Authentication is a requirement)

5) Update IE Options to prevent it from auto logging into sites (this would work, but it would be an annoyance for the users as they use a lot of other sites that use Windows Authentication).

6) Find some way in IIS/ASP.NET of preventing IE from auto logging in? (I haven’t seen any way of doing this but would be interested to hear any suggestions).

Can anyone think of any better ways?

Thanks.

  • 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-25T00:42:11+00:00Added an answer on May 25, 2026 at 12:42 am

    I believe #2 is your best base to build on.

    As far as being intuitive to the user: How about a Windows Forms application that can launch under the various test accounts?

    I was going to try to build a quick test app, but found this post, first:

    http://fraserchapman.blogspot.com/2007/07/programmatic-runas-in-c.html

    After a couple minutes, I got this to work:

    using System;  
    using System.Diagnostics;
    
    namespace TestRunAs
    {
        class Program
        {
            static void Main(string[] args)
            {
                RunAs("C:\\Program Files\\Internet Explorer\\iexplore.exe", "TestUser5", "TestUser5Password");
            }
    
            static void RunAs(string path, string username, string password)
            {
                var secureString = new System.Security.SecureString();
                foreach (char c in password)
                { secureString.AppendChar(c); }
                ProcessStartInfo myProcess = new ProcessStartInfo(path);
                myProcess.UserName = username;
                myProcess.Password = secureString;
                myProcess.UseShellExecute = false;
                Process.Start(myProcess);
            }
        }
    }
    

    The obvious downside: password is floating around inside your app, so I hope these “test accounts” are going to be deleted after your project is done.

    Followup: I went poking around looking for info on SecureString. MSDN’s usage example is EXACTLY what you’re trying to do, just using NotePad instead:

    http://msdn.microsoft.com/en-us/library/system.security.securestring.aspx

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

Sidebar

Related Questions

We have an ASP.NET web application running in IIS that uses the SoapHttpClientProtocol class
I have an ASP.NET MVC application up and running, using a SQL Sever express
So I'm trying to get an Asp.Net application running on Windows 2008R2 / IIS
We have an ASP.NET application running at a customer site that uses ActiveDirectory for
I have an ASP.NET application running on multiple IIS6 web servers, with a SQL
I have an ASP.NET 2.0 web application running on a shared server of a
I have a website running a basic ASP.NET application that is mostly used from
We have a ASP.Net 2.0 web application up and running with the server in
We have a asp.net 2.0 web application that is running on IIS7. It is
I have a web application developed with ASP.net and C# that is running on

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.