1

我正在从 IIS 6.0 迁移 IIS 7.5 上的网站。在 IIS 6.0 中,我使用 UrlRewriting 并且代码运行良好。我已经通过 Classic Asp.net 应用程序池配置了网站。我还根据 IIS 7 更新了 Web 配置中的重写规则。

当我想在浏览器中打开页面时出现此错误。

“/”应用程序中的服务器错误。值不能为空。参数名称:value 说明:当前web请求执行过程中发生了未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。

异常详细信息:System.ArgumentNullException:值不能为空。参数名称:值

源错误:

在执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪来识别有关异常起源和位置的信息。

堆栈跟踪:

[ArgumentNullException:值不能为空。参数名称:value]
System.Web.Caching.CacheEntry..ctor(String key, Object value, CacheDependency dependency, CacheItemRemovedCallback onRemovedHandler, DateTime utcAbsoluteExpiration, TimeSpan slipExpiration, CacheItemPriority priority, Boolean isPublic) +11691362
System.Web.Caching.CacheInternal. DoInsert(Boolean isPublic, String key, Object value, CacheDependency dependencies, DateTime utcAbsoluteExpiration, TimeSpan rollingExpiration, CacheItemPriority priority, CacheItemRemovedCallback onRemoveCallback, Boolean replace) +144 System.Web.Caching.Cache.Insert(String key, Object value) +110 URLRewriter .Config.RewriterConfiguration.GetConfig() +247
URLRewriter.ModuleRewriter.Rewrite(String requestedPath, HttpApplication app) +178
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

有什么想法可以解决这个问题或为什么会出现这个问题?

提前致谢

4

1 回答 1

0

It seems that you have an error in your .aspx file which is triggered when you launch this.DataBind() in your PageLoad().

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. After that you get ArgumentNullException.

Search your .aspx for the value and make sure that every instance of the owner is not null.

于 2013-09-19T12:46:43.187 回答