Visual Studio web project has IIS configuration warnings - visual-studio

One of the web application projects in my visual studio solution has a blue exclamation mark icon on it and the tool tip shows The Web project <Project.Name.Here> has IIS configuration warnings
I can't see anything in the project Properties pages, or in the web.config file. It started yesterday, and I assumed restrating VS and reloading the project may get rid of the warning, but it has not.
What is this and how do I go about resolving this issue?
Google has not been helpful this morning!

Try right clicking the solution in the Solution Explorer, the option Resolve Errors should be available.
Selecting this should show you the message behind the icon you're seeing on the project. For me, this was:
ASP.NET 4.0 has not been registered on the Web server. You need to manually configure your Web server for ASP.NET 4.0 in order for your site to run correctly.
If this is the message you're receiving, this MS blog post may help you fix it.
Update
Note that once you've selected this option, the IDE assumes you've resolved the errors and removes the icon and menu option (!). So make sure you read it or restart VS to see it again.

Related

PUBLISH button is not appearing on the Context Menu

I have been trying to deploy a web application is a .Net Framework
When I right-click on the project Solution, PUBLISH is nowhere to be found I tried Visual Studio 2017 and re-installed, checked and updated the workloads.
I check the checkbox: One-click publishing.
I gave up, I uninstalled it and installed Visual Studio 2019 same thing PUBLISH is not appearing anywhere.
I reset settings on import-export. I look everywhere on the NuGet package manager.
I am out of ideas.
Any hint would be appreciated. I will keep on digging. If ever I find a solution I will create a video because I spent several hours and my client is waiting for this application to be deployed on Godaddy Plesk. It is the first time I do this, I usually install scripts on LAMP Cpanel really easy.
This has been a nightmare for me, everywhere I see seems easy, right-click, click on Publish and create a profile or do Ftp or system files, azure.
But I can not get that blip Button PUBLISH.
Sorry, I am ranting.
You don't right click the solution itself to publish, you right click the web layer of your project and you would see the publish button
here
Ok I do not know if all the re-install and all did something but #fatihyildizhan suggested to click on the web app logo below the solution and it did the trick!

the breakpoint will not currently be hit at Vs 2015

In my WCF project at Vs 2015 when I add break point for debugging I got this message:
the breakpoint will not currently be hit no symbols have been loaded for this document.
I do googleing and none of other's answer worked for me !!!
for example: Right click the Solution in solution explorer, click "clean solution", this deletes all the compiled and temporary files associated with a solution.
and this and this
any suggestion?
thank you
If your solution is having shared projects with other solutions which is also open then close the other solution. Then clean the solution and restart Visual Studio. Then do rebuild (rather than build, though it is cleaned).
Hope this will fix the issue.
I finally got what is my problem. I have a big mistake. I decide write that , where was my problem because maybe it is helpful for other developer.
I fresh installed windows and after that I installed VS 2015. because I did not install IIS , Vs used of IIS Express. this is was my problem. for solve that, I installed IIS and then in properties of my project and Web section and server part I select Local IIS and then Create virtual directory. now my problem gone.
Right Click the Project and click properties.
Under Build the Active Configuration should be set to Debug.
While running the code with F5 or Play button.
Make sure Debug is selected instead of Release in the drop down next to Play button.
I put myself in a stupid situation.
I remember setting this, and it was a bad idea...
In the Attach to Process dialog, I had the Attach to: set to the older Managed setting 3.5, 3.0, 2.0.
when I should have been using Managed (4.6, 4.5, 4.0). I'm actually using 4.7, but this works for me.
Be sure to match your target framework!

Visual Studio Debugging is stuck at "Attaching to the web server"

