• Register
0 votes

Problem :

I am facing this Kind of Error like::

Specified argument was out of the range of valid values.Parameter name: site

While Debugging any of the Project.

I have also tried after Reinstalling the Visual Studio 2012. But again a same kind of problem I am getting while Debugging it.

My System's Configurations are as below :

  1. Windows 8 : 32-bit
  2. Visual Studio : 2012

Exception is thrown at the time of Showing Web Page as below,

[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


7 5 2
3,870 points

Please log in or register to answer this question.

2 Answers

0 votes

Solution :

If using the IIS:

· Go to control panel

· Then to Programs

· After that open or close windows features

· Next tick internet information services

· Then restart the visual studio

If using IIS Express:

Open the 'Add/Remove Programs' from a old control panel and run the repair on IIS Express Or you might go to Control Panel ->> Programs ->> Programs and Features ->> Turn Windows features on or off ->> Internet Information Services and check the checkbox for IIS.


9 7 4
38,600 points
0 votes

It seems that you are trying to get 5 items out of a collection with 5 items. Looking at your code, it seems you're starting at the second value in your collection at position 1. Collections are zero-based, so you should start with the item at index 0. Try this:

TextBox box1 = (TextBox)Gridview1.Rows[i].Cells[0].FindControl("txt_type");
TextBox box2 = (TextBox)Gridview1.Rows[i].Cells[1].FindControl("txt_total");
TextBox box3 = (TextBox)Gridview1.Rows[i].Cells[2].FindControl("txt_max");
TextBox box4 = (TextBox)Gridview1.Rows[i].Cells[3].FindControl("txt_min");
TextBox box5 = (TextBox)Gridview1.Rows[i].Cells[4].FindControl("txt_rate");
6 3 2
4,420 points

Related questions

0 votes
1 answer 2 views
Problem: Do you have any suggestions about how I can resolve this “Argument out of range exception: argument is out of range. parameter name: index”?
asked Apr 1 rakib1 51.5k points
0 votes
1 answer 3 views
Problem: I am getting error: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security When I run below code to capture errors on Win 2K12 R2 server IIS 8.5 EventLog elog = new EventLog(); EventLog.CreateEventSource(" ... ; I've given full access to HKLM\SYSTEM\CurrentControlSet\services\eventlog but it is not working still. What shall I do to fix it?
asked 2 days ago Atik03 10.1k points
0 votes
1 answer 308 views
Problem : When I try to upload my application on to the GoDaddy shared Plesk hosting account, I get the below error. “This program is blocked by group policy. For more information, contact your system administrator.” Does anyone know a purpose of this block or why the Microsoft puts it there? Please Note : The app uses C# and not VB.
asked Feb 4, 2020 jwilliam 3.9k points
0 votes
1 answer 48 views
Problem : I want to add the data as one by one row to my datagridview. But I am facing the following error: "Index was out of range. Must be non-negative and less than the size of the collection parameter name: index" Why am I facing this error ? ... ColumFive = Convert.ToString(sum); string[] row = new string[]{ ColumOne, ColumTwo, ColumThree, ColumFour, ColumFive }; myDataGridView.Rows.Add(row);
asked Dec 4, 2019 alecxe 7.5k points
0 votes
1 answer 3 views
Problem: Please help me … how can I solve it? The name specified in the target box is not valid
asked Apr 7 Ifra 24.4k points
0 votes
1 answer 5 views
Problem: I have an issue that i am unable to launch the iis express web server please solve it.
asked Mar 22 waseem memon 2.4k points
0 votes
1 answer 5 views
Problem: I have a web project in my solution file that is "unavailable" when I open the solution. When I right-click on the web project and reload the project, I get the following error: The Web Application Project mycompany.myapp.mywebproject is configured to use IIS. The Web Server 'http://localhost/MyWebApp could not be found.
asked Mar 20 ummesalma 25.2k points
0 votes
1 answer 4 views
Problem: Can anyone tell me the solution of this problem? How to fix http error 503. the service is unavailable?
asked Mar 19 Ifra 24.4k points