?
Solved

Windows Users

Posted on 2007-03-25
6
Medium Priority
?
208 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
2 Comments
 
LVL 7

Accepted Solution

by:
badbearontour earned 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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 process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses
Course of the Month16 days, 11 hours left to enroll

862 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