?
Solved

Windows Users

Posted on 2007-03-25
6
Medium Priority
?
201 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 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

DFW AZURE MEETUP TONIGHT FRI 6PM

We will be discussing what Azure Stack is, how does it fit into the suit of offerings that Azure has currently, and where can it fit into your organizations technology stack. We will also be discussing limitations of the platform while covering various applicable scenarios.

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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month13 days, 19 hours left to enroll

801 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