Directory.CreateDirectory() issue

K

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.CreateDirectory()".
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\system32\inetsrv\w3wp.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.

=====================================
 
N

Nicholas Paldino [.NET/C# MVP]

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.
 
K

Ken

well,
I added the Network service however, it didn't solve the problem.


Nicholas Paldino said:
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]
- (e-mail address removed)

Ken said:
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.CreateDirectory()".
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\system32\inetsrv\w3wp.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.

=====================================
 
N

Nicholas Paldino [.NET/C# MVP]

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]
- (e-mail address removed)

Ken said:
well,
I added the Network service however, it didn't solve the problem.


Nicholas Paldino said:
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]
- (e-mail address removed)

Ken said:
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.CreateDirectory()".
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\system32\inetsrv\w3wp.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.

=====================================
 
K

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\direct.com\www\html-Admin\ProductImages\50" for a example.
but security event log said "Object Name: D:\" not the full name of the
path.


Nicholas Paldino said:
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]
- (e-mail address removed)

Ken said:
well,
I added the Network service however, it didn't solve the problem.


Nicholas Paldino said:
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]
- (e-mail address removed)

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.CreateDirectory()".
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\system32\inetsrv\w3wp.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.

=====================================
 
K

Ken

Nicholas,
I add some code like
========================================================
IPrincipal ip = Thread.CurrentPrincipal;



string iname= ip.Identity.Name;

lbltest.text=iname.ToString();

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

on my local web site it shows up the user.

However, the web site on the server doesn't show any user.

is it some issues of Kerberos ?


Ken said:
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\direct.com\www\html-Admin\ProductImages\50" for a example.
but security event log said "Object Name: D:\" not the full name of the
path.


Nicholas Paldino said:
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]
- (e-mail address removed)

Ken said:
well,
I added the Network service however, it didn't solve the problem.


in message 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]
- (e-mail address removed)

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.CreateDirectory()".
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\system32\inetsrv\w3wp.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.

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top