473,405 Members | 2,404 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,405 software developers and data experts.

DirectoryInfo not working

the following code has a valid string in Session("ScannedInvoicedDirectory")
which is \\Machine1\c\InvoiceScans. In fact I can put that string into file
explorer and it scans to the directory on the other machine sucessfully.
but rootdi.exists is false. This code used to work. What could be wrong?

Thanks,
G

Dim rootdi As DirectoryInfo = New
DirectoryInfo(Session("ScannedInvoicesDirectory"))
If Not rootdi.Exists Then
lblError.Text = "Scanned Directory" &
Session("ScannedInvoicesDirectory") & "does not exist"
Exit Sub
End If
Nov 19 '05 #1
3 1299
I'd check to see if there is a permissions issue. The ASPNET account
typically can't get to network resources.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Sat, 26 Feb 2005 17:27:02 -0800, "G Dean Blake" <gb@nospam.com>
wrote:
the following code has a valid string in Session("ScannedInvoicedDirectory")
which is \\Machine1\c\InvoiceScans. In fact I can put that string into file
explorer and it scans to the directory on the other machine sucessfully.
but rootdi.exists is false. This code used to work. What could be wrong?

Thanks,
G

Dim rootdi As DirectoryInfo = New
DirectoryInfo(Session("ScannedInvoicesDirectory") )
If Not rootdi.Exists Then
lblError.Text = "Scanned Directory" &
Session("ScannedInvoicesDirectory") & "does not exist"
Exit Sub
End If


Nov 19 '05 #2
I already have the machine.config <processmodel username set to SYSTEM and I
recall that was what I had to originally do to make this work. One thing
that has happened since then was that both of my XP systems got upgraded
with the XP security release - that probably has something to do with it.
G.
"Scott Allen" <sc***@nospam.odetocode.com> wrote in message
news:9v********************************@4ax.com...
I'd check to see if there is a permissions issue. The ASPNET account
typically can't get to network resources.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Sat, 26 Feb 2005 17:27:02 -0800, "G Dean Blake" <gb@nospam.com>
wrote:
the following code has a valid string in
Session("ScannedInvoicedDirectory")
which is \\Machine1\c\InvoiceScans. In fact I can put that string into
file
explorer and it scans to the directory on the other machine sucessfully.
but rootdi.exists is false. This code used to work. What could be wrong?

Thanks,
G

Dim rootdi As DirectoryInfo = New
DirectoryInfo(Session("ScannedInvoicesDirectory" ))
If Not rootdi.Exists Then
lblError.Text = "Scanned Directory" &
Session("ScannedInvoicesDirectory") & "does not exist"
Exit Sub
End If

Nov 19 '05 #3
On Sun, 27 Feb 2005 09:57:09 -0800, "G Dean Blake" <gb@nospam.com>
wrote:
I already have the machine.config <processmodel username set to SYSTEM and I
recall that was what I had to originally do to make this work. One thing
that has happened since then was that both of my XP systems got upgraded
with the XP security release - that probably has something to do with it.
G.


Was it an upgrade to SP2? Is the sp2 firewall now on?

--
Scott
http://www.OdeToCode.com/blogs/scott/

Nov 19 '05 #4

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

Similar topics

4
by: Pluto | last post by:
Hi, I want to get a list of files matching certain extensions, such as "*.jpg;*.gif" (i.e. all files ending with .jpg and .gif). I was using DirectoryInfo.GetFiles(string) method....
6
by: Glenn Venzke | last post by:
I have an aspx page that is set up to copy backed-up DB files from a shared directory to a local folder. For some reason, it is being denied access to the network share. I have the web app running...
8
by: Lyners | last post by:
I have code that retrieves all of the file names within a directory. After retriving them, I display the information in a datagrid. What I would like to do is add an extra output column on the...
3
by: xenophon | last post by:
This following innocuous code: System.IO.DirectoryInfo fff = new System.IO.DirectoryInfo(); System.IO.FileInfo ppp = fff.GetFiles( Request.MapPath(".") ); for( int ccc=0 ; ccc < ppp.Length ;...
1
by: Dominic Marks | last post by:
Hello Group, I'm bemused as to why this code isn't working. It's a very simple loop over the array of FileInfo objects returned from DirectoryInfo.GetFiles. It works fine until the eigth...
2
by: rn5a | last post by:
Suppose I have the following code: <script runat="server"> Sub Page_Load(.....) Dim dInfo As DirectoryInfo Dim fsi As FileSystemInfo dInfo = New DirectoryInfo(Server.MapPath("Folder1")) ...
3
by: Steve Kershaw | last post by:
Hi, I need a way to bind a DirectoryInfo array to a GridView without any errors. The code I'm using to create the DirectoryInfo array is: // Define the current directory DirectoryInfo dir...
2
by: RodneyAnonymous | last post by:
Hello everyone. I'm working on a simple utility that lists all files in a given directory with a given extension and outputs the results to a text file. I'm encountering issues while testing where...
5
by: Tom P. | last post by:
I am having the following problem: I create a FileSystemWatcher and wait for events. When the event does happen I refresh a FileSystemInfo list and set properties accordingly (IsFile, IsDir,...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
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,...
0
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,...
0
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...
0
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...
0
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...

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.