Exception Details: System.ComponentModel.Win32Exception: Access is denied

Programming, error messages and sample code
There is not enough permissions to run your asp.net application. You can go to control panel to setup "asp.net read/write" to the directory where you need to write data.