473,786 Members | 2,375 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Directory.Creat eDirectory() issue

Ken
I'm currently working on framework 1.1 webapplication using C#.
When I test the application located in my local machine, it works fine to
"Directory.Crea teDirectory()".
However, I test the application use in server machine, it doesn't work.
it make security log like below.
Anyone has a idea for this????

Thanks

=============== =======
Object Open:

Object Server: Security

Object Type: File

Object Name: D:\

Handle ID: -

Operation ID: {0,15777290}

Process ID: 480

Image File Name: C:\WINDOWS\syst em32\inetsrv\w3 wp.exe

Primary User Name: NETWORK SERVICE

Primary Domain: NT AUTHORITY

Primary Logon ID: (0x0,0x3E4)

Client User Name: www.ken.c

Client Domain: TFken.COM

Client Logon ID: (0x0,0xE4A05E)

Accesses: ReadAttributes
Privileges: -

Restricted Sid Count: 0

Access Mask: 0x80

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

=============== =============== =======


Nov 12 '07 #1
4 2998
Ken,

It looks pretty obvious to me. The NETWORK SERVICE user doesn't have
rights to the root of the D drive. Change the permissions so that it does.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Ken" <kl**@jeromegro up.comwrote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
I'm currently working on framework 1.1 webapplication using C#.
When I test the application located in my local machine, it works fine to
"Directory.Crea teDirectory()".
However, I test the application use in server machine, it doesn't work.
it make security log like below.
Anyone has a idea for this????

Thanks

=============== =======
Object Open:

Object Server: Security

Object Type: File

Object Name: D:\

Handle ID: -

Operation ID: {0,15777290}

Process ID: 480

Image File Name: C:\WINDOWS\syst em32\inetsrv\w3 wp.exe

Primary User Name: NETWORK SERVICE

Primary Domain: NT AUTHORITY

Primary Logon ID: (0x0,0x3E4)

Client User Name: www.ken.c

Client Domain: TFken.COM

Client Logon ID: (0x0,0xE4A05E)

Accesses: ReadAttributes
Privileges: -

Restricted Sid Count: 0

Access Mask: 0x80

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

=============== =============== =======


Nov 12 '07 #2
Ken
well,
I added the Network service however, it didn't solve the problem.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c omwrote in
message news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
Ken,

It looks pretty obvious to me. The NETWORK SERVICE user doesn't have
rights to the root of the D drive. Change the permissions so that it
does.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Ken" <kl**@jeromegro up.comwrote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
>I'm currently working on framework 1.1 webapplication using C#.
When I test the application located in my local machine, it works fine to
"Directory.Cre ateDirectory()" .
However, I test the application use in server machine, it doesn't work.
it make security log like below.
Anyone has a idea for this????

Thanks

============== ========
Object Open:

Object Server: Security

Object Type: File

Object Name: D:\

Handle ID: -

Operation ID: {0,15777290}

Process ID: 480

Image File Name: C:\WINDOWS\syst em32\inetsrv\w3 wp.exe

Primary User Name: NETWORK SERVICE

Primary Domain: NT AUTHORITY

Primary Logon ID: (0x0,0x3E4)

Client User Name: www.ken.c

Client Domain: TFken.COM

Client Logon ID: (0x0,0xE4A05E)

Accesses: ReadAttributes
Privileges: -

Restricted Sid Count: 0

Access Mask: 0x80

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

============== =============== ========



Nov 12 '07 #3
Have you tried to run the service as the same user that your test app
runs under? If so, then you didn't give the user the correct permissions.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Ken" <kl**@jeromegro up.comwrote in message
news:uw******** ******@TK2MSFTN GP02.phx.gbl...
well,
I added the Network service however, it didn't solve the problem.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c omwrote
in message news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
>Ken,

It looks pretty obvious to me. The NETWORK SERVICE user doesn't have
rights to the root of the D drive. Change the permissions so that it
does.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Ken" <kl**@jeromegro up.comwrote in message
news:%2******* *********@TK2MS FTNGP03.phx.gbl ...
>>I'm currently working on framework 1.1 webapplication using C#.
When I test the application located in my local machine, it works fine
to
"Directory.Cr eateDirectory() ".
However, I test the application use in server machine, it doesn't work.
it make security log like below.
Anyone has a idea for this????

Thanks

============= =========
Object Open:

Object Server: Security

Object Type: File

Object Name: D:\

Handle ID: -

Operation ID: {0,15777290}

Process ID: 480

Image File Name: C:\WINDOWS\syst em32\inetsrv\w3 wp.exe

Primary User Name: NETWORK SERVICE

Primary Domain: NT AUTHORITY

Primary Logon ID: (0x0,0x3E4)

Client User Name: www.ken.c

Client Domain: TFken.COM

Client Logon ID: (0x0,0xE4A05E)

Accesses: ReadAttributes
Privileges: -

Restricted Sid Count: 0

Access Mask: 0x80

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

============= =============== =========




