Solved

Windows Users

Posted on 2007-03-25
6
192 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

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…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

863 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

23 Experts available now in Live!

Get 1:1 Help Now