473,614 Members | 2,101 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 1602
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
2132
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
1964
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
4671
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
1549
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
4395
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
2427
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
2507
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
7122
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
8176
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
8571
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
8265
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
8423
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7047
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
6085
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
4048
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4115
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1420
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.