473,699 Members | 2,849 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASPNET permissions woe - even when writing to a local drive that is mapped

Hi,

My client has the following network structure:

2 Windows 2003 servers :
Server 1 - Web server running IIS, ftp import and export folder,
ASP.NET SOAP web service and asp code on here.
Server 2 - SQL server with database on. Want to store images on here
accessed via a share.

Standalone servers, no active directory, so users need to be set up on
both servers.

Situation:
I have installed an ASP.NET SOAP web service tool on server 1. This
uses ASPNET account which is only a local account. Therefore, if I
want this process to write to the local machine, great it all works.
If I want to write to server 2, then I need to set up a domain account
for the ASPNET process to use. I have accomplished this in the past
and know it works (when the network structure uses active
directory/domain accounts).

The problem is that my client does not have domain accounts, so I
cannot get the ASPNET process to write to another PC. Worse still, I
can only get the ASPNET to write to the local server if the location is
on a physical drive (i.e. C:\ or D:\). If I map a drive letter (i.e.
G:\) to point to C:\Images, then the ASPNET process is unable to write
- despite the fact that C:\Images and G:\ are pointing to the local
server.

This is the same when I try to write to a local location when using UNC
path (i.e. \\localPC\Image s)

It seems as if mapped drives and UNC paths force ASPNET to be
validated/authenticated against domain accounts.

How can I get around this problem when the client does not have domain
accounts and active directory?

Many thanks.

Jimmy

Nov 19 '05 #1
3 1606
Jimmy,

This may point you in the right direction:

http://www.netomatix.com/ImpersonateUser.aspx

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
<ji***********@ yahoo.co.uk> wrote in message
news:11******** **************@ g47g2000cwa.goo glegroups.com.. .
Hi,

My client has the following network structure:

2 Windows 2003 servers :
Server 1 - Web server running IIS, ftp import and export folder,
ASP.NET SOAP web service and asp code on here.
Server 2 - SQL server with database on. Want to store images on here
accessed via a share.

Standalone servers, no active directory, so users need to be set up on
both servers.

Situation:
I have installed an ASP.NET SOAP web service tool on server 1. This
uses ASPNET account which is only a local account. Therefore, if I
want this process to write to the local machine, great it all works.
If I want to write to server 2, then I need to set up a domain account
for the ASPNET process to use. I have accomplished this in the past
and know it works (when the network structure uses active
directory/domain accounts).

The problem is that my client does not have domain accounts, so I
cannot get the ASPNET process to write to another PC. Worse still, I
can only get the ASPNET to write to the local server if the location is
on a physical drive (i.e. C:\ or D:\). If I map a drive letter (i.e.
G:\) to point to C:\Images, then the ASPNET process is unable to write
- despite the fact that C:\Images and G:\ are pointing to the local
server.

This is the same when I try to write to a local location when using UNC
path (i.e. \\localPC\Image s)

It seems as if mapped drives and UNC paths force ASPNET to be
validated/authenticated against domain accounts.

How can I get around this problem when the client does not have domain
accounts and active directory?

Many thanks.

Jimmy

Nov 19 '05 #2
Thanks for this Justin. I was wondering whether there is another way
to get around this problem. I do not want to amend my code (unless
there is no other option but to do so) as I have currently a solution
that works for all of my clients except one. Cheers,

Jimmy

Nov 19 '05 #3
On 9 Sep 2005 05:50:00 -0700, ji***********@y ahoo.co.uk wrote:

¤ Hi,
¤
¤ My client has the following network structure:
¤
¤ 2 Windows 2003 servers :
¤ Server 1 - Web server running IIS, ftp import and export folder,
¤ ASP.NET SOAP web service and asp code on here.
¤ Server 2 - SQL server with database on. Want to store images on here
¤ accessed via a share.
¤
¤ Standalone servers, no active directory, so users need to be set up on
¤ both servers.
¤
¤ Situation:
¤ I have installed an ASP.NET SOAP web service tool on server 1. This
¤ uses ASPNET account which is only a local account. Therefore, if I
¤ want this process to write to the local machine, great it all works.
¤ If I want to write to server 2, then I need to set up a domain account
¤ for the ASPNET process to use. I have accomplished this in the past
¤ and know it works (when the network structure uses active
¤ directory/domain accounts).
¤
¤ The problem is that my client does not have domain accounts, so I
¤ cannot get the ASPNET process to write to another PC. Worse still, I
¤ can only get the ASPNET to write to the local server if the location is
¤ on a physical drive (i.e. C:\ or D:\). If I map a drive letter (i.e.
¤ G:\) to point to C:\Images, then the ASPNET process is unable to write
¤ - despite the fact that C:\Images and G:\ are pointing to the local
¤ server.
¤
¤ This is the same when I try to write to a local location when using UNC
¤ path (i.e. \\localPC\Image s)
¤
¤ It seems as if mapped drives and UNC paths force ASPNET to be
¤ validated/authenticated against domain accounts.
¤
¤ How can I get around this problem when the client does not have domain
¤ accounts and active directory?
¤

