IIS Express Access denied
Solutions:
- Put a specific location for
google_com.txt
file. likeC:\google_com.txt
. Actually it is not allowing to create the file in default location(inside program files) as it might not have the proper privilege. - If you want to create the file in default location(inside program files) run Visual Studio as Administrator.(R-Click-> Run as Administrator).
Run Visual Studio as Administrator
You can't write to the Program Files folders on Windows Vista or later unless you're running elevated/as an administrator.
You should be writing to the application's App_Data folder if you need to write anywhere. Look into using Server.MapPath().