Problems with UNC

Discussion in 'ASP .Net' started by glbdev@gmail.com, Jan 20, 2008.

  1. Guest

    Hi.

    I am having 2 problems ... both involve using a UNC path.

    The first problem is that I am using an image control and the imageURL
    needs to be dynamically obtained. My code is: Me.imgLogo.ImageUrl = "\
    \myserver\\filedirectory\file.gif". Unfortunately, this hangs and
    does not show the image.

    The second problem is that I want to create a directory on a remote
    machine (if it doesn't exist), and copy a file to it. The file name
    has a UNC such as "\\myserver\remotepath\myfile.txt". This code is:

    Dim DstFileInfo As New FileInfo(sRemotePath)

    If DstFileInfo.Directory.Exists = False Then
    Try
    DstFileInfo.Directory.Create()
    Catch ex As Exception
    Console.WriteLine("Error creating directory: " + sRemotePath)
    Return False
    End Try
    End If

    Dim CopyToPathFileInfo As New IO.FileInfo(sFileNameLocal)
    CopyToPathFileInfo.CopyTo(sRemotePath.ToString.Trim, True)

    This returns no error, it just hangs.

    Does anyone have any info as to why this is happening? The share
    permissions are set on the remote.

    Thanks,
    Steve
     
    , Jan 20, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tor Rest

    Copy using UNC paths

    Tor Rest, Aug 11, 2003, in forum: Perl
    Replies:
    1
    Views:
    3,763
    J├╝rgen Exner
    Aug 12, 2003
  2. Kevin Joseph
    Replies:
    5
    Views:
    4,395
    Joe Smith
    Aug 13, 2004
  3. Paul Riley

    UNC Security permission checking

    Paul Riley, Jul 31, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    407
    Paul Riley
    Jul 31, 2003
  4. Chris Newby
    Replies:
    2
    Views:
    8,603
    JIMCO Software
    Sep 9, 2005
  5. Paul M. Frazier

    Problems Accessing a UNC Share from ASP.NET Pages

    Paul M. Frazier, Jun 7, 2004, in forum: ASP .Net Security
    Replies:
    0
    Views:
    220
    Paul M. Frazier
    Jun 7, 2004
Loading...

Share This Page