The only way I can think of that this would possibly work is to have a local account on both
machines (the web server and remote resource) that have the same credentials (user ID and password).
You would need to run your ASP.NET application process under this local account (instead of ASPNET).
Paul
~~~~
Microsoft MVP (Visual Basic)
Nov 19 '05 #4

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

Similar topics

1
2137
by: MC | last post by:
Hi all, I've read the various posts concerning file access on mapped drives--I think problem is different: The problem: Open a VB Winforms project from a mapped drive and all files open fine except form files. Their code opens fine but trying to open them in the form designer I get (for instance) "The item 'MainForm.vb' does not exist in the project directory. It
12
1969
by: Mark | last post by:
Hello, in a simple console application I try to create a file with some code like: FileStream file = new FileStream("test.txt", FileMode.OpenOrCreate, FileAccess.Write); StreamWriter sw = new StreamWriter(file); sw.Write("Hello"); sw.Close(); file.Close();
4
2183
by: SWu | last post by:
Hi all Could someone tell me how to give my app permission to create a file in a subfolder? At the moment, I am getting 'Access to the path "C:\Inetpub\wwwroot\myWeb\uploadedfiles\temp.pdf" is denied'. Any help anyone can give me urgently would be greatly appreciated. Thanks, Stephen
5
4672
by: Stephane | last post by:
Hi, I'm sorry, this question is also posted in dotnet.framework, I don't know in which newsgroup my question belongs to... I'm trying to write in the event log and it looks like it's any of my applications which are called by ASP.NET that are having trouble with event log. Here's the error:
2
1550
by: Yogesh Pancholi | last post by:
For some unexplained reason, I am suddenly unable to browse to a virtual directory on my laptop. I have a number of sample websites to which I could happliy browse up until last week. As of Monday, if I browse to any of the sites, I get an HttpException saying "The directory does not exist or is not accessible because of security settings." I honestly have not changed anything at all. I have checked and re-checked that ASPNET indeed has...
2
4396
by: dimstthomas | last post by:
Hello I have posted to this group as it seems to be a lot busier than the odbc specific ones. If you can suggest a more appropriate group I will post it there. I am connecting to databases on a server using asp pages. There are two databases, an Access database and a Sage database (part of the Sage Line 50 accounting package)
6
2433
by: Andrew Chalk | last post by:
My application attempts to connect to an SQL Server database as name ASPNET and Login Name SERVERNAME/ASPNET in response to these commands: SqlConnection myConnection = new SqlConnection("Data Source=(local);Initial Catalog=MCSCRE;Integrated Security=SSPI"); myConnection.Open(); However, the user of this database is ASPNET. I can't create a user ASPNET with a login name SERVERNAME/ASPNET, SQL Enterprise Manager always keeps the name...
1
2512
by: maz01 | last post by:
Hello All, I am developing an application in visual basic 2005 that will run continuously in the background on a users workstation. This application will automatically transfer files from the local machine to a remote server and vise versa. It checks for the files on a timed interval. I have two problems with this application that I am having trouble figuring out: The first problem is that the cmd.exe shell pops up on the screen every...
9
7123
by: Martin | last post by:
Using ODBC in a PHP script, I'm trying to read an MS Access MDB file that resides on another computer on my LAN. I'm getting the error: Warning: odbc_connect() : SQL error: The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data., SQL state S1000 in SQLConnect in ... The file is NOT already opened exclusively (or in any other manner)...
0
8704
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8623
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9192
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9054
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8940
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7781
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6546
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5879
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.