Link to home
Start Free TrialLog in
Avatar of McGurk1
McGurk1Flag for United States of America

asked on

Copy a document to stand alone web server with a username and password

My application needs to copy a .pdf doc to our web server.  It works fine when done from my pc because I am also the webmaster and so have permissions on this server not part of our network.  However, I am creating a VB.NET windows application  that requires the users to be able to upload or delete a .pdf documents in a folder on the web server.  We can give them each their own permissions to that folder but my network administator would prefer one special username and password be used instead.  We have created the special username and pw but I do not know how to code my app to use the special username and pw instead of the users windows username and pw.  Can someone help with this?  I have been searching the net but so far cannot find anything that helps.  Maybe my search is not stating it right, whatever the reason I have not been able to find what I need.  I sure could use some help.  Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of Shaun Kline
Shaun Kline
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of McGurk1

ASKER

Thanks Shaun you sent me in the right direction.  For anyone who needs a simpler code, go to this site:  http://markkremers.blogspot.com/2010/07/impersonation-in-vbnet.html

One thing this site does not give you is this class needs to be imported:
                Imports System.Security.Principal

Avatar of McGurk1

ASKER

This gave me a start for my search.  The code I used I found at a different site.