Server access to files on the LAN

J

Jerry J

Hi,

My asp.net application must access a file that can be
anywhere on the server's LAN. I am having a problem
because the server, doesn't have access to files that are
not on the server's local disk. I have done similar
things using COM+ and COM dlls in older versions of asp.
I would have the file access code in a COM dll, run the
dll in COM+, and in COM+, enter a UN and PW that would
have LAN privilege that the COM object would execute on
behalf of. Currently, my file access code is in a dll
written in VB.NET. Is there a way I can give the dll
access to the LAN like I used to do in MTS/COM+? Should I
be handling it differently?

Any help would be appreciated.

Jerry J
 
M

Michael Pearson

Do some research on Impersonation for ASP.net.

Look at this part of your machine.config file on your webserver:

<!--
identity Attributes:
impersonate="[true|false]" - Impersonate Windows User
userName="Windows user account to impersonate" | empty string
implies impersonate the LOGON user specified by IIS
password="password of above specified account" | empty string
-->
<identity impersonate="false" userName="" password=""/>

Be careful...if ASP.NET run's as a user with elevated privildges, that could
cause some security concerns.

Michael
 
C

Charlie Nilsson [MSFT]

Right... security is really up to you, and I would do more research rather
than blindly using a suggestion found here -- not because the suggestions
are invalid or wrong, but because we know little about your application and
who's using it.

Think about your application's users, functionality involved, and create a
security model before choosing how to best implement a solution here.

Check out the impersonation support in the web.config file -- but this will
affect every request to your asp app. Also check out IIS settings, and
think about turning off anonymous access and allow IIS to consume
authentication info on each web request -- tieing into domain
authentication.
 
S

sudha

Hi,
You can have a look on setting security policy for the dll
which needs the LAN privilege by using tools like Caspol.You set the
permissionSet as "LocalIntranet"
HTH
 

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

Forum statistics

Threads
473,995
Messages
2,570,233
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top