Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 85435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T22:05:20+00:00 2026-05-10T22:05:20+00:00

I have written a C# Windows Forms application to merge the files and folders

  • 0

I have written a C# Windows Forms application to merge the files and folders from a remote folder on one machine (‘source’ folder is a mapped drive – ‘Z:\folder’) with another remote folder on a different machine (‘destination’ folder is a UNC path to a shared folder – ‘\\computername\sharedfolder’). I have Full permissions to both folders. When I run the program on my local machine, it works fine, but when I try to run it from from within the source folder it fails with a security exception.

The failure occurs when calling the DirectoryInfo constructor for the destination folder (i.e., DirectoryInfo(@’\\computername\sharedfolder’). I assume the problem is because I am running the program from a mapped drive. Any workarounds?


The specific exception is: Request for the permission of type ‘System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’ failed.


UPDATE

okay, I got my application into Visual Studio 2008 (it was previously coded in 2005), targeted the .NET 3.5 framework, compiled and tried again.

I got the exact same error.


UPDATE – RESOLUTION

I tried it with .NET 3.5, and it didn’t work, then I noticed that you said 3.5 SP1. The service pack is definately needed.

Problem solved. Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T22:05:20+00:00Added an answer on May 10, 2026 at 10:05 pm

    .NET 3.5 SP1 allows running applications off a network share. Previous versions did not allow it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Windows Forms application written in C# and one of the forms
I have written a C# Windows Forms application, not a service (it is only
I have written a small .net Windows Forms application. And now I decided to
I have written a Windows Forms application and now I want to write some
I have a Windows forms application written in VB.NET where I host multiple WebBrowser
This is about a .NET Windows Forms application written in C#. I have a
I have written a Windows Forms application in C#, .NET framework 2.0, that uses
I have a Windows Forms application written in C#. I have to make my
I also have a desktop application written in Windows Forms that is a middling
I have a windows forms application written in VS2010 with C# and get the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.