Results 1 to 3 of 3

Thread: Noob question

  1. #1

    Thread Starter
    Hyperactive Member Sneeden's Avatar
    Join Date
    Oct 2001
    Location
    Sneedville
    Posts
    258

    Noob question

    I put this subin an webapplication project and it works OK, but in a windowsapplication project it generates an error "an unhandled exception of type system.security.securityexception"


    VB Code:
    1. Private Sub SearchDir(ByVal TargetDir As String)
    2.         Dim Files() As String
    3.         Dim File As String
    4.  
    5.         Files = IO.Directory.GetFiles(TargetDir, "*.*")
    6.         lstFiles.Items.Clear()
    7.         For Each File In Files
    8.             lstFiles.Items.Add(File)
    9.         Next
    10.     End Sub

    Why?

  2. #2

    Thread Starter
    Hyperactive Member Sneeden's Avatar
    Join Date
    Oct 2001
    Location
    Sneedville
    Posts
    258
    It was because I was storing the project on a network drive as where the ASP is saved to c:\inetpub\wwwrooot\

  3. #3
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    You'd have to change the .NET Framework security zones and increase the trust of the place you are trying to connect to.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width