Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Failed to Access to Networked Resources

Reply
Thread Tools

Failed to Access to Networked Resources

 
 
Speech Lover
Guest
Posts: n/a
 
      02-22-2007
I am using ASP.NET 1.1.

I am trying to manipulate remote shared folders and files through UNC
format.
For example: //server/dir1/abc.txt


When I ran my c# code, I got an error: Unknown user name or bad password

When I searched the Internet and it appears I can use Impersonate to change
my identity before accessing to the networked resources. However, after
added the reference code into the page it compiles fine but the page doesn't
load in run time.

Any idea?
Is there an easy way to overcome the network security credential?

Here's the code I added:

public static bool NetworkImpersonate(string user, string machine, string
password)
{
int token;

if(!LogonUser(user, machine, password, 3, 0, out token)
return false;

return ImpersonateLoggedOnUser(token);
}

Speech Lover



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
py2app question: Resources/Python -> Resources/lib/python2.4 Russell E. Owen Python 0 09-08-2006 08:08 PM
Cannot access internet with networked computer =?Utf-8?B?TG96?= Wireless Networking 1 04-22-2006 07:43 PM
Shared Printer attached to networked computer not printing from networked computers Ned H. Windows 64bit 7 08-05-2005 02:12 PM
Blocking internet access on networked computer =?Utf-8?B?TlJURkppbQ==?= Wireless Networking 3 07-02-2005 06:44 AM
No internet access with one of networked pcs =?Utf-8?B?S3ViaWVnaXJs?= Wireless Networking 2 05-08-2005 03:56 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57