Nov 12 '07 #4
Ken
well, I couldn't do that because that I don't have right to do in that
server.
the odd thing is the application tried to create a folder under
"D:\Hosting\dir ect.com\www\htm l-Admin\ProductIm ages\50" for a example.
but security event log said "Object Name: D:\" not the full name of the
path.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c omwrote in
message news:uE******** *****@TK2MSFTNG P06.phx.gbl...
Have you tried to run the service as the same user that your test app
runs under? If so, then you didn't give the user the correct permissions.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Ken" <kl**@jeromegro up.comwrote in message
news:uw******** ******@TK2MSFTN GP02.phx.gbl...
>well,
I added the Network service however, it didn't solve the problem.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c omwrote
in message news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
>>Ken,

It looks pretty obvious to me. The NETWORK SERVICE user doesn't have
rights to the root of the D drive. Change the permissions so that it
does.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Ken" <kl**@jeromegro up.comwrote in message
news:%2****** **********@TK2M SFTNGP03.phx.gb l...
I'm currently working on framework 1.1 webapplication using C#.
When I test the application located in my local machine, it works fine
to
"Directory.C reateDirectory( )".
However, I test the application use in server machine, it doesn't work.
it make security log like below.
Anyone has a idea for this????

Thanks

============ ==========
Object Open:

Object Server: Security

Object Type: File

Object Name: D:\

Handle ID: -

Operation ID: {0,15777290}

Process ID: 480

Image File Name: C:\WINDOWS\syst em32\inetsrv\w3 wp.exe

Primary User Name: NETWORK SERVICE

Primary Domain: NT AUTHORITY

Primary Logon ID: (0x0,0x3E4)

Client User Name: www.ken.c

Client Domain: TFken.COM

Client Logon ID: (0x0,0xE4A05E)

Accesses: ReadAttributes
Privileges : -

Restricted Sid Count: 0

Access Mask: 0x80

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

============ =============== ==========






Nov 13 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2426
by: Daniel | last post by:
If I call CreateDirectory(\\\\devDriveA\\foo\\bar\\a\\b\\c) and \\devDriveA\foo\bar already exists then sub directories a\b\c don't get created. When I use CreateDirectory on my own file system, e.g. CreateDirectory("c:\\a\\b\\c"); it works fine. Is there something that I must do to get CreateDirectory to work on network drives?
1
1539
by: H.B. | last post by:
Hi, Is there a way to avoid conflicts between CreateDirectory() (from API) and Directory::CreateDirectory(). The other functions from Directory class works(Exists() as example). It seems to be caused by the inclusion of "windows.h" ... but I need it. I already tried the System::IO::Directory::CreateDirectory() typo. Any ideas ?
1
2425
by: Sparky | last post by:
I want to create a directory on my web server from within code. I've tried using Request.PhysicalApplicationPath() to get the location of the application, and appended my new directory on the end and used Directory.CreateDirectory which fails with: System.IO.DirectoryNotFoundException: Could not find a part of the path "d:\". at System.IO.__Error.WinIOError(Int32 errorCode, String str) at...
3
2296
by: James Coleman | last post by:
Hello, The following error is appearing when attempting to create a directory using the availale system.io methods: System.IO.DirectoryNotFoundException: Could not find a part of the path "D:\". at System.IO.__Error.WinIOError(Int32 errorCode, String str) at System.IO.Directory.InternalCreateDirectory(String fullPath, String path) at System.IO.Directory.CreateDirectory(String path) at TestVBProject.createdirectorytest.Page_Load(Object...
2
2202
by: Paul Bromley | last post by:
How can I create a directory within a shared ntwork directory?? sServerName - is the Server name "\Docs" - is the shared directory "\Others" - is the directory to create. The following does not work, although I can through code open and copy files from "\Docs"
23
2439
by: **Developer** | last post by:
Is there an easy way to copies all files in a directory into another directory? What about coping subdirectories too? Thanks in advance for any info
2
3954
by: CCLeasing | last post by:
If (Directory.Exists(@"c:\indigo\" + txtOfficial + @"\" + comOffice.Text + @"\" + numTerm.Value.ToString())) { storereport(); } else { Directory.CreateDirectory(@"c:\indigo\" + txtOfficial + @"\" + comOffice.Text + @"\" + numTerm.Value.ToString());
2
8694
by: Toolsmith | last post by:
The following code: C# code: Directory.CreateDirectory("D:\\somewhere\\somewhereelse\\here\\") works, but the following does flags the error: An unhandled exception of type 'System.NotSupportedException' occurred in mscorlib.dll
4
2825
by: Robert | last post by:
Greetings New to Visual Studio 2008. Always us VB6.0 SP5. I am trying to copy files from A to B. I select a directory, and copy files. Works ok, but it does not create the directory first. snippet. Private Sub cmdTo_Click(ByVal sender As System.Object, ByVal e As
4
2573
by: Tom | last post by:
This is really weird, but I have the following code: private static readonly string mString = "tempUnzipDir" + Path.DirectorySeparatorChar; .... public static string ExtractToTempLocation(string aZip) { try
0
10360
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10108
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9960
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8988
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7510
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4064
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3668
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.