Specified argument was out of the range of valid values. Parameter name: site
Solution 1
If using IIS:
- control panel
- Programs
- open or close windows features
- tick internet information services
- then restart your visual studio
If using IIS Express:
Open 'Add/Remove Programs' from the old control panel and run a repair on IIS Express Or you might go Control Panel ->> Programs ->> Programs and Features ->> Turn Windows features on or off ->> Internet Information Services and check the checkbox as shown in the picture below:
Solution 2
This occurred to me when I applied the 2017 Fall Creator Update. I was able to resolve by repairing IIS 10.0 Express (I do not have IIS installed on my box.)
Note: As a user pointed out in the comments,
Repair can be found in "Programs and Features" - the "classic" control panel.
Solution 3
I had the same issue i resolved it by repairing the iis server in programs and features.
GO TO
Controll panel > uninstall a program and then right click the installed iis express server (installed with Visual Studio) and then click repair.
this is how i solved this issue
Solution 4
I had the same issue with VS2017. Following solved the issue.
- Run Command prompt as Administrator.
- Write following two commands which will update your registry.
reg add HKLM\Software\WOW6432Node\Microsoft\InetStp /v MajorVersion /t REG_DWORD /d 10 /f
reg add HKLM\Software\Microsoft\InetStp /v MajorVersion /t REG_DWORD /d 10 /f
This should solve your problem. Refer to this link for more details.
Solution 5
Instead of installing the bloated IIS, I get mine resolved by installing Internet Information Services Hostable Web Core from the Windows Features
Related videos on Youtube
![Rahul_RJ](https://i.stack.imgur.com/TpQmg.jpg?s=256&g=1)
Rahul_RJ
Updated on July 17, 2020Comments
-
Rahul_RJ almost 4 years
I am getting this Kind of Error like::
Specified argument was out of the range of valid values.Parameter name: site
while Debugging any of my Project.
I have also tried after Reinstalling My Visual Studio 2012. But again the same kind of problem I am getting while Debugging.
My System's Configurations are :
- Windows 8 : 32-bit
- Visual Studio : 2012
Exception is thrown at the time of Showing Web Page Like,
[ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: site] System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +298 [HttpException (0x80004005): Specified argument was out of the range of valid values. Parameter name: site] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9873912 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
-
Sriram Sakthivel almost 11 yearswhere this exception is thrown?
-
Rahul_RJ almost 11 yearsException is thrown while showing the Web Page after Debugging.
-
Sriram Sakthivel almost 11 yearsNot clear post some code which line this exception is thrown
-
Rahul_RJ almost 11 yearsNow see I have also Given the Error shown while showing the Web Page
-
Simon Belanger almost 11 years@Rahul_RJ You are not helping. You are showing the stack trace where it says the location of the exception but not including that code.
-
Sriram Sakthivel almost 11 years@Rahul_RJ post which point in your code exactly throws exception
-
Rahul_RJ almost 11 yearsNo there are no Exceptions at the Time of Rebuild, But after Debugging only this Error is shown on the Browser
-
ProgrammingLlama over 6 yearsWindows 10 updated this morning caused this issue for me. I'm glad I found your question :)
-
Zahid Riaz over 10 yearsWorked well. Visual Studio should have tell that straight forward. IIS is not enabled. Thanks Man
-
Václav Dajbych about 10 yearsThank you, it worket for me too. Why IIS Express needs IIS installed? I don't understand that. I use default web.config, nothing special.
-
Tsasken almost 10 yearsI know this is an old answer, but I recently encountered this error. With me, the fault was that I was trying to run 2 different websites in 2 different visual studio solutions. I think IIS Express only allows for 1 concurrent visual studio solution to run at once. So, when you need to have 2 solutions active on IIS, you need to enable IIS using the windows features. If not, you just have to make sure there's only one solution running on IIS Express at any given time.
-
bbbwex almost 10 yearsSame as Tsasken, I just got it a bit earlier today. Thanks to MustafaP for the answer and in general to Stackoverflow and associated sites for the help I've had!!! fixed the prob in 30 min since it popped up.
-
timbillstrom about 7 yearsAfter a Windows-update this issue got me. Solution still works today! Windows 10 Pro Insider Preview Build 16199.rs_prerelease.170513-2252
-
jpda about 7 yearsYou don't need all of IIS, you can just install IIS Management Console (IIS --> Web Management Tools --> IIS Management Console).
-
BobK about 7 yearsI also received this error after updating to 'Windows 10 Pro Insider Preview Build 16199.rs_prerelease.170513-2252'. Added 'IIS Management Console' as recommended by JPD. Problem solved.
-
Auri Rahimzadeh almost 7 yearsYou don't have to install all of IIS - just tick the box and take the defaults. Making sure that's clear :)
-
Boris Lipschitz almost 7 yearsCrazy! This question was asked 4 years ago and the issue resurfaced again in Insider Preview Build
-
Kevin Coulson almost 7 yearsJust had this issue on Insider Preview Build 16257.rs3_release.170728-1700 so it is still occurring!
-
Bastien Vandamme almost 7 yearsGot it with Windows 10 Pro Insider Preview Evaluation copy. Build 16281.rs3 release.17D82g-1438. Thank for this solution. I also only installed the IIS Management Console.
-
LucasMetal over 6 yearsGot the error with the Win10 Fall creators update, installing only the "Hostable Web Core" did the trick. Thanks ;)
-
LucasMetal over 6 yearsGot the error with the Win10 Fall creators update, installing only the "Hostable Web Core" did the trick. Thanks ;)
-
user2006616 over 6 yearsRepair can be found in "Programs and Features" - the "classic" control panel.
-
Vitor Rigoni over 6 yearsSame here! Repairing IIS 10.0 Express fixed. Thanks!
-
Stefan Z Camilleri over 6 yearsThis is the solution for IIS Express, works as explained. Since we cannot have two official answers, I have added this to the official answer.
-
Thomas927 over 6 yearsRepairing IIS Express would crash the installer for me. I had to uninstall/re-install IIS Express using the Visual Studio 2017 installer under the individual components section. It will tell you other components need to be uninstalled as well. Make note of them and and then proceed with uninstall/re-install of the components.
-
Jim Taliadoros over 6 yearsI can confirm also that following the Win10 Fall creators update, the above suggested solution of installing the Hostable Web core component did the trick. To do this click on the Microsoft Windows button, then type Turn Windows Features ON or OFF in the search box, then select Internet Information Services Hostable Web Core.
-
akokani over 6 yearsGOD DAMN YOU MICROSOFT GOD BLESS YOU GUYS
-
Code Animal over 6 yearsAfter updating to Windows 10 Fall Creators Update, repairing IIS Express sorted my issue. Many thanks!
-
Mike Devenney over 6 years4 years later and the answer still holds up. Windows 10 Update installed and IIS went away. Seriously, WTF MS...
-
Brent Keller over 6 yearsI ended up downloading the stand-alone installer for IIS 10.0 Express and doing the uninstall/re-install using that instead of letting the VS installer removed the other things. Everything seems to be working out so far.
-
Episodex over 6 yearsDon't you think it's completely ridiculous that you have two interfaces for Add/Remove programs in one system and they have different features (you can't repair from "new" one)?
-
camelCase over 6 yearsThis solution worked for me when I was blocked by a grayed out Modify button in Control Panel add/remove programs.
-
Fidel Garcia over 6 yearsSolution still works for Windows 10, version 1709 (OS Build 16299.64)
-
Stefanvds over 6 yearsDidn't have to restart VS
-
Will Appleby over 6 yearsRepair IISExpress fixed this for me too after Fall Creators Update.
-
aspirant_sensei over 6 yearslovely, system update screwed me too :) lack of coffee made me just google the exception and I'm glad I did as I would have never thought of IIS being the issue !
-
Daniel Liuzzi over 6 yearsMake sure you shut down IIS Express before you repair it. Right-click the icon in the notification area and click Exit. Repairing IIS Express while it's running won't show any error, but it will not fix the issue either.
-
Chtioui Malek over 6 years5 Years later, and still the same issue (and solution), Windows Automatic Update and BOOM
-
TheMentor over 6 yearsI really think that Microsoft has a few old people collecting fat paychecks and stuff like these are run by bunch of students and interns. How the hell can this happen.
-
Nitesh over 6 yearsStill holds true. Faced this error after running a Windows update.
-
Mr. Young over 6 yearsHappened to me too after a Windows up with IIS Express. I had to install the windows feature 'IIS Hostable Web Core' in order to fix the issue. Merely reparing/uninstall/install/combinations didn't fix it. But installing the windows feature seems to "repair" IIS Express.
-
Alaa' over 6 yearsI always faced same issue after updating my Windows 10 Pro
-
DanielG over 6 yearsJust an FYI; I received a Windows Update this morning, and thereafter I had this issue. As others have suggested, using the Repair option Control Panel still works. In my case, I ran a repair on the program titled "IIS 10.0 Express".
-
Patrick Borkowicz over 6 yearsInstalled the Creators Update somewhat late, on 2018-01-24 and this happened. It actually seems to have removed IIS Express. I would certainly call this a breaking change. Why is it still part of their release?
-
AhabLives over 6 years2018 here - windows 10 pushed an update out last night. This problem came to be. This solution still worked. Thank you.
-
Geovani Anholete over 6 yearsI upgraded my windows and had the same problem. The answer is still valid!
-
kexx over 6 yearsyou the man, microsoft fcked up with its falls creator update sht, you fixed it. you worth more than the entire company
-
Jure over 6 yearsWorked for me too! Thanks!
-
SBF over 6 yearsClassic "Programs and features" can be started by typing appwiz.cpl in start menu
-
auhmaan about 6 years-1 Despite being an old answer, it would be better to specify which options to turn on, as the tick, being a square, means that only some options are active, and not all. In order to prevent turning on something we don't want, security reasons for instance, it would be better if someone could supply the full tree of active options.
-
Thanos Paravantis about 6 yearsThank you for this, it actually solved my issue right away. Regardless, it's worth noting that if you use localhost alongside other frameworks and programs, port 80 will be blocked by IIS.
-
UserX over 5 yearsEnabling IIS Express and restarting didn't work for me. Tried the repair option and Windows refused to do it. Downloaded the Program Install and Uninstall Troubleshooter as described here: thewindowsclub.com/cannot-install-uninstall-programs-windows-7 and uninstalled IIS Express. Then downloaded IIS Express and re-installed. Then it worked. Surprising how often tasks that should take minutes take hours when Microsoft products are involved.
-
Sumith Harshan over 5 yearsI'm using IIS and this method is solved my above issue. Thank you
-
vibs2006 almost 5 yearsBest Solution. Worked for me like a charm.
-
user2728841 over 4 yearsThis fixed it for me - vanilla install of Visual Studio 2019 in Windows Server 2019. Didn't need a reboot.
-
Ulysses Alves over 4 years@ZahidRiaz have you ever seen the error in which Visual Studio says: "Catastrofic Failure." and closes itself? You might think the world would end after this message, but you then just reopen VS and everything is nice again.