When I run my Web API application I get the following window:
It just stays like that indefinantly, until I hit cancel.
When I do hit cancel, this error message is shown:
I have tried rebooting, and running iisreset /restart but it does not fix it.
Any ideas what I can do to get my debugger working again?
NOTE: My Web API 2 project's Servers setting is set to Local IIS. My service is hosted by IIS and when I am not debugging, it works fine.
A possible fix:
Check the "Enable Just My Code" in Tools->Options->Debug
I just did a reset for all the settings for VS and it worked again.
Tools => Import and Export Settings => Reset All Settings
good luck!
I had this issue for Visual Studio 2017 and like with the previous post I had Debugging option "Enable .NET Framework source stepping" ticked. Un-ticking fixed the issue.
So as I commented before I had this same issue, but I now figured out the cause and have a solution.
I just got a new machine last week (this issue was actually one of the reasons why) and after a while I had the same issues, not being able to debug my projects. Luckily because I was installing all the updates one by one I was able to pin-point when it started happening.
It seems the latest update for the "Microsoft ASP.NET and Web Tools" extension breaks something.
Sadly, uninstalling or reverting the Web Tools extension is not easy: Remove this extension by going to the Windows control panel and modifying your Visual Studio installation. I had to remove Visual Studio completely and reinstall it (repair didn't do the trick).
You can update and install all your extensions as you wish, just make sure that you don't update the Web Tools extension
I tested this on my old machine and it did the trick there as well.
I've also created an Issue on GitHub as I won't be updating the extension until this is fixed, if anybody has additional information please add it to the Issue.
In Visual Studio 2015, go to Tools -> Options -> Debugging and deselect "Enable .NET Framework source stepping". This may relate to an issue with loading symbols, so if you want to keep the ability to debug .NET Framework source, then it may help to search the web for how to clear the symbol cache, or preload it, or set your symbol server, and so on.
In Visual Studio 2017, I just restarted my machine and ran the solution, no other windows opened not even a browser, although visual studio took a long time to open (30+ projects in a solution) the problem did not reoccur.
I had the same issue in VS 2017 and un-checking 'Native code' did the trick. Not sure why it was checked.
In my case I set Debugging ->Symbols -> To "Load Only Specified Modules" to include the symbols for, in my case a devops symbols feed for some internal NuGet packages
Options>Debugging>Symbols>Load Only Specified Modules
By checking the option "Always load symbols where located next to modules" the setting won't mess with the regular/classic debugging in VS for your own code
This way the Symbols are still loading where needed and Visual Studio is not trying to load debugging information for all the IIS .net dlls that were loaded by w3wp
Alternatively it can also be configured to not load symbols for microsoft.*.dll and it will also work.
Didn't see this in the current answers, so thought I'd give my 2 cents in 2022:
What worked for me:
Make sure to check that your IIS application pool hasn't been stopped (and restart it if it is), and then if that's not the case, restart your IIS server.
If you don't where those settings are, open our Internet Information Services (IIS) Manager, Application Pools are in the left-hand column, and restart/start/stop your server is in the right column.

Unable to start debugging -visual studio 2012

I have a solution where i have 8/9 projects.
everything was working good and suddenly, I started to get an error when I start to debug. and it says
Unable to start debugging.
If I close visual studio and run it again, it works in the first try.
and after that it stops working.
In the configuration manager it is set to "Any CPU".
I tried many thing with no luck. Is there any help??
this is how the error looks like..
I got similar error:
"Unable to start debugging. Check your debugger settings by opening
project properties and navigation to 'Configuration properties --> Debugging"
I have solved it by setting :
Properties--> Debugging --> Working Directory
to $(ProjectDir)
As it's an MVC web application, there's a couple of things to check. Firstly, are you sure the web project is set as your startup (this catches me and a couple of others in my office out from time to time)?
Secondly, where are you hosting the project? Are you using Cassini, or are you hosting it in IIS while you debug? If so, check IIS and make sure that the site is started, there's no issues with the AppPool, etc.
Finally, one way to try is to actually press Ctrl+F5 to run without the debugger attached, I often find that IE will then actually display an error that's causing the issue.

"Bogus" Web project requires missing web component message for razor

Using Visual Studio 2010, MVC 3 (release version) I'm getting this error when opening a specific project which was a traditional web forms project to which I've added MVC:
"The Web project '' requires missing web components to run with Visual Studio. Would you like to download and install the using the Web Platform Installer now?
ASP.NET Web pages with Razor syntax."
I have MVC installed and fully running. Other pure MVC and another mixed Web Forms/MVC project open without any issue.
Clicking "Yes" appears to go through downloading and installing, but the error remains.
Clicking "No" opens the project, where I have intellisense and syntax highlighting for Razor, all my MVC context items (Add View, Add Controller, etc.). In short, everything appears to be working just fine except for what appears to be a bogus error message.
I've done a file compare of the sln, csproj and web.config files and added everything that appears relevant. Prior to doing that I was missing some entries in ProjectTypeGuids the addition of which got the MVC context menus and Razor intellisense working. I tried resetting the ProjectGuid but I still get the error.
I have also previously gone through uninstalling MVC3, MVC2, ASP.NET Web Pages, repairing Visual Studio, installing MVC 3 from the stand-alone installer, and probably a couple more things. I have not yet tried a full system reinstall. I am working from a relatively clean Windows 7 installation. It was a fresh setup about 2 weeks ago and only VS 2010 has been installed (no older versions or betas).
I'm out of ideas at this point. Anyone got any suggestions? I'm a bit confused since this is project-specific, yet the error message indicates that the problem is with Visual Studio.
Update: it gets a little more interesting. Another developer was able to open the same project on his machine without any errors or warnings. So it's something specific to this project on my workstation. At this point I'm willing to write it off as some obscure edge-case bug.
Update 2: And now after rebooting for a system update it's working on my workstation. Definitely some sort of edge-case, and definitely not something I can reproduce.
You can see from the updates, that the problem has gone away after a system-update prompted reboot. So if anyone else has ended up here with a similar problem and you've gone through all the other possibilities, try rebooting.

Resources