In my .aspx page, I am trying to read file that is on a different on the
company network.
When I map a drive to it and call from within my .aspx page, I get this
error:
Could not find a part of the path 'Z:\Events.nss'.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.IO.DirectoryNotFoundException: Could not find a
part of the path 'Z:\Events.nss'.
When I put in the path as \\server\content\Events.nss, I get an error saying
I needed a username and password to be able to get to that place.
How can I get to this file?
Thanks for any help,
Ron 7 4476
On Thu, 16 Mar 2006 16:59:32 -0700, "Ronald S. Cook" <rc***@westinis.com> wrote: In my .aspx page, I am trying to read file that is on a different on the company network. When I map a drive to it and call from within my .aspx page, I get this error: Could not find a part of the path 'Z:\Events.nss'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of the path 'Z:\Events.nss'. When I put in the path as \\server\content\Events.nss, I get an error saying I needed a username and password to be able to get to that place. How can I get to this file? Thanks for any help,
Ron
That typically means you don't have permission to read that file. See your
system administrator.
Otis Mukinfus http://www.arltex.com http://www.tomchilders.com
The ASPNET user in your computer didn't have the permission to access file
on the remote computer.
The remote computer has to grant your ASPNET account to access that file.
"Ronald S. Cook" <rc***@westinis.com> wrote in message
news:%2******************@TK2MSFTNGP14.phx.gbl... In my .aspx page, I am trying to read file that is on a different on the company network. When I map a drive to it and call from within my .aspx page, I get this error: Could not find a part of the path 'Z:\Events.nss'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of the path 'Z:\Events.nss'. When I put in the path as \\server\content\Events.nss, I get an error saying I needed a username and password to be able to get to that place. How can I get to this file? Thanks for any help,
Ron
"Dragon" <ta*****@hotmail.com> wrote in message
news:OH**************@tk2msftngp13.phx.gbl...
| The ASPNET user in your computer didn't have the permission to access file
| on the remote computer.
| The remote computer has to grant your ASPNET account to access that file.
|
Which is not possible as ASPNET is a local account.
Willy.
Your mapped drive Z: is mapped in the context of the "interactive user"
session, not in the context of the ASPNET user or whatever user context your
Web application runs in.
You have to impersonate a user account that has the appropriate access
privileges to the remote share, and you should use UNC paths to access
remote files.
There are several way's to accomplish this, but the most appropriate is
through a COM+ server type component.
ASP.NET -----> COM+ server ------> Remote share
local user domain user/network user
Here you keep your asp.net application running as a local user, while your
COM+ application runs as a domain user or as a user (f.i a shadow account)
with appropriate access privs. to the remote share.
Willy.
"Ronald S. Cook" <rc***@westinis.com> wrote in message
news:%2******************@TK2MSFTNGP14.phx.gbl...
| In my .aspx page, I am trying to read file that is on a different on the
| company network.
|
|
|
| When I map a drive to it and call from within my .aspx page, I get this
| error:
|
|
|
| Could not find a part of the path 'Z:\Events.nss'.
|
| Description: An unhandled exception occurred during the execution of the
| current web request. Please review the stack trace for more information
| about the error and where it originated in the code.
|
| Exception Details: System.IO.DirectoryNotFoundException: Could not find a
| part of the path 'Z:\Events.nss'.
|
|
|
| When I put in the path as \\server\content\Events.nss, I get an error
saying
| I needed a username and password to be able to get to that place.
|
|
|
| How can I get to this file?
|
|
|
| Thanks for any help,
|
| Ron
|
|
Yes, right, How about if two computer in the same domain ?
Can it be granted ? I am not sure...
"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl... "Dragon" <ta*****@hotmail.com> wrote in message news:OH**************@tk2msftngp13.phx.gbl... | The ASPNET user in your computer didn't have the permission to access file | on the remote computer. | The remote computer has to grant your ASPNET account to access that file. |
Which is not possible as ASPNET is a local account.
Willy.
What do you mean with "Can it be granted ?". A local account doesn't have
network access privileges at all. When running in a domain, you can
impersonate or run your web application as a domain user, but the latter is
something you should only do in a 'secure' environment (if that ever
exists), preferably you won't run a public web application as a domain user.
Note also that 'aspnet' is kind of a special account, you don't create
'aspnet' and you don't know it's password, it's called a 'machine account'
and such accounts have their passwords maintained by the security system in
the OS (or don't have passwords at all). Services that run as "aspnet", use
the "machine" name to access network resources when the machine is a members
of an AD domain (W2K or higher). That means that 'aspnet' can access
external resources, provided that you granted the 'machine account' access
privileges to the share.
Willy.
"Dragon" <ta*****@hotmail.com> wrote in message
news:ey**************@TK2MSFTNGP10.phx.gbl...
| Yes, right, How about if two computer in the same domain ?
| Can it be granted ? I am not sure...
|
| "Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
| news:%2******************@TK2MSFTNGP11.phx.gbl...
| >
| > "Dragon" <ta*****@hotmail.com> wrote in message
| > news:OH**************@tk2msftngp13.phx.gbl...
| > | The ASPNET user in your computer didn't have the permission to access
| > file
| > | on the remote computer.
| > | The remote computer has to grant your ASPNET account to access that
| > file.
| > |
| >
| > Which is not possible as ASPNET is a local account.
| >
| > Willy.
| >
| >
|
|
Hi,
"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl... "Dragon" <ta*****@hotmail.com> wrote in message news:OH**************@tk2msftngp13.phx.gbl... | The ASPNET user in your computer didn't have the permission to access file | on the remote computer. | The remote computer has to grant your ASPNET account to access that file. |
Which is not possible as ASPNET is a local account.
Worse, as it's running as a service cannot "mount" remote shares, you have
to use UNC to reach it. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Galina |
last post by:
Hello
I have an Access 2000 application. The form has got a tab with 3
pages. There are several text boxes and command buttons on one page. I
need to move them to another page (to free form space...
|
by: Lane |
last post by:
Using this code to create a passable parameter
<%@ Page Language="C#" ClassName="FirstPageClass" %><html><head><script runat="server"
public string FirstName
{
get
{
return first.Text;
}
|
by: Steven |
last post by:
Hi. I have a dynamic ASPX page written in C# that I want
to turn into a PDF file and store it for records. Please
help, because I am not sure where to start. Thank you.
|
by: Syed Aun Ali |
last post by:
i am running an asp.net application on a IIs server with some clients
connected through local network and Tcp/ip.i want to send data from a textbox
control on a aspx page of a client machine to a...
|
by: John M |
last post by:
Hello,
In Visual Studio .NET 2003,
How can I use javascript/vbscript (client code & server code) from ASPX
page,
javascript is an external file, (MyJavascriptCode.js).
Need sample code,...
|
by: Ronald S. Cook |
last post by:
In my .aspx page, I am trying to read file that is on a different on the
company network.
When I map a drive to it and call from within my .aspx page, I get this
error:
|
by: MadHatter51 |
last post by:
I have an application where a selection is made from a list on a web
page. I have written a class to handle some database processing and
then wish to pass a bunch of data objects to another web...
|
by: AnuSumesh |
last post by:
Hi All,
I am writing one aspx page in which i am calling abc.htm file using <iframe> tag.
I want to pass one variable from aspx page that should be read from html page.
I am new to .net. I...
|
by: Guoqi Zheng |
last post by:
Dear Sir,
I have an existing application done in ASP.NET(VB.NET), I need to change one
page of it. Because I am not able to recompile the code and upload the new
dll, I am thinking to use one...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
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...
|
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: 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...
|
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...
|
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...
|
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,...
|
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...
| | |