Solved

Windows Users

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Hovering effect 9 30
Expando 4 36
Spell Check in VB6 13 52
Closing all open child forms. 4 25
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…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
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…

746 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

9 Experts available now in Live!

Get 1:1 Help Now