Re: Directory.Exists
Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance
"Phil Barber" <phil_barber@xxxxxxx> wrote in message
news:e6gZEqQHGHA.3984@xxxxxxxxxxxxxxxxxxxxxxx
| using ASP.NET 1.1
|
| int PID=(int)Session["PID"];
| string FilePath=PF.GetProjectPath(PID);
| if(!Directory.Exists(FilePath))
| Directory.CreateDirectory(FilePath);
|
| the Directory.Exists always returns false even though the Directory does
in
| fact exist.
| note the FilePath string is a UNC path ( @"\\ServerName\..\)
| any ideas would be welcome.
| the really strange thing is if the directory really does not exist this
code
| will sucessfully create the directory, so I do not beleive it is a
security
| issue
| Thanks
| phil
|
|
That's because you (the asp.net user) don't have any access rights to the
share, note that the default account 'aspnet', doesn't even have network
access rights. So you will have to impersonate a user with appropriate
privileges to access the network share.
Willy.
.
Relevant Pages
- Re: SDDL problem. getting hexadecimal characters for ACE rights
... SDDL will try its best to abbreviate the ... access mask into one of the predefined ACE strings, but as you can see, ... "The string can be a hexadecimal string representation of the access ... access rights for the object ... (microsoft.public.platformsdk.security) - Re: replace the string in all the files in the directory
... cp is used instead of mv, to keep the owner and access rights of $. ... && is used to avoid overwritting the original file if the copy ... I think he wanted to replace a string such as ... (comp.unix.programmer) - Re: Generic user names, am I the only One?
... My concern would be what access rights does the generic ID have? ... They could then use those rights against any of your network resources. ... These IDs would probably be machine local IDs, ... This provides us consistency and the ability to have a> standard desktop with the upmost of uptime to help provide high standards of> health care to our patients without a nurse or caretaker having to have an> individual user name and login to the network that changes on a regular> basis. ... (microsoft.public.windows.server.active_directory) - Re: Verifying E-Mail Addresses
... What does teir email address provide you in te form of accountability ie if my email is @hotmail or bill@microdoft, does that make me accountable and why? ... My only solution would be to issue them, for a fee, a 3 alphanumeric character string and obtain their email address from them. ... To use the network a user havs to authenticate within a certain time using te string you issued to them. ... At the same time the users MAC address is retrieved from the machine and added into the database against his name. ... (Security-Basics) - Slow Transfer Rates on Socket and TCPClient data reads
... get slow transfer speeds off any of the network objects read the data from ... This return string after string of all the news articles from article number ... the Network Stream object, ... Dim bufferAs Byte ... (microsoft.public.dotnet.languages.vb) |
|