dotnet / dotnet/wpf

Prevented from opening visual studio because of inability to write to folder WPF

Open
#2,698 7 comments 1 reaction 0 assignees View on GitHub
Bug
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

Copied from VSO ID: 1068111
A few days ago I was attempting to build/deploy a web site to a subfolder of C:\inetpub\wwwroot. After using Internet Information Services (IIS) Manager to create the folder, I tried using Visual Studio (2019) to build the web site. My 1st attempt failed, and I was instructed - I believe by a Visual Studio diagnostic - that I would have to run Visual Studio in Administrative mode. I tried again after restarting Visual Studio in Administrative Mode, and the Build was successful. But, from then on I was unable to reopen Visual Studio without Administrative Mode: the diagnostic was displayed in an ordinary popup box with an OK button, and with the text “Cannot write to folder C:\user\sncole\AppData\Local\Temp\WPF. Access is denied”.
(It is possible that I caused this error when I tried to reopen Visual Studio before closing it while it was in Administrative Mode.)
I used Google Search extensively to try to find some other user with a similar experience; no luck. Finally - a day later - I stumbled on a work-around. I tried to open C:\user\sncole\AppData\Local\Temp\WPF with Windows Explorer; Windows Explorer similarly informed me that access was denied, but it asked me whether I wanted to override the access denial. I said “yes”, and I was allowed to view the contents of C:\user\sncole\AppData\Local\Temp\WPF. Since then I no longer need Administrative mode to open Visual Studio.

The issue here is that a WPF folder is getting created in the temp directly with wrong ACLs.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.