Click here to Skip to main content
16,004,647 members
Home / Discussions / C#
   

C#

 
GeneralRe: A little push with Web Services. Pin
wakkerjack31-Mar-05 1:41
wakkerjack31-Mar-05 1:41 
Generalopen window Pin
ABBASI_RA25-Mar-05 14:25
ABBASI_RA25-Mar-05 14:25 
GeneralRe: open window Pin
dabuskol25-Mar-05 19:37
dabuskol25-Mar-05 19:37 
GeneralRe: open window Pin
Heath Stewart26-Mar-05 13:15
protectorHeath Stewart26-Mar-05 13:15 
GeneralRe: open window Pin
dabuskol26-Mar-05 18:11
dabuskol26-Mar-05 18:11 
GeneralRe: open window Pin
Heath Stewart26-Mar-05 20:26
protectorHeath Stewart26-Mar-05 20:26 
GeneralCheck if a user have full access to a shared directory Pin
Johny Ng25-Mar-05 13:19
Johny Ng25-Mar-05 13:19 
GeneralRe: Check if a user have full access to a shared directory Pin
Heath Stewart26-Mar-05 13:13
protectorHeath Stewart26-Mar-05 13:13 
The simplest way is to just try to write to the directory. Checking the actual access control list (ACL) isn't necessary and does add complexity to your code. And until .NET 2.0 adds easy object-oriented support for ACLs, either you have to rely on what few (rather bad, IMO) implementations exist for .NET 1.0 or 1.1 or write your own.

A simple example follows:
try
{
  using (FileStream file = File.Create("\\computer\share\test.dat"))
  {
    test.WriteByte((byte)1);
  }
}
catch (UnauthorizedAccessException)
{
  MessageBox.Show("You do not have the necessary access.", "Access Denied");
}


This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralAccessing DotNet DLL from ASP Pin
Anand Chida25-Mar-05 10:05
Anand Chida25-Mar-05 10:05 
GeneralRe: Accessing DotNet DLL from ASP Pin
Heath Stewart25-Mar-05 11:48
protectorHeath Stewart25-Mar-05 11:48 
GeneralNew WebBrowser Pin
thedjhacker25-Mar-05 8:09
thedjhacker25-Mar-05 8:09 
GeneralRe: New WebBrowser Pin
Heath Stewart25-Mar-05 11:39
protectorHeath Stewart25-Mar-05 11:39 
GeneralRe: New WebBrowser Pin
thedjhacker25-Mar-05 12:38
thedjhacker25-Mar-05 12:38 
GeneralPhoto Printing Wizard Pin
tommazzo25-Mar-05 6:02
tommazzo25-Mar-05 6:02 
GeneralRe: Photo Printing Wizard Pin
Dave Kreskowiak25-Mar-05 7:30
mveDave Kreskowiak25-Mar-05 7:30 
GeneralRe: Photo Printing Wizard Pin
tommazzo25-Mar-05 11:15
tommazzo25-Mar-05 11:15 
GeneralRe: Photo Printing Wizard Pin
Dave Kreskowiak25-Mar-05 11:45
mveDave Kreskowiak25-Mar-05 11:45 
GeneralRe: Photo Printing Wizard Pin
Heath Stewart25-Mar-05 12:10
protectorHeath Stewart25-Mar-05 12:10 
GeneralRe: Photo Printing Wizard Pin
tommazzo25-Mar-05 12:35
tommazzo25-Mar-05 12:35 
GeneralRe: Photo Printing Wizard Pin
Heath Stewart25-Mar-05 12:58
protectorHeath Stewart25-Mar-05 12:58 
GeneralRe: Photo Printing Wizard Pin
tommazzo25-Mar-05 12:37
tommazzo25-Mar-05 12:37 
GeneralRe: Photo Printing Wizard Pin
Heath Stewart25-Mar-05 12:55
protectorHeath Stewart25-Mar-05 12:55 
GeneralRe: Photo Printing Wizard Pin
tommazzo25-Mar-05 13:11
tommazzo25-Mar-05 13:11 
GeneralRe: Photo Printing Wizard Pin
Dave Kreskowiak25-Mar-05 13:42
mveDave Kreskowiak25-Mar-05 13:42 
GeneralRe: Photo Printing Wizard Pin
tommazzo25-Mar-05 13:52
tommazzo25-Mar-05 13:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.