Hello I am new to asp.net as well as visual studio 2012.
I am just trying to run simple web form ("Hello World") but when ever i run it, it gives me a following error message.
Can somebody help me.
Server Error in '/' Application.
Specified argument was out of the range of valid values.
Parameter name: site
Description:
An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: site
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[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
Can you post some additional code from your web form? It would make it much easier to troubleshoot this issue, as there are several different ways that exception could be getting thrown.
Is that the only code that you have in the application? I tried to recreate the example same application using the code that you provided and didn't recieve any errors.
shress7
0 Points
4 Posts
Server Error in '/' Application. in visual studio 2012
Jan 24, 2013 08:37 PM|LINK
Hello I am new to asp.net as well as visual studio 2012.
I am just trying to run simple web form ("Hello World") but when ever i run it, it gives me a following error message.
Can somebody help me.
Server Error in '/' Application.
Specified argument was out of the range of valid values.
Parameter name: site
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: site
Source Error:
Stack Trace:
Rion William...
All-Star
26499 Points
4401 Posts
Re: Server Error in '/' Application. in visual studio 2012
Jan 24, 2013 08:44 PM|LINK
Can you post some additional code from your web form? It would make it much easier to troubleshoot this issue, as there are several different ways that exception could be getting thrown.
shress7
0 Points
4 Posts
Re: Server Error in '/' Application. in visual studio 2012
Jan 25, 2013 05:29 PM|LINK
This is what i have and thank you for your help
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="WebApplication1.WebForm1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title> Web Aplication1</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" runat="server" Font-Size="Large"></asp:Label>
<br />
<br />
<br />
<asp:Button ID="Button1" runat="server" Text="Click me" Width="97px" />
</div>
</form>
</body>
</html>
shress7
0 Points
4 Posts
Re: Server Error in '/' Application. in visual studio 2012
Jan 25, 2013 05:40 PM|LINK
Public Class WebForm1
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Label1.Text = "Hello world"
End Sub
End Class
Rion William...
All-Star
26499 Points
4401 Posts
Re: Server Error in '/' Application. in visual studio 2012
Jan 25, 2013 06:12 PM|LINK
Is that the only code that you have in the application? I tried to recreate the example same application using the code that you provided and didn't recieve any errors.
What URL does it show when it is running?
shress7
0 Points
4 Posts
Re: Server Error in '/' Application. in visual studio 2012
Jan 27, 2013 04:17 PM|LINK
This is what i have in my URL
http://localhost:57265/WebForm1.aspx
and I did run it on Google Chrome as well as internet explorer
Amy Peng - M...
Star
9968 Points
952 Posts
Microsoft
Re: Server Error in '/' Application. in visual studio 2012
Jan 31, 2013 08:36 AM|LINK
Hi,
You application is very simple, as we can see there is no error in there.
Please try to restart the visual studio 2012, then create a new project using the same code to see if it the error still come.
Hope it helps.
Best Regards,
Amy Peng
Feedback to us
Develop and promote your apps in Windows Store
Ruchira
All-Star
42888 Points
7020 Posts
MVP
Re: Server Error in '/' Application. in visual studio 2012
Feb 02, 2013 02:37 PM|LINK
Hello,
I found a similar problem as yours. Check it
http://forums.asp.net/t/1845408.aspx/1
My Tech blog | My YouTube ChannelPlease 'Mark as Answer' if this post helps you.