Visual Studio 2013 launches the wrong MVC Application - visual-studio-2013

This seems like a typical Microsoft bug. I have a project that when I click launch despite the fact that it's set as the default project is launches a skeleton MVC app as opposed to the MVC app that I'm currently working on.
To fix the problem I have to close down Visual Studio completely and relaunch my solution. I press f5 or just run the app and it works.
What I find interesting is this mysterious skeleton app which seems to be ASP.NET temporary files is the same port as my project. This happens multiple times a day while developing this particular app on the particular port. Does anybody know why Visual Studio 2013 is doing this?

Okay so this is a Microsoft bug. It turns out the project I'm working on does have identical names to another project that I was working on except in a different codeline. Visual Studio gets all confused and launches the old app in cache instead of the app I'm working on. The only way to fix this it appears it to manually change the port number for IIS Express.
For more information check this out.
https://connect.microsoft.com/VisualStudio/feedback/details/786645/vs-launches-the-wrong-mvc-website-when-two-identically-named-solutions-are-open-at-the-same-time

Related

Default ASP.NET Core MVC project won't run

I created a new ASP.NET Core MVC project with Visual Studio 2019, using the built in default template. I simply ran the project by clicking the green 'play' arrow where it says "IIS Express" (or by pressing F5). I haven't modified anything, yet when my browser opens up (in this case, Microsoft Edge) I get this:
Can’t connect securely to this page
This might be because the site uses outdated or unsafe TLS security settings. If this keeps happening, try contacting the website’s owner.
Your TLS security settings aren’t set to the defaults, which could also be causing this error.
I've opened a 'ticket' with Microsoft, but haven't heard anything yet. It may be that there is an issue with my IIS Express installation, but I'm not sure how to figure that out. I normally prefer to run my ASP.NET MVC local development from my local IIS, but it seems that IIS Express is the default way for Core MVC.
I modified my install of Visual Studio 2019 by removing all the web (ASP.NET) components, and then modified it again by adding them. After this, the default ASP.NET Core project does indeed work and debug with IIS Express.
I don't know how my install became corrupted, but it must have been from one of the numerous Visual Studio updates that seem to be released every few days.

Visual Studio 2013 breaking Web Site

I have a really weird problem, be interested in some pointers
We have a website that we have coded from Visual Studio 2003 -> Visual Studio 2010. We are now looking at moving to 2013.
The website is in IIS, when I navigate to it using IE it works. When VS2013 is -open-, not running, but has the project open we get a weird effect where the contents of the website gets duplicated by 3, its as if there are 3 iframes on the page, all with a copy of the same web site.
I close VS2013 and it goes back to normal
So, just to be clear, we don't even have to run the web site from within VS2013, just the project being open is enough to cause the weird effect
We use subversion as as far as I can tell no files have been modified when VS2013 is open
Any suggestions?
Thanks
It's Browser Link that's doing it! If you switch off Browser Link it works.
The source shows some extra script entries before the final tag but other than that the whole source is duplicated.
We don't need Browser Link and I don't have reflection capabilities on Asp.Net source so as to why that's for some one else to determine, I noticed a few people complaining when I searched on it so it may be something that just gets fixed in a future version

"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.

Debugging a Silverlight project with a WCF service

I have a WCF service hosted in IIS which is consumed by a Silverlight client application. When I run the Silverlight application, none of the break points seem to get hit (not breakpoints in the service, although they also don't get hit. That service is not in the same solution).
Normally when I've created SL projects in the past, they hit break points by default, and I can't thing I've changed any of the settings.
When I run the project, I do get a message box saying, "The Silverlight project you are about to debug uses web services. Calls to the web service will fail unless the Silverlight project is hosted in and launched from the same web project as the web services. Do you want to debug anyway?"
So I say 'yes'.
My break point is in a place that I know gets hit (InitializeComponent in MainPage.xaml.cs), so that's not it.
I don't know if it makes a difference to the client application, but the WCF service does have within its App.config the compilation debug set to 'true'.
Can anyone help?
Edit:
Some useful points: The project is set to debug. There is no web component to the SL project. The application compiles and runs normally. The code in the screen shot below is the code behind for the main page which is the default page (and the one I see when I start the project). The Visual Studio version is 2010 Ultimate (version 10.0.40219.1 SPRel) and I am not creating an OOB application. As well as just running regularly, I have specifically started from the Debug->Start Debugging option in Visual Studio.
Screen shot:
If that image isn't clear enough, there is the full resolution one here.
Second screen shot showing a break point on the InitializeComponent in MainPage.xaml.cs which doesn't fire (the previous one showed the constructor of the related view model).
Again, if that's not clear enough, the full resolution version is here.
The message your getting is unrelated to your breakpoints not being hit. This 'warning' isn't entirely true as well, as long a the webservice you're calling is running you'll be fine. You can happily ignore this warning.
As to not hitting breakpoints, I can think of two reasons. You could be building in release mode, or you could be starting the wrong project. You should not be starting the MyApp.Web project Visual Studio probably created for you, but the actual Silverlight project.
If it isn't one of those options you should provide a bit more detail about what you're doing, like Visual Studio versions, whether you're running an out-of-browser app, does the app actually work etc. There can be a few more things to check but it hard to guess it them with this little info.
I'm not seeing a test page.htm in your solution. How are you hosting / running the SL app?
If you were hosting it in an ASP.NET web app I'd say check that the Silverlight debugger was enabled on the web project project properties.
But as it is I can't see how the silverlight app is getting run at all...?

Visual Studio 2010 hangs on attach to process / debugging

Whenever I try to debug a Visual Studio 2010 web project, VS hangs, and ultimately crashes. This happens if I try to start the project using F5, or through Attach to Process, before the process list even appears.
Hitting F5 in, for example, a Windows Form project works fine, but attach to process fails here too.
Any ideas on what can be causing this? Obviously attaching to the devenv.exe process won't work as I can't get the Attach to Process dialog to appear...
Oh, running W7 (x64), VS2010 SP1 (had same problems without SP1)
In Solution Explorer there is a Show All Files icon (highlighted in the photo below):
Make sure it's turned off,
When It's turned on, Visual Studio tries to index all the files in the solution and if you have a giant Solution it could take forever!
I hope this has helped someone :)
Have you recently installed Mono and/or Mono Tools for VS2010?
I found that to be the problem it my case. Not sure why, but it somehow got in the way.
Matthew
In my case hangs when executable type was not correctly set, ex. Managed v4.0 and trying to attach to Native.

Resources