Solved

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

Posted on 2011-09-27
3
213 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Edureka is one of the fastest growing and most effective online learning sites.  We are here to help you succeed.

911 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

18 Experts available now in Live!

Get 1:1 Help Now