Specified argument was out of the range of valid values (Parameter name: site)
This question already has an answer here:
This Should Solved the problem
go
It worked for me
I found that answer here
Problem with your Action signature. Since, the Index is a default action defined in RegisterRoutes
so it would be invoked as soon as you launch the site. Since MVC excepts the return type of ActionResult
and throws exception if does not find in invoked action. You can change the return type to ActionResult
and wrap the return value in Json if the value return is excepted of type string.
public ActionResult Index()
{
return this.Json(typeof(Controller).Assembly.GetName().Version.ToString());
}
链接地址: http://www.djcxy.com/p/38864.html
上一篇: 指定的参数超出有效值的范围参数名称:站点
下一篇: 指定参数超出有效值范围(参数名称:站点)