Visual Studio 2013. You do not have sufficient privilege to access IIS web sites on your machine

[Origin]: https://stackoverflow.com/questions/20984624/visual-studio-2013-you-do-not-have-sufficient-privilege-to-access-iis-web-sites

I just installed VS2013 and turned on IIS 7 on my Windows 7 Ultimate x64 machine. When trying to open a solution I get:

Creation of the virtual directory localhost:xxxxx failed with the error: Unable to access the IIS metabase. You do not have sufficient privilege to access IIS web sites on your machine.

I tried running Visual Studio 2013 as Administrator (right click, run as administrator), still the same error. I also did aspnet_regiis -i and it didn’t help either.

shareimprove this question

Go to C:\Windows\System32\inetsrv. Click config folder. You will get a popup – “You don’t have access to this folder – Click continue to permanently get access to this folder”. Perform same for Export folder which is inside config folder. You should be able to open the solution and the web application project will be deployed on IIS.

enter image description here

shareimprove this answer


Solution to “Unable to Launch the IIS Express Web Server”

[Origin]: http://sibeeshpassion.com/solution-to-unable-to-launch-the-iis-express-web-server/

This article will help you to overcome the error Unable to Launch the IIS Express Web Server. Today I encountered the issue “Unable to launch the IIS Express Web Server” while I was running my Visual Studio 2012. So I thought of sharing how to resolve that issue. I hope it will help someone.

Unable to Launch the IIS Express Web Server

Background

In my team we have 5 to 10 members. Since we wanted to do a build for our current application, I used “Get the Latest files from the server”. (We are using TFS.) Then when I run my application I was getting this error.

The cause of this error is, someone has checked in the solution file with his port number (the port number he was using). When I took the latest, it was set in my solution file also. We must take the latest solution file only when it is required. So here I will share the remedy for the preceding issue.

Procedure to solve this issue

Step 1

Right-click on your solution and select Properties as shown in the following figure.

 

Unable to Launch the IIS Express Web Server

 

Step 2

Select “Web” from the left menu.

 

Unable to Launch the IIS Express Web Server

 

Step 3

Under “Use local IIS server” change the port number from http://localhost:58030/ to another one.

 

Unable to Launch the IIS Express Web Server

 

Step 4

Here I have changed http://localhost:58030/ to http://localhost:58031/ .

Bingo! We have done it.

 

Unable to Launch the IIS Express Web Server

 

Step 5

Now please run again your application. The issue will be solved.

Conclusion

Did I miss anything that you may think which is needed? Have you ever faced this issue? Does this solution solve your issue?I hope you liked this article. Please share me your valuable suggestions and feedback.

Your turn. What do you think?

A blog isn’t a blog without comments, but do try to stay on topic. If you have a question unrelated to this post, you’re better off posting it on C# Corner, Code Project, Stack Overflow, Asp.Net Forum instead of commenting here. Tweet or email me a link to your question there and I’ll definitely try to help if I am able to.

Kindest Regards
Sibeesh Venu

No ASP.NET MVC 5 Web Application Template on VS 2012?

[Origin]: http://stackoverflow.com/questions/20607648/no-asp-net-mvc-5-web-application-template-on-vs-2012

After creating a new project using ASP.NET MVC 5 Empty Project, you can right click on the project, then click Add.. > New Scaffolded Item..., select MVC on the left, then MVC 5 Dependencies and choose Full dependencies from the prompt.

This will add a default layout (Views\Shared\_Layout.cshtml), Content folder, Scripts folder with bootstrap, jquery, modernizr, etc, and other things the Web Application template creates.

If you get the error “CS0103: The name ‘Styles’ does not exist in the current context” just add <add namespace="System.Web.Optimization"/> under <namespaces> in Views/web.config

shareedit

Where can I find WcfTestClient.exe (part of Visual Studio)

[Origin]: http://stackoverflow.com/questions/9915733/where-can-i-find-wcftestclient-exe-part-of-visual-studio

