Getting 500 error when starting IIS Express localhost (500.19) - iis

Ive got a project which i run on my main computer, everything works fine there. Then i also want to use that project on my laptop, so i get the code via git from azure devops, build the project and everything shows up as working. As soon as i want to run the project, either via npm start or via visual studio 2019, i get a 500 error displayed in the browser, like really quick.
And i get zero error codes or messages, the only push in the right direction is that the cmd that displays the status of IIS, displays 500.19, but thats it. I have no idea what this might be since it doesnt show any errors?
It is installed on a fresh computer, we tried installing this on another computer and it worked there, but not on my computer.
Ive tried numerous things, such as reinstalling IIS Express, editing / removing applicationHost.config, editing web.config, checking access rights for all the files and folders.
Possible solution?:
According to my project on my other pc and the internet there should be an applicationhost.config in .vs/config/****, which it doesnt for me? which may be a problem? i dont know to be honest, i have been stuck on this problems for a couple of days now..

Related

.Net core 3.1 sudenly stoped thowing HTTP Error 500.31 - ANCM Failed to Find Native Dependencies

Everything was fine until yesterday. This must be due to Windows update. No one touched the server. I have tired couple of similar solutions posted in Stack Overflow(all are old questions),none of them worked for me. What I have, Server Windows server 2019, APP netcore 3.1 ,IIS version 10. .net core runtime and SDK both are installed. This was working before. No one touched anything, just stopped working
In the browser appearing
HTTP Error 500.31 - ANCM Failed to Find Native Dependencies
When I executed on the command line
A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in
When I checked event log. Something like below appeared. But let me tell you in the build
directory we don't have a file like app.runtimeconfig.json
What I have tried
Repair .netcoe runtime and SDK
Restore old DB backup
Reinstall .netcore versions
No pending Windows updates
Restart IIS APP pool also the server
Check file permission
None of them worked for me. If anyone can help, really appreciate.
For this issue, we can't find out that the environment of windows server caused by windows update is abnormal. As you said, it worked fine before.
So please allow me summarize below suggestions as answer.
Suggestions
Copy the publish file named original_file . And paste it in our dev pc or other server which have IIS Management. And test it, this publish file should be works. This step just confirm the publish file is normal.
Create a new website and a new application pool. Create a new asp.net core3.1 application and deploy it. Then check if it works properly under this new site.
The site should be fine in the second steps, and replace it with the original_file. And the application also should be works fine.
The site can't work in the second steps, it means the environment in you server has some problem. It could be registry issue or ApplicationHost.config issue in IIS and so on. If it's very important for you, you can rasie a support ticket and let official engineer help you to figure out what happend in this windows Update
After the third step, if the new site can run the original_file file well. We can compare ApplicationHost.config between the new site and the original one to see if any settings have been changed.

Too many open files error in Visual Studio Node.js under parallels after upgrade to MacOS Catalina 10.15.7

I just upgraded my Mac to 10.15.7 today. I run Parallels Desktop on the Mac so I can run my Node.js Visual Studio projects. Upon doing this upgrade I can no longer get my project to run. Unfortunately I made a few changes to the code before trying to run but I do not think that is the source of the issue or the log files would be telling me something else. When I run I get hundred/thousands of lines with the "too many open files" error. Below is a sample of one of those lines:
SourceMaps: could not preload for generated script: c:\Users\chris\github\CollegeTennisRanks\CollegeTennisRanks\obj\Release\Package\PackageTmp\node_modules\core-js\library\fn\string\bold.js. Error: Error: EMFILE: too many open files, open 'c:\Users\chris\github\CollegeTennisRanks\CollegeTennisRanks\obj\Release\Package\PackageTmp\node_modules\core-js\library\fn\string\bold.js'
I tried a suggestion I found online to change the settings by going to e terminal window and running the following command:
sudo launchctl limit maxfiles 65536 200000
but that did not change anything, still the same errors when i run the project. The odd thin is that I actually have two projects in the solution and the 2nd one actually runs, but it is a much smaller project and only a console app that dows not start up a web server, etc.
I am assuming that the upgrade to 10.15.7 had something to do with this but no cluee where to go now. Any help would be greatly appreciated.
Well I'll be darned... it was a code change. I copied the project over to a PC and ran and got the same result. Went through last changes one by one undoing them and found that one of my controllers had an issue that for some reason prevented it from running. How to determine that from the log is another question but at least that answers that. Evidently all the "too many open files" messages in debug log are not an issue, which also seems odd.

Socket.io doesn't work - site doesn't open in browser

I'm starting with Socket.io with Node.js.
I found this tutorial and I decided to make my own simple chat based on it. Unfortunately it didn't work. I've done some research but I didn't find anything helpful, so I downloaded source code and run with Visual Studio 2012 and... it still doesn't work :/
Normally when I click "run" button in Visual Studio, appears command prompt and then browser with my site. In this project appears only that:
and that's it. It seems like something went wrong, I can't access to my server from browser, so it seems like it haven't been created.
This is link to my project: Download
Please, tell my what I've done wrong :/
The worst thig is, that I haven't got any errors, it just doesn't work.

Visual Studio deployment error

"The application could not be launched for debugging. Please make sure the device is unlocked."
I am getting this error when I try to launch the app on my device for debugging.
I have tried the following:
Relaunch Visual Studio,
Reinstall Visual Studio,
Restart my computer,
I have selected both debug and release in the configuration window.
The problem is that its not getting launched even in the emulator. The emulator opens and never loads the app but gives the same error message. And I have tried to just open a new application on VS and tried to run the default application. That also gives the same problem.
Everything was working fine after I opened a few more projects for reference, It suddenly started giving this error message.
Make sure a Windows project is not set as startup(assuming you have both windoes project and phone project in the same solution). For example If your target platfrom is a Windows phone project WP7, then you cannot have a windows project as startup. This is a known reason for the error you mentioned.
Also what is the operating system you are working with? I know the error you mentioned reprorted on some OS's including Windows server 2003 and 2008. Try running your project in winsdows 7.
I suddenly got exactly the same issue today. I was coding like always and then I got this problem.
// P.S.
// Today I updated Windows from 8 to 8.1
// Then I installed VS 2013 preview
// But continued working in VS 2012 (I need R#)
// After ~ 5 hours of work I got this issue
I tried everything, deleted emulators from Hyper-V, deleted all virtual commutators, restarted VS 2012, restarted laptop, deleted Bin and obj folders from project, rebuilded project.
But nothing helped.
Then I tried to open solution in VS 2013 preview, and it works!!
I hope I help you with this answer.
If somebody know how to fix it in VS 2012, please tell us
I have a similar problem but I’m able to debug my app once I click OK on the error prompt following the “Launching TaskHost.exe failed.” message in the status bar. I haven’t been able to solve it but I’ve found a workaround that might also work for you.
Start the “Simulation Dashboard” under “Tools” and instead of starting the debugger the usual way build your project if needed and then try to start the debugger by clicking “Locked” under “Lock Screen” on the dashboard.
This answer worked for me.
Under the following:
Solution(Right-click) > Properties > Configuration Properties > Configuration
Ensure that your main project is set to 'Deploy.'

Debugger can't connect when starting local azure project

Ok, first of; here's what I did:
Install AZURE tools
Reboot
Start Visual Studio - new Azure project
Add web role (asp.net MVC 4 beta web role)
Hit F5 (debug)
It starts up the storage emulator and the compute emulator and starts to load in runtimes, and then I get a popup saying that the debugger couldn't connect.
Then after some googeling I'm suggested to try to run the application without running the debugger to see if I can acces the application. When I do I get this:
So I figure that IIS does not have permissions to access some file/directory. So I go to IIS and look up the application pool running the app, and it tells me that the identity in use is NetworkService, then I go give NetworkService full permissions to the entirety of the folder IIS has set for the application (which also happens to be the path to the project dir). Still I get the same error. Now I'm more or less out of ideas, but I try one last thing, which is to also give IUSR full permissions to the same dir, but this did not help either.
How can I go about resolving this problem? I haven't tried actually launching my project to Azure yet, cause if I can't even get it to work in development I don't see much point. Any and all help would be appreciated.
I ran into the same error today after uninstalling .NET 4.5/Visual Studio 11 Dev Preview, then installing ASP.NET MVC 4 Beta (this is before Feb 29th when the updated VS 2011 Preview drops).
Since I uninstalled .net 4.5, you just need to do an "aspnet_regiis -i" to ensure the .net framework (4.0) is set up with IIS 7.x this worked for me.
Edit: This will work if you uninstall/then manually install Visual Studio 2012 RTM as well.
I had a similar error yesterday. For me the problem was that the output of the build was empty in the target folder.
I tried to answer a similar question https://stackoverflow.com/a/9411422/182371:
Check %UserProfile%\AppData\Local\dftmp\IISConfiguratorLogs\IISConfigurator.log
file for the error messages. Mode details at
https://stackoverflow.com/a/8432621/182371
Make sure that the build output of your project is not empty. You can do this by going to IIS, find the site with the name similar to
'deployment16(6).WindowsAzureProject2.WebApplication3_IN_0', right
click --> Explore.... Make sure that this folder is not empty and
contains all the files required to start a web project successfully.
As for the Access Denied error:
it could be just an IIS default setting to disable browsing. To resolve that, just navigate to that web site in IIS, find Directory Browsing icon, and press Enable. You will at least see the files inside that directory.
Also try not only 127.0.0.1:81, buta specific document inside that folder, like 127.0.0.1:81/Default.aspx
Take into account the fact that there's sometimes some mess with the ports. You see that in the error message it's port 82, but in your browser it's port 81. So make sure you're using the right port. Or, even better, in your service definition try to use some non-standard port for this to avoid remapping.
I've met the same issue. In the end, I had to reinstall IIS 7.
I got this exact same error and tried a re-install of IIS and the Azure SDK - nothing worked.
Eventually tracked it down to the "IIS URL Rewrite Module 2". I went to the Control Panel and chose Repair and it resolved it. If you have a section in your web.config then this might be the cause.
Follow step 11 from http://www.microsoft.com/en-us/download/details.aspx?id=35448. Worked for me on Windows 8 with Oct 2012 SDk when upgraded from 2011.

Resources