473,382 Members | 1,238 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Server access to files on the LAN


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
Nov 18 '05 #1
3 1716
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
"Jerry J" <an*******@discussions.microsoft.com> wrote in message
news:00****************************@phx.gbl...

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

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.556 / Virus Database: 348 - Release Date: 12/26/2003
Nov 18 '05 #2

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.

--------------------------------------------------------------------
This reply is provided AS IS, without warranty (express or implied).
--------------------
Content-Class: urn:content-classes:message
From: "Jerry J" <an*******@discussions.microsoft.com>
Sender: "Jerry J" <an*******@discussions.microsoft.com>
Subject: Server access to files on the LAN
Date: Tue, 30 Dec 2003 09:48:50 -0800
Lines: 19
Message-ID: <00****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Thread-Index: AcPO/S7qNhGQDfu+S4q0gYPNbYUXYw==
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Newsgroups: microsoft.public.dotnet.framework.aspnet
Path: cpmsftngxa07.phx.gbl
Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet:198909
NNTP-Posting-Host: tk2msftngxa11.phx.gbl 10.40.1.163
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
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


Nov 18 '05 #3
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


"Jerry J" <an*******@discussions.microsoft.com> wrote in message
news:00****************************@phx.gbl...

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

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ken Lindner | last post by:
I have a need to become familiar with SQL Server 2000 for work. Needless to say I am new to SQL Server any version, but not IT in general. My employer has provided me with the SQL Server 2000...
7
by: laura | last post by:
I'm trying to understand fully Server.MapPath. I am writing an intranet for a small company and want to be able to put some files accessible to all, hyperlinked from the intranet and therefore,...
5
by: Martin Robins | last post by:
I have never dabbled with ASP.NET until now so be warned! I have created a web application with the single default form: WebForm1.aspx and when I try to display it I get this error. My...
7
by: Nick Gilbert | last post by:
Hi, As part of a website (ASP.NET) we're creating, we need the ability to store documents with pretty much 'mission critical' security. ie, if the server is completely compromised (eg a...
2
by: reycon | last post by:
I have a problem that has been doggin me for 2 days now. I have a web app that needs to access files on another server in the same domain. but nothing that I have tried has allowed the web app...
15
by: CSharpguy | last post by:
I need to upload a file to an FTP server, can someone point me to some code that connects to an FTP server and uploads a file?
4
by: Pedro Leite | last post by:
Good Afternoon. the code below is properly retreiving binary data from a database and saving it. but instead of saving at client machine is saving at the server machine. what is wrong with my...
2
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
3
by: ManWithNoName | last post by:
Hi guys. I’m still occupied with school, however, I can’t quite help thinking about a part of my project that I’m very curious about. I want to protect files and folders on the web server, so...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.