Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > UNC Path Problem

Reply
Thread Tools

UNC Path Problem

 
 
G. Dean Blake
Guest
Posts: n/a
 
      07-27-2004
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


 
Reply With Quote
 
 
 
 
Bobby Ryzhy
Guest
Posts: n/a
 
      07-27-2004
On Tue, 27 Jul 2004 10:04:38 -0700, "G. Dean Blake" <> 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
 
Reply With Quote
 
 
 
 
Hardy Wang
Guest
Posts: n/a
 
      07-29-2004
Try to impersonate at run time.

--
WWW: http://hardywang.1accesshost.com
ICQ: 3359839
yours Hardy
"G. Dean Blake" <> wrote in message
news:%23IjZKv$...
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with FolderExists and UNC Path in ASP Page Claudio ASP General 0 07-23-2008 03:16 PM
Problem using a UNC Path within a COM component in asp.net Bill Tinker ASP .Net 1 06-20-2008 10:59 AM
Problem using a UNC Path within a COM component in asp.net Bill Tinker ASP .Net Security 0 06-19-2008 11:05 AM
Perl - Parse UNC Path in a string variable Kevin Joseph Perl 5 08-13-2004 11:56 AM
Retrieving UNC Path of Mapped Drives on Client Machine =?Utf-8?B?RGVhbiBNY0NhcnRlbg==?= ASP .Net 7 05-20-2004 02:41 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57