简体   繁体   English

值不能为空。 参数名称:IIS 7.5中的值

[英]Value cannot be null. Parameter name: value in IIS 7.5

I am migrating a website on IIS 7.5 from IIS 6.0. 我正在从IIS 6.0迁移IIS 7.5上的网站。 In IIS 6.0 i was using UrlRewriting and code is working fine. 在IIS 6.0中,我使用的是UrlRewriting,并且代码运行正常。 I have configured the website through Classic Asp.net app pool. 我已经通过Classic Asp.net应用程序池配置了网站。 I have also updated the rewrite rules in the web config as per IIS 7. 我还根据IIS 7更新了Web配置中的重写规则。

I am getting this error when i want to open a page in the browser. 我想在浏览器中打开页面时出现此错误。

Server Error in '/' Application. “ /”应用程序中的服务器错误。 Value cannot be null. 值不能为空。 Parameter name: value Description: An unhandled exception occurred during the execution of the current web request. 参数名称:值描述:执行当前Web请求期间发生未处理的异常。 Please review the stack trace for more information about the error and where it originated in the code. 请查看堆栈跟踪,以获取有关错误及其在代码中起源的更多信息。

Exception Details: System.ArgumentNullException: Value cannot be null. 异常详细信息:System.ArgumentNullException:值不能为null。 Parameter name: value 参数名称:值

Source Error: 源错误:

An unhandled exception was generated during the execution of the current web request. 当前Web请求的执行期间生成了未处理的异常。 Information regarding the origin and location of the exception can be identified using the exception stack trace below. 可以使用下面的异常堆栈跟踪来标识有关异常的来源和位置的信息。

Stack Trace: 堆栈跟踪:

[ArgumentNullException: Value cannot be null. [ArgumentNullException:值不能为null。 Parameter name: value] 参数名称:值]
System.Web.Caching.CacheEntry..ctor(String key, Object value, CacheDependency dependency, CacheItemRemovedCallback onRemovedHandler, DateTime utcAbsoluteExpiration, TimeSpan slidingExpiration, CacheItemPriority priority, Boolean isPublic) +11691362 System.Web.Caching.CacheEntry..ctor(字符串键,对象值,CacheDependency依赖性,CacheItemRemovedCallback onRemovedHandler,DateTime utcAbsoluteExpiration,TimeSpan slideExpiration,CacheItemPriority优先级,布尔值isPublic)+11691362
System.Web.Caching.CacheInternal.DoInsert(Boolean isPublic, String key, Object value, CacheDependency dependencies, DateTime utcAbsoluteExpiration, TimeSpan slidingExpiration, CacheItemPriority priority, CacheItemRemovedCallback onRemoveCallback, Boolean replace) +144 System.Web.Caching.Cache.Insert(String key, Object value) +110 URLRewriter.Config.RewriterConfiguration.GetConfig() +247 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(String requestedPath, HttpApplication app) +178 URLRewriter.ModuleRewriter.Rewrite(字符串请求路径,HttpApplication应用)+178
URLRewriter.BaseModuleRewriter.BaseModuleRewriter_AuthorizeRequest(Object sender, EventArgs e) +158 URLRewriter.BaseModuleRewriter.BaseModuleRewriter_AuthorizeRequest(Object sender,EventArgs e)+158
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +270 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()+80 System.Web.HttpApplication.ExecuteStep(IExecutionStep步骤,布尔值,已完成,同步)+270

Any ideas to resolve this issue or Why the issue is coming? 是否有解决此问题的想法,或者为什么会出现此问题?

Thanks In Advance Laxman 在此先感谢Laxman

It seems that you have an error in your .aspx file which is triggered when you launch this.DataBind() in your PageLoad() . 似乎您的.aspx文件中有错误,当您在PageLoad()启动this.DataBind()时触发了该错误。

I think that you are trying to get the parameter value from am object which is null, something like <%# YourObject.value %> and YourObject is null. 我认为您正在尝试从为null的am对象获取参数value ,例如<%# YourObject.value %>并且YourObject为null。 After that you get ArgumentNullException . 之后,您将获得ArgumentNullException

Search your .aspx for the value and make sure that every instance of the owner is not null. .aspx搜索该value ,并确保所有者的每个实例都不为空。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM