So here is the setup. This is for Cyber Essentials (and Cyber Essentials plus).
We have a product that requires local admin access to run. We need to log into the PC as a non admin. So first of all I have done the devenv.exe trick for compatibility to mark it as 'run as admin'. So when we run Visual Studio it will now prompt to enter login details of an admin user. I enter the details of my 2nd user who is a local admin on the machine.
Visual Studio 2022 starts and I get the admin badge in the corner. Our product runs (it's running under the other user) successfully, but I have a problem with areas of the product that launch in a web browser.
First of all, any process.start(url) style command will run (without any errors or events in event viewer) except the web browser just doesn't appear.
Also, manually selecting a web project in the solution and running it will run IIS express except again, it will not open the web browser (there is a workaround to this in that I can open the browser myself and grab the localhost:port address from the IIS Express system tray icon).
But basically running in this scenario, no projects can open a browser. Anyone else come across this and have a solution? Thank you.
Related
I've been running Visual Studio as admin for a few years now. As of today, my user account no longer has admin rights. Rather, I have a second account that has elevated privileges. The problem I'm running into is that if I run the application now with my second account, all my TFS mapping, applications settings, history are all tied to my original account. I have web projects that won't load if I'm not admin, and show as locked by another user if I log in with my Admin account.
So, rather than taking the obvious, and lengthy, route of checking in all files and basically getting rid of all TFS mappings from my original account and then maintaining two user accounts, I'm hoping for a way to develop without having to use my admin account.
Is this possible? Can I develop website (currently the won't load) if I run without admin rights?
On the start menu Right Click on your visual studio icon. In the bottom Application Bar that appears, click "Run as Administrator".
Access is denied when saving changes to file in a Web Site on Windows Server 2012 running under IIS using Visual Studio, however I can save to the Desktop of the server and then copy to the same location in the Web Site and it works fine other then prompting me saying I need administrative permissions (which I have). Click ok and it copies fine.
How do I make it so that Visual Studio running on the server can save changes to files?
Open visual studio as Administrator with right click -> run as administrator. You may have admin rights, but it should be ran with the system's admin account to be able to save the changes you make.
Let me know if it was such an issue.
I'm having trouble connecting to the hosted Team Foundation Service using Visual Studio 2012 RC.
Upon my first connect, a window was opened prompting me for my username and password, however I was added to TFS with a different Live ID. I've re-registered a new Live ID and now I can't get access to TFS. When I try to do so, I get this error:
TF31003
If you log out from All Live accounts in your Browser's and then try logging into TFS again you should be prompted for the credentials and you can login with the account that has access to TFS Preview.
I got the tf31003 error while trying to connect to a hosted TFS at https://mycompanyname.visualstudio.com/
I could access the site using my Live Id through Firefox but when trying to connect using VS 2010 I was getting that error.
The issue with my case was that VS2010 was trying to login using Internet Explorer which I was signed in under a different account. To solve this I opened Internet Explorer and logout from Hotmail/Live and went to the about URL and connected to the TFS instance, which connected successfully.
After that I went back to VS 2010 and tried to connect to the server again, this time I was shown the Login window where I was able to enter my login details. Once done my server was successfully added to the 'Team Server Foundation list' and was able to get the list of all my projects.
I had the same problem, except I am running VS2012 Update 2. This is overboard, but this is a thorough list of everything I did that eventually fixed it.
Ensured Visual Studio was not running
I opened Internet Explorer, pressed CTRL+SHFT+DEL, selected everything and clicked "Delete"
I opened Fiddler and navigated to "Tools > Clear WinINET Cache" and "Tools > Clear WinINET Cookies"
I opened the windows Credential Manager and removed all entries (including all Web Credentials, Windows Credentials, and Generic Credentials)
I disconnected my Microsofot account from my Windows account
Opened Visual Studio and connected to TFS, and it finally prompted me to login
Again, this is overboard, and not very surgical, but as I was in a hurry, so I decided to take the shotgun run, and it worked.
I had the same issue, the simplest solution I got was to delete just three cookies.
I found this recommendation in other post. It worked for me.
cookie:*#login.live.com/
cookie:*#visualstudio.com/
cookie:*#tfs.app.visualstudio.com/
To see the cookie files directly so to "Internet Options -> In the Browsing History Section Click "Settings" -> Click "View Files" -> They are all text files.
I received this same error (TF31003 / TF30063) when setting up a new TFS Build Server on Windows Server 2012 because Active Scripting was not enabled in IE.
In order to login - you must enable active scripting to see the login prompt below...
I actually discovered this after installing Visual Studio where the popup dialog specifically informs you of this required setting. Hopefully this will save sometime hours of lost time...
Here is my environment
Windows7, Visual Studio 2010, MVC2.0 and NET4
My default web site is configured to use ASP.NET v4.0 application pool.
Here is an easy way to reproduce my problem
Create a new MVC2 application
Open the properties Window
Go to the Web tab
Check "Use IIS Local Web Server"
Click on "Create Virtual Directory" button
I get this error message
To access local IIS Web Sites, you must install the following IIS components:
In addition, you must run visual Studio in the context of an Administrator account
For more information, press F1
Notice the blank line after "...the following IIS components:"
I am running VS2010 as administrator
Pressing F1 does not bring any help
I checked my Windows eventlog files and found that my metabase was corrupted
(I thought we get rid of this in IIS7 but it looks like it is still here...)
I used this Microsoft article to restore it from an old version and now everything is working
Hope this can help somebody else
Have you tried running VS as administrator?
Right click your VS shortcut and select "Run as Administrator"
I had the same error message, in my case with VS2008, Windows 7 + IIS7, when trying to add an existing web site to a solution. I think this is one of those error messages where what it states can be a big red herring, i.e. it doesn't necessarily have anything to do with running as an administrator or not having components installed.
In my case, the web site had an HTTP binding in which the hostname was set to "localhost". Once I cleared that, it worked fine. Don't ask me why I put "localhost" in there, it just seemed to make sense at the time.
My internet hunting also turned up this brief entry, which did not work for me.
I am trying to open a project in VS 2008 and my domain account it in the administrator group. I get this message:
"Unable to open the Web site
'http://locahost'. To access Web
sites on thie local IIS Web server,
you must run Visual Studio under an
Administrator account in order to have
access to the IIS metabase.
Alternatively, instll FrontPage Server
Extensions (FPSE) and then grant FPSE
access to users who will run Visual
Studio"
Any body know what I need to do to fix this problem. I have tried modifying the shortcut to run as administrator but shouldn't have to do that if I am an admin on my machine.
I uninstalled IIS and then reinstalled using only the bear minimums and it worked.
What worked for me:
- Windows 7 IIS Manager
- Delete other websites in the list under 'Sites'
- Right click the site
- Edit Bindings
- The 'host name' property was empty. Once I typed the name of the website there, I was able to load my site through Visual Studio 2008.
Open Control Panel-> Programs and Features->Turn Windows features on or off. Under the list of features open Internet Information Services tree and then open Web Management Tools and then select IIS 6 Management Compatibility checkbox. Click OK button and install the selected feature of IIS.
link: http://geekswithblogs.net/technetbytes/archive/2011/10/11/147255.aspx
Right click over the shortcut, and in Properties in the Compatibility tab, select Run As Administrator.
Also confirm IIS is installed. It is not installed by default on Vista. You have to go and Add/Remove Windows Components.
See here.
You might not have IIS setup properly on the local machine, I would verify your IIS configuration before continuing. You can always create a website or webapplication that runs through cassini instead and provide a folder path vs a IIS path.
P.S. Even if you are a machine administrator, with vista if the access restrictions are on you must still always specify that you wish to run the application under an administrator context.