[英]Value cannot be null. Parameter name: value in IIS 7.5
我正在从IIS 6.0迁移IIS 7.5上的网站。 在IIS 6.0中,我使用的是UrlRewriting,并且代码运行正常。 我已经通过Classic Asp.net应用程序池配置了网站。 我还根据IIS 7更新了Web配置中的重写规则。
我想在浏览器中打开页面时出现此错误。
“ /”应用程序中的服务器错误。 值不能为空。 参数名称:值描述:执行当前Web请求期间发生未处理的异常。 请查看堆栈跟踪,以获取有关错误及其在代码中起源的更多信息。
异常详细信息:System.ArgumentNullException:值不能为null。 参数名称:值
源错误:
当前Web请求的执行期间生成了未处理的异常。 可以使用下面的异常堆栈跟踪来标识有关异常的来源和位置的信息。
堆栈跟踪:
[ArgumentNullException:值不能为null。 参数名称:值]
System.Web.Caching.CacheEntry..ctor(字符串键,对象值,CacheDependency依赖性,CacheItemRemovedCallback onRemovedHandler,DateTime utcAbsoluteExpiration,TimeSpan slideExpiration,CacheItemPriority优先级,布尔值isPublic)+11691362
System.Web.Caching.CacheInternal.DoInsert(布尔值isPublic,字符串键,对象值,CacheDependency依赖项,DateTime utcAbsoluteExpiration,TimeSpan slideExpiration,CacheItemPriority优先级,CacheItemRemovedCallback onRemoveCallback,布尔值替换)+144 System.Web.Caching.Cache.Insert(String键,对象值)+110 URLRewriter.Config.RewriterConfiguration.GetConfig()+247
URLRewriter.ModuleRewriter.Rewrite(字符串请求路径,HttpApplication应用)+178
URLRewriter.BaseModuleRewriter.BaseModuleRewriter_AuthorizeRequest(Object sender,EventArgs e)+158
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()+80 System.Web.HttpApplication.ExecuteStep(IExecutionStep步骤,布尔值,已完成,同步)+270
是否有解决此问题的想法,或者为什么会出现此问题?
在此先感谢Laxman
似乎您的.aspx
文件中有错误,当您在PageLoad()
启动this.DataBind()
时触发了该错误。
我认为您正在尝试从为null的am对象获取参数value
,例如<%# YourObject.value %>
并且YourObject
为null。 之后,您将获得ArgumentNullException
。
在.aspx
搜索该value
,并确保所有者的每个实例都不为空。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.