VS 2012 IIS Express 8 - Unable to launch the IIS Express Web server - visual-studio

I'm trying to run an MVC 4 project in IIS Express 8 (because that is apparently what comes with VS 2012) and every time I've tried to run it from VS, I get the following error.
Unable to launch the IIS Express Web server.
14:53:48: Error: Cannot initialize OLE
14:53:48: Error: Cannot initialize OLE
Launching IIS Express through WebMatrix seems to work fine. I've tried uninstalling and reinstalling, but nothing seems to work. Any suggestions?

I'm not sure this will help but it worked for me. After uninstalling IIS make sure you delete the IISExpress folder (on Windows 7 this is located in My Documents\IISExpress). This is where the IIS config files live and if you don't delete it after the uninstall the newly installed IIS will end up using the old config files.

I didn't see the OLE error you're having, but everything else is similar...
checking the event view, I was seeing an IIS error preloading .NET 4.0.30306. All the config files were pointing at 4.0.30319.
But... under my Windows/Microsoft.NET/Framework/ (and Framework64) I had what appeared to be a partial installation of a v4.0.30306.
Deleting both those .30306 folders and rebooting fixed the IIS Launch issue for me.

Related

Blazor - Visual Studio generates different pathes to dotnet.exe in web.config

I have two machines. One is Windows 10, one Windows 11. On both I use the newest (up to date) version of Visual Studio 2022. On both I have the newest version of dotnet hosting bundle installed.
I am developing a Blazor only project in Visual Studio and run and debug it in IIS (not express).
On the Win10 machine Visual Studio generates the web.config with the following tag:
<aspNetCore processPath="C:\Program Files\dotnet\dotnet.exe" ...
On the Win11 machine on the other hand: <aspNetCore processPath="..\..\..\..\..\Program Files\dotnet\dotnet.exe" ...
Everything else is exact the same in both web.configs.
While everything works fine on the Win10 machine, on the Win11 I get an 500.30 error from IIS in browser. Windows event log here states that dotnet could not be initialized. When I manually change the path in Win11 web.config to the same, absolute, path like it gets generated on the Win10 machine it works.
Even though technically the relative path should be correct.
Why is it generated differently and how can I fix it for my Win11 machine?
Please try to deploy a simple ASP.NET Core MVC application. If it can run without 500 error, you may miss the IIS Rewrite Module.
If the simple ASP.NET Core MVC application cannot run normally, please check the application pool settings to see if it is No Managed Code.
If still not working, maybe we need further troubleshooting step by step.

VS2019 install with SQL Server components causes err_connection_reset when viewing the web

I installed Visual Studio 2019 last night with SQL Server components, and now whenever I try to view web pages in Chrome, I get a connection reset error. I assume it has something to do with IIS. I tried uninstalling IIS Express, but that didn’t seem to help. I checked all my connections and everything seems to be fine. I can ping google in the command line, but for some reason I just can’t view the web. Does anyone have any ideas?
Maybe your services are turned off, try entering the task manager with CTRL + ALT + DELETE, and look for SERVICES, the SQL SERVER server you are using, and check if it is stopped.
VS2019 install with SQL Server components causes err_connection_reset
when viewing the web
This is not expected behavior after VS installation. Maybe something in that installing process modified your IE settings.
Try resetting all IE options(IE options=>Advanced=>Reset) and reinstall Chrome browser.
I fixed this by removing all Visual studio installations and reinstalling VS 2019.

IIS Express Remote access with Visual Studio 2019

I don't remeber this being an issue before, and many threads are rather outdated now.
On my Windows 10 installation VS 2019 hosts my project at http://localhost:58402 just fine.
However when I go to change the url under Properties > Debug > App URL to 0.0.0.0:58402 I get the error:
Cannot connect to web server IIS Express
What I have tried:
Running VS 2019 as admin
Restarting computer
Deleting hidden VS folder
Modifying launchSettings.json in my API project properties folder
I can change the port just fine. But as soon as I change localhost to 0.0.0.0 the error occurs.
Update:
I have been using the NPM package iisexpress-proxy with great success now as a daily driver for 5 months now.
Had some difficulty with CORS, but disabling that for local debugging allows me to do everything I would expect.
https://www.npmjs.com/package/iisexpress-proxy

Problems getting IIS to work

I have installed Visual Studio 2017 on a Windows 10 PC. I thought this would also install IIS Express. However, when I browse to localhost I get a localhost refused to connect error. The same error occurs when I try to browse to the http://localhost:49247 url for my solution in visual studio. I have tried installing IIS Express 10 separately and also tried turning on the IIS features in windows 10, but with the same results.
I've also tried changing the port number and deleting applicationhost.config, as suggested elsewhere on this site, but these didn't work for me either.
Can anyone tell me what I'm doing wrong?

Cannot debug MVC project due to IIS change(8=>7.5) on VS2012 RC

I have installed web matrix and It has somehow removed the existing IIS Express 8.0, that is installed by default during the VS2012RC installation. I think that is because the web Matrix is using IIS 7.5. So that it has replaced the IIS Express 8 with IIS Express 7.5.
So my tech lead told me to remove the existing IIS 7.5 that has been installed during the installation of Web Matrix, And I removed it. So I have no IIS for debugging. So once I tried to install the IIS 8 manually and it says that there is a existing version of IIS Express 8. So that I can not even install the IIS Express 8.
So I did a repair to my VS2012RC. After a lengthy process it finally gave me a report as
"IIS 8.0 Express
Package failed"
So, Now I am totally stuck with this. Can some one good at this VS stuff help me on this issue.
Another thing is, previously when I open the project and it was not loaded(It says the project is not loaded) So, then when I write click on it and do a reload it said "For debugging you have to have IIS 8.0 and ask me to download it and install ".
When I click next and then it goes to "MS web platform Installer" and direct me to the "IIS 7.5 download page" But the install button was enabled and says its installed. What should I do to overcome this issue. This is like a nightmare.
I also Tried to use "Fix it" and Its beta testing is over and I can not do a proper uninstall of the IIS 8, which says that is still existing.
Thank you.
So, what I did was using MS web platform Installer my option of IIS Express 7.5 and IIS Express 8.0 was gone due to a registry issue. But there was another IIS 8.0 which is compatible with Windows XP and Vista and upper. So I downloaded it installed. It installed in no time and then I opened the project and changed my solution configuration, single start up to my website project. And it worked. That saved me form the havoc that day.
Later I uninstalled the IIS 8.0(Xp compatible) and then did a repair again to my VS 2012 and it installed correctly that time. Then I changed the configuration as said above and done.
If you have the same kind of problem you have to check the configuration also. Since I forgot that this took even longer instead of repairing time for the VS 2012 as well as the system restore.

Resources