C:\Program Files (x86)\Microsoft Visual Studio (Your Version Here)\Common7\IDE

shareedit

In addition one can add this to Visual Studio Tools menu.

Tools => External Tools.

And then in the Command box enter the path for WcfTestClient.exe.

In my case

C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\WcfTestClient.exe

enter image description here

shareedit

How to stop console from closing on exit? [duplicate]

[Origin]: http://stackoverflow.com/questions/4118073/how-to-stop-console-from-closing-on-exit

This question already has an answer here:

I’m using Visual Studio 2010 and Windows 7 x64

The command prompt closes after exit, even though I used “Start without debug”. Is there a setting somewhere that I can use?

shareedit

You can simply press Ctrl+F5 instead of F5 to run the built code. Then it will prompt you to press any key to continue. Or you can use this line -> system("pause"); at the end of the code to make it wait until you press any key.

However, if you use the above line, system("pause"); and press Ctrl+F5 to run, it will prompt you twice!

shareedit

Breakpoint not hit when remote debugging on Internet for ASP.NET

[Origin]: http://stackoverflow.com/questions/385826/breakpoint-not-hit-when-remote-debugging-on-internet-for-asp-net

I have sit up remote debugging on a Window 2003 server accessed through the Internet. I have VS 2008 SP1 installed on my XP dev box.

I launched the site on the remote server and attached to all the w3wp.exe processes on the remote server. I noticed that the .dll did not load the symbols file. When I try to load the corresponding .pdb file from my local machine, it says file does not match. I have “Require source files to exactly match the original version” unchecked. The assembly on the remote server is the same as the one on my dev box. The site and .dll was copied from dev boc to remote server and code hasn’t changed since. So I know .dll and .pdb files should match or at least I need to force the matching.

Questions:

  1. How do I get the .pdb file to load? I know breakpoints won’t trigger unless symbols file is loaded. I noticed that the .pdb file does not exist in the “Temporary ASP.NET Files” folder on the remote server. The .dll does.
  2. What’s the proper sequence to start debugging remotely inside VS? (Remote set up is done and I can see remote processes). In VS, I have start page as the url of the remote site. I start without debugging and then attach to w3wp.exe(s) on the remote. Is this all?
shareedit

Are you running a Web Site or a Web Application (is it a compiled project, that you deploy the DLL for, or a collection of aspx and aspx.cs files that you deploy)?

If it’s a Web Application, did you deploy a release build, or a debug build? You won’t be able to hit breakpoints when “debugging” a release build, as the code is fairly heavily optimised.

Have you got “debug=true” set in the web.config compilation section? If not, again, debugging is going to be difficult.

Finally, the steps I use when remote debugging are:

  1. Deploy latest debug build of files
  2. Request page on remote server to start/restart application
  3. Ensure that the VS Remote Debugging Monitor is up and running on the remote server
  4. In VS, go to Tools (or Debug) | Attach to Process…, ensure that the remote server is selected in the Qualifier, and select w3wp.exe for the correct app-pool, etc.
  5. Request page that will fire break point.
  6. Debug!

If the breakpoints are hollow (thin red circles rather than filled disks), I’ll often check the Stack window in VS to see what has and hasn’t been loaded.

shareedit

IIS process w3wp.exe is not showing in Task manager processes?

[Origin]: http://stackoverflow.com/questions/24217446/iis-process-w3wp-exe-is-not-showing-in-task-manager-processes

I am having a very weird issue that I am unable to see w3wp.exe anywhere in my system. I am learning ASP.NET using tutorials. In my computer w3wp.exe process is not showing in the taskmanager. Please help, I got frustrated by searching it throughout the whole day. I have iis7.5installed!

shareedit

Try refreshing or showing all processes – I believe it’s a checkbox option.

Then, refresh your browser and go for the attach to process option.

shareedit

The w3wp.exe will not appear until the first request has entered the pipeline. So if you browse to your site and then open your task manager, you will see the w3wp.exe.

shareedit