Access a file physically on a remote server

G

Guest

Hi,

Is there any way we can access a file using the physical path on a remote
server? I need to read and delete content of a remote directory on the LAN.
All I got so far is access denied so I wonder if it's possible.

Here's the situation:

On a web server using IIS and ASP.NET, my ASP page tries to read a distant
file using a path like \\172.31.3.3\reports\file.html. Once it's read, I have
to delete it.

What windows user is accessing the file? What permissions does he need?

I could access it using HTTP but the problem would be to delete it. I don't
know any way to delete a file using HTTP. Any idea?

Thanks for any help,

Stephane
 
G

Guest

The access denied most likely comes because your application is set up for
anonymous access. You need to be working as your windows login and have
rights to the directory. You should then be able to do what you desire.

As an alternative, you can completely destroy the security of your network
by having a network admin account set up as the anonymous user account on
your webserver. While this effectively sloughs off the work onto the network
admins, which could be fun, I do not recommend this approach.

NOTE: While the second (sarcastic) approach might sound stupid to some (if
it does, great, you are one who understands the implications of granting your
web server anon account full rights), it is far too common. I do not know how
many places I have walked into where the anonymous account had full rights on
directories and databases.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
K

Kevin Spencer

. I do not know how
many places I have walked into where the anonymous account had full rights
on
directories and databases.

247, as I recall.

--
;-),

Kevin Spencer
Microsoft MVP
..Net Developer
Paranoia is just a state of mind.
 
P

Paul Clement

¤ Hi,
¤
¤ Is there any way we can access a file using the physical path on a remote
¤ server? I need to read and delete content of a remote directory on the LAN.
¤ All I got so far is access denied so I wonder if it's possible.
¤
¤ Here's the situation:
¤
¤ On a web server using IIS and ASP.NET, my ASP page tries to read a distant
¤ file using a path like \\172.31.3.3\reports\file.html. Once it's read, I have
¤ to delete it.
¤
¤ What windows user is accessing the file? What permissions does he need?
¤
¤ I could access it using HTTP but the problem would be to delete it. I don't
¤ know any way to delete a file using HTTP. Any idea?
¤
¤ Thanks for any help,

You need to indicate what type of authentication your web application is configured for and whether
you are using impersonation.


Paul
~~~~
Microsoft MVP (Visual Basic)
 
G

Guest

You need to give the iis process windows user access to that remote
directory, just log into that machine find the directory, click security give
full access. Not sure what it is in .net, it was IUSR_machinename in ASP.
It will also make your scripting a lot easier if you just map the network
drive to x: or whaterver on the webserver.
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top