Can't Create or Save File to Network Share in Visual Studio - visual-studio

I'm not certain when this problem started occuring, but it was approximately a few weeks ago when I upgraded from Visual Studio 2008 to 2010. I am on Windows XP Professional. The share is on a server running Windows Server 2003. I have a solution which contains a web site (accessed via UNC path, network share) and some class projects that reside on my local workstation. When I open a file from the website, and try to alter and save the file, I get the following error:
" Cannot access this file. Check security privileges over the network drive."
I've checked privileges on the root folder and I do indeed have full control. Could anyone give me any insight as to what I could be missing?

Are you running Windows Vista or Windows 7 with User Account Control (UAC) enabled? If so, Visual Studio 2010 requires administrator permissions to do certain tasks, including IIS management and network share saving.
Try opening Visual Studio 2010 with the Run as Administrator command. Hope that solves your problem.

Turns out a sysadmin removed all permissions and user profiles from a chunk of servers and forgot to inform me. Thanks for the insight, all.

Related

IIS Express Does Not Recognize Running VS2022 as Admin

I had a computer with VS2019 Community installed. I got a new computer, copied my documents over, and installed VS2022 Community. I am launching VS as admin. In the upper-right corner of VS it says "Admin". Also, when launching VS I get the User Account Control prompt associated with launching as an admin. Yet when I build my solution and launch IIS Express, I get a message "...You do not have permission to access the IIS configuration file. Opening and creating web sites on IIS requires running Visual Studio under an Administrator account". Does anyone know what else to do or have a suggestion of what else to look at? Any help would be appreciated.
Seems the message is a red herring. I incorrectly assumed that IIS Express was installed with VS. The solution was to install IIS Express.

Running Visual Studio with Elevated Privileges for Azure : any way to avoid the side effects?

I'm working on some Azure web apps, and in order to debug I'm running VS 2010 as Administrator (I normally right click the shortcut and run-as-admin, I'm aware that there are properties I can change or use Ctrl-Shift).
Windows Azure Tools for Microsoft Visual Studio - The Windows Azure compute emulator must be run elevated. Please restart VS in elevated administrator mode in order to run the project"
If I do this, Azure simulator works OK, but I get two other side effects.
1) I can't drag and drop onto the solution explorer. This is a pain. (Ctrl C/V works but I can't drop whole files into the solution explorer)
2) I develop inside of a DropBox file structure. If I've developed on my desktop, and grab my laptop, projects in my Azure solution that are created within, and shared with, other non-azure projects fail to load. Edit: If I develop outside of dropbox, zip a copy into dropbox, unzip that on the new machine, its all fine.
3) I get "Could not load file or assembly. Access is denied" for various DLL's used by the project - I can fix this for individual DLL's by giving permissions to Network Service but I get the error for resource files too and the same trick doesn't seem to work.
This interworking between machines works fine without elevated privileges - I've been doing it for 2 years on about 20 projects without issue.
So is there a way of running just the compute emulator elevated, or some other way of avoiding these side effects?
OS Version Win 7 Pro SP1 X64
Azure Tools for MSVS2010 Platform v1.4 (11/04/2011)
Windows Azure SDK (11/04/2011)
Windows Azure SDK 1.4.1 Refresh (11/04/2011)
Windows Azure AppFabric SDK V1.0 (29/06/2011)
Consistent over all machines
EDIT: Having already given Network Service user all permissions to the entire folder structure to the project, I get the following error. Prior to doing that, the error was similar, but was for access to the DLL's in the project's bin folder.
Parser Error Message: Access to the path 'C:\Users\ Beko2011Azure\Website\App_GlobalResources\EditorLocalization.uk-UA.resx' is denied.
Source Error: [No relevant source lines]
Source File: /App_GlobalResources/EditorLocalization.uk-UA.resx Line: 1
Version Information: Microsoft .NET Framework Version:4.0.30319;
As far as #1 goes, you can still CTRL+C and CTRL+V to the solution explorer. For everything else you described, the elevated priviliges are probably not the problem. This has especially nothing to do with Azure tools. I have them installed on several machines, and VS works elevated (I always use elevated mode because it's impossible to debug in IIS otherwise). I never had any problems with it.
The DLL/file access denied might be Dropbox's fault. Have you succesfully used this type of file structure in any other projects?
I have no idea what you meant by #2. What fails to load? Azure projects? And do you have the SDK installed on all machines? Same version? Did you mark a web site as hosted in IIS - this also prevents loading of projects.
Also, please update your post with: Operating system version, Azure SDK version...
Update: looking at your error message I can't help but wonder the problem is caused by Dropbox locking files that are needed, and these files then not being accessible by IIS when required. Could you try killing Dropbox service and checking to see if the application performs OK at that point?
As of Azure SDK 2.1 you no longer need to run the Emulator with Elevated privileges. See my answer here

Unable to run Visual Studio 2008 using Administrator account

I'm not able to run visual studio 2008 by choosing 'Run as a Administrator' it says 'Application Cannot start'. Any solutions please.
OS : Windows 7 64 bit
IIS 7.5
I've just come across a similar problem myself, where an external tool won't work when VS is run as admin. On my case, the tool tries to access a mapped network folder. Turns out that the mapping applies only for the non-admin login token. Does you VS happen to access a mapped network folder?
See: Programs may be unable to access some network locations after you turn on User Account Control in Windows Vista or in Windows 7. Link includes a possible solution.
BTW, the problem here is probably not VS-specific. Since it seems to regard Windows permissions, it should probably have been asked on ServerFault.

Visual Studio USE LOCAL IIS WEB SERVER issue with IIS 7.5

My Visual Studio 2010 issues following error when I try to map application to use local IIS:
A larger image can be viewed here:
http://img717.imageshack.us/img717/8323/errorvi.jpg
I run VS2010 as administrator and I have installed (I guess) all necessary services and IIS features.
What could be the reason?
Updated:
Having looked at the error message again, when you say you run as administrator, are you running as an account that a member of the Administrators group or the real Administrator?
If it's an account that's a member of the administrators group then you still need to right click and "Run As Administrator".
Ok. Every time when I reinstalled IIS it suddenly started to work. Then, next day issue reoccured. There was an issue with domain group policy, it turned out that some services were getting disabled with PC reset.

VS2008, IIS7 web project, non-admin. When?

What needs to happen before we can open Web Application Projects hosted in IIS7 with Visual Studio 2008 without running as Administrator? Are we talking about waiting for the next version of Visual Studio? Are there any existing workarounds?
I think it's implied by the above, but this pertains to Vista.
Thanks.
Never is a bad option - pretty much all other development I can do as a non-admin. Its not as if the code under IIS requires admin rights either.
I'd like to see an IISAdmin group which grants a developer's user account permission to manage IIS without granting full adminstrator privileges to the entire PC.
My guess is never. I think admin rights will always be needed to change websites and virtual directories in IIS.

Resources