Solved

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

Posted on 2011-09-27
3
212 Views
Last Modified: 2012-06-27
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.
0
Comment
Question by:McGurk1
  • 2
3 Comments
 
LVL 26

Accepted Solution

by:
Shaun Kline earned 500 total points
ID: 36716508
This is generally done using impersonation:
http://msdn.microsoft.com/en-us/library/w070t6ka.aspx
0
 

Author Comment

by:McGurk1
ID: 36720546
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

0
 

Author Closing Comment

by:McGurk1
ID: 36720563
This gave me a start for my search.  The code I used I found at a different site.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

757 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

16 Experts available now in Live!

Get 1:1 Help Now