I've just started working with asp.net mvc 4. I've created this simple controller class and did this small coding but when i run my project it throw an error. I don't know what this error is and how to fix it. please help me with it.
public class HomeController : Controller
{
public string Index()
{
return typeof(Controller).Assembly.GetName().Version.ToString();
}
}
when i run the application on google chrome it throw the follwoing error
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) +303
[HttpException (0x80004005): Specified argument was out of the range of valid values.> Parameter name: site]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9951956 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34248**