473,503 Members | 1,619 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

UNC Path Problem

I have a UNC path that points to a shared directory on another Windows XP
computer. The UNC is \\mylaptop\c\shareddir. This UNC works if I put it
into my i.e. browser so I know it's a good link.

But when I execute the following code....

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

.... it fails. rootdi.exists is false. This code works on my development
machines just fine but it is failing on our production servers.

Does anyone have a clue?

Thanks,

G
Nov 18 '05 #1
2 1914
On Tue, 27 Jul 2004 10:04:38 -0700, "G. Dean Blake" <De**@nospam.com> wrote:
I have a UNC path that points to a shared directory on another Windows XP
computer. The UNC is \\mylaptop\c\shareddir. This UNC works if I put it
into my i.e. browser so I know it's a good link.

But when I execute the following code....

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

... it fails. rootdi.exists is false. This code works on my development
machines just fine but it is failing on our production servers.

Does anyone have a clue?

Thanks,

G

Your ASP_NET user does not have the rights to the other machine file system.
Bobby Ryzhy
bobby @ domain below
http://weekendtech.net
Nov 18 '05 #2
Try to impersonate at run time.

--
WWW: http://hardywang.1accesshost.com
ICQ: 3359839
yours Hardy
"G. Dean Blake" <De**@nospam.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I have a UNC path that points to a shared directory on another Windows XP
computer. The UNC is \\mylaptop\c\shareddir. This UNC works if I put it
into my i.e. browser so I know it's a good link.

But when I execute the following code....

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

... it fails. rootdi.exists is false. This code works on my development
machines just fine but it is failing on our production servers.

Does anyone have a clue?

Thanks,

G

Nov 18 '05 #3

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

Similar topics

8
17430
by: Glenn A. Harlan | last post by:
Why am I receiving the below error when calling - Path.GetTempFileName() The directory name is invalid. Description: An unhandled exception occurred during the execution of the current web...
1
3239
by: bob | last post by:
I have created a simple Windows service in VB.Net which installs fine using InstallUtil.exe to install it to, for example "c:\test", or "c:\Windows\YellowBanana", but if I install it to "c:\Program...
5
11007
by: David Webb | last post by:
The problem started when the Working Folder for a project was somehow set to the folder of another project. I set the correct working folder in VSS and deleted the .vbproj files that had been...
12
4019
by: Xah Lee | last post by:
Python Doc Problem Example Quote from: http://docs.python.org/lib/module-os.path.html ---------- split( path) Split the pathname path into a pair, (head, tail) where tail is the last...
13
1005
by: Adam | last post by:
Trying to get an asp.net 2.0 app running and am receiving this error. I see a bunch of people with this error on the net, but no solution: Works fine on my local machine, deployed to a server it...
5
8602
by: Sakharam Phapale | last post by:
Hi All, I am using an API function, which takes file path as an input. When file path contains special characters (@,#,$,%,&,^, etc), API function gives an error as "Unable to open input file"....
10
2922
by: wo_shi_big_stomach | last post by:
Newbie to python writing a script to recurse a directory tree and delete the first line of a file if it contains a given string. I get the same error on a Mac running OS X 10.4.8 and FreeBSD 6.1. ...
34
3920
by: Ben Sizer | last post by:
I've installed several different versions of Python across several different versions of MS Windows, and not a single time was the Python directory or the Scripts subdirectory added to the PATH...
2
14070
by: contractsup | last post by:
Environment: $ uname -a AIX <withheld2 5 000100614C00 $ db2level DB21085I Instance "<withheld>" uses "32" bits and DB2 code release "SQL08024" with level identifier "03050106"....
5
10012
by: =?Utf-8?B?SmVmZiBCZWVt?= | last post by:
Before you respond with "just use GetShortPathName" please read the rest. We have an application that places files on a file server using mapped drives as it's path of choice. The reason for...
0
7280
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
7332
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...
1
6991
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
7462
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
5578
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,...
1
5014
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...
0
4673
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...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
382
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...

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.