Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Read/Write/Modify actions needed on a remote server.

Reply
Thread Tools

Read/Write/Modify actions needed on a remote server.

 
 
chris
Guest
Posts: n/a
 
      07-13-2006
Hello,

I do not have much expertise in the security area, especially when it
comes to Windows Authentication.

We have a Win 2003 server that runs the ASP.NET 2.0 Web application.

I have a simple page that needs to access the directory info on a
remote server and if the directory does not exist then create the
directory.

Here is a snippet of the code I am trying to exectute:
string serverPath =
@"\\RemoteServer\webimages\8f3d7375-05e9-435d-b284-3d0a9179681c";
DirectoryInfo di = new DirectoryInfo(serverPath);
if (!di.Exists)
di.Create();

imagefiles = di.GetFiles();

The problem is the DirectoryInfo object always has false for the Exists
property.

Here is the exception I get when it tries to create the directory:
Method Name: WinIOError
Declaring Type: System.IO.__Error
Message:
Could not find file
'\\RemoteServer\webimages\8f3d7375-05e9-435d-b284-3d0a9179681c'.

Ops told me that they gave the ASP.NET user full control to the
webimages directory. The remote machine is on the same domain and is a
Win 2003 server.

What we have is an image server that sits on the same domain as the web
server. We want to give our users the ability to upload images to that
server and manage their images.

Can anyone please give me some resources to read up on when it comes to
this? Or just let me know what the best practice is when it comes to
working file and directory objects on remote machines?

Thanks,
Chris

 
Reply With Quote
 
 
 
 
Dominick Baier
Guest
Posts: n/a
 
      07-13-2006
hi,

make sure you don't have impersonation enabled in web.config - otherwise
this is a delegation problem -

read more here:
http://msdn.microsoft.com/msdnmag/is...s/default.aspx

if no impersonation is enabled:
is ops really sure about the right account - the account under which the
worker process runs must have the access to the remote resource, this is
NETWORK SERVICE by default which materializes as MACHINE$ on the remote machine.
Otherwise you have configured a custom account for the worker process which
also needs the required access.

> Hello,
>
> I do not have much expertise in the security area, especially when it
> comes to Windows Authentication.
>
> We have a Win 2003 server that runs the ASP.NET 2.0 Web application.
>
> I have a simple page that needs to access the directory info on a
> remote server and if the directory does not exist then create the
> directory.
>
> Here is a snippet of the code I am trying to exectute:
> string serverPath =
> @"\\RemoteServer\webimages\8f3d7375-05e9-435d-b284-3d0a9179681c";
> DirectoryInfo di = new DirectoryInfo(serverPath);
> if (!di.Exists)
> di.Create();
> imagefiles = di.GetFiles();
>
> The problem is the DirectoryInfo object always has false for the
> Exists property.
>
> Here is the exception I get when it tries to create the directory:
> Method Name: WinIOError
> Declaring Type: System.IO.__Error
> Message:
> Could not find file
> '\\RemoteServer\webimages\8f3d7375-05e9-435d-b284-3d0a9179681c'.
> Ops told me that they gave the ASP.NET user full control to the
> webimages directory. The remote machine is on the same domain and is
> a Win 2003 server.
>
> What we have is an image server that sits on the same domain as the
> web server. We want to give our users the ability to upload images to
> that server and manage their images.
>
> Can anyone please give me some resources to read up on when it comes
> to this? Or just let me know what the best practice is when it comes
> to working file and directory objects on remote machines?
>
> Thanks,
> Chris



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
TB 1.0.6 - How do you add files types and actions to the "Automatically perform" section? Z@no.spam Firefox 4 01-02-2006 04:38 PM
Remote Assistance fails to connect, remote remote host name could not be resolved Peter Sale Wireless Networking 1 12-11-2004 09:09 PM
tb0.7.1/osx10.3.4/attachments/file types default actions look^ Firefox 4 07-28-2004 08:55 AM
Intercepting actions in Internet Explorer (When a user tries to downloada file) Timothy Parez ASP .Net 0 03-06-2004 10:04 AM
OPB write actions Frank VHDL 0 10-22-2003 09:45 AM



Advertisments