473,770 Members | 2,171 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 2997
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
2424
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
2294
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
2437
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
9619
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10102
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10038
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
8933
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
7460
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
6712
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
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

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.