Groups | Blog | Home
all groups > asp.net > february 2005 >

asp.net : DirectoryInfo not working


G Dean Blake
2/26/2005 5:27:02 PM
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

Scott Allen
2/26/2005 8:57:34 PM
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>
[quoted text, click to view]
G Dean Blake
2/27/2005 9:57:09 AM
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.


[quoted text, click to view]

Scott Allen
2/27/2005 1:43:56 PM
On Sun, 27 Feb 2005 09:57:09 -0800, "G Dean Blake" <gb@nospam.com>
[quoted text, click to view]

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

--
Scott
http://www.OdeToCode.com/blogs/scott/
AddThis Social Bookmark Button