UNC vs Mapped Drive - Mapped drive works but UNC does not



  • 1. DATATABLE problem retrieving the value of a cell
    I have a datatable of values and I am trying to obtain the values of a range of the columns. Imagine I have a table defined with columns headed "A" through to "Z" Now I decide that I want to count up the amounts between columns E to M Note:All the columns are defined as decimal. I have a main datatable defined at dtMain with all the columns and data in it. The code I am using at the moment is: Private Sub cmdCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles cmdCalculate.Click Dim dr As DataRow Dim OrdS As Integer Dim OrdF As Integer 'find the ordinal start and end for the addition OrdS = dtMain.Columns("E").Ordinal OrdF = dtMain.Columns("M").Ordinal For Each dr In dtMain.Rows Debug.WriteLine("----------------------------------------") Dim sumcol As Decimal For i = OrdS To OrdF Debug.WriteLine(dtMain.Columns(i).Caption & " - " & dtMain.Columns(i).ToString()) 'I KNOW THIS IS WRONG 'sumcol =sumcol + [????????????????????????] Next debug.writeline(sumcol) Next End Sub please can anyone advise how I can obtain the contents of the cell in the dtmain table so that I can achieve a calculation. Thanks in advance Terry
  • 2. SizeGrip Location
    I am trying to force my users into using a sizegrip instead of a horizontal or vertical border when resiziing a form. I haven't been able to test when the mouse is over the size grip area. Is it possilbe? -- Thanks for your help.

UNC vs Mapped Drive - Mapped drive works but UNC does not

Postby U2F0eWE » Wed, 26 Jul 2006 03:34:01 GMT

I am trying to load a Html into a HTML Docuemt Object in my client widow. 
Everything works fine if i used a mapped drive. But the application breaks if 
i use the UNC directly. Looks like when the document is accessed through UNC 
it take a while to load it and probably gets timed out.

Does anybody have a clue about this issue. Some said that disabling the 
NORTON ANtI Virus Auto protect will help it. But went in vain.

Similar Threads:

1.Translate drive letter to UNC for mapped drives

Hi, I'm converting a C++ program over to C# (on .Net 2.0), and am not 
sure of the best way to look up the UNC path for mapped drives.

The way the C++ program does this is it iterates through a listing of 
drive letters, then calls WNetGetUniversalName for each to get the UNC. 
  .Net 2.0 seems to have a fairly broad selection of IO handling 
options, but I've not yet found one to handle my problem.

Any pointers?

2.UNC vs MAPPED drives


How do i convert a mapped drive to an UNC path i .Net 2.0 ??
Is it really necessary to use "WNetGetUniversalName" ??


3.UNC vs mapped drive letetrs

I run a small LAN with a remote (PC) file store that automatically
backs up our data every night. With VB6 there was no problem working
with VB projects directly from the central file store. But on loading
.NET I see that there are additional security issues.

I've found mscorcfg.msc and set the relevant folder on the remote
store to Fulltrust and this seems to work OK with .NET. But the one
detail I'd like to get clear in my mind is whether we can continue to
use - for consistency - our previous habit (which some of the other
apps we use actually require) of mapping the remote folder to a drive
letter (Using W2KSP4) . What I observe currently is that .NET allows
access to a project in the remote folder via its UNC name but not via
the mapped drive letter, even thouh these are pointing at exactly the
same folder.

Is there some way of being able to access a 'trusted' remote folder
via a mapped drive letter or is this approach impossible now?


4.Retrieving UNC Path of Mapped Drives on Client Machine

I Need to Retrieve the UNC Path of Mapped Drives on a Client Machine's (NT4 + y2k) on my Network, but I have been unsuccessful so far and I find seem to find a way to do this, any idea anyone

I need to try and finish this toda

Thanks in Advanc

Dean McCarte
Cumbria U

5.Poll All Mapped drives on remote device return Drv Letter and UNC

   I need to Poll remote machines and list the drives they have mapped along 
with the path(UNC) of that mapping.  CAn any one help!!  

So far I got some code that will allow me to Poll my machine not the remote 
one and instead of giving me the UNC it gave me the share name which code 
work but is not Ideal.

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As 
System.EventArgs) Handles Button3.Click
        Dim allDrives() As DriveInfo = DriveInfo.GetDrives()
        Dim d As DriveInfo

        For Each d In allDrives
            Me.lstAllMappedDrives.Items.Add("Drive: " & d.Name)
            Me.lstAllMappedDrives.Items.Add("  File type:" & d.DriveType)
            If d.IsReady = True Then
                Me.lstAllMappedDrives.Items.Add("  Volume label: " & 
                Me.lstAllMappedDrives.Items.Add("  File system: " & 
            End If
    End Sub
---------------------code End ------------------

Thank you in advance

6. UNC From Mapped Drive sample from VB6

7. Getting the UNC sharename for a mapped drive letter

8. Vista mapped drive (home drive) not showing

Return to dotnet-framework


Who is online

Users browsing this forum: No registered users and 65 guest