Solved

Windows Users

Posted on 2007-03-25
6
195 Views
Last Modified: 2010-04-14
Hey All

I have a program that i am writing in vb.net that once a user is loged in I change the current user using impersonate to be a particualr windows user that i want them to be

I then would like them to goto a website in ie or inside the webbrowser control but as that user.  The website they are going to is report server and it alters the data it retrieved depending on the windows user that is loged on.

I have tested the report server end by right clicking on ie and saying "run as" but when i try an launch ie from the application, it logs back in as the original windows user.

Does anyone have any ideas about this

Cheers
0
Comment
Question by:philcrouch
  • 2
6 Comments
 
LVL 7

Accepted Solution

by:
badbearontour earned 500 total points
ID: 18792128
Hi,

I have used this in the past to get into a secured website, it may work for you so thgat the report server impersonates your required user. Sorry but its in C#, I'm not the best with vb.Net, can you translate the code ok? The important bit is the setting of the hdr variable.


System.Uri myUri = (System.Uri)"http://whatever.co";
string username = "username";
string password = "password";

string hdr = "Authorization: Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes(username + ":" + password)) + System.Environment.NewLine;

webBrowser1.Navigate(myUri, null, null, hdr);


BB
0
 
LVL 7

Expert Comment

by:badbearontour
ID: 19240660
I think the solution is still a valid solution

BB
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

809 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