Search code examples
vb.netfilestreamioexceptionsave-image

A required privilege is not held by the client. error in vb project


my program wrote in vb.net. in run time,give me "IO Exception was caught"

enter image description here

please help me.


Solution

  • Probably the file that you are trying to create with the FileStream already exists. Use FileMode.OpenOrCreate to solve your problem or delete the file first.

    FileStream creation.