Sharepoint Web 部件由于 Resources.en-US.resx 文件而停止工作
我一直在开发一个 Sharepoint Web 部件,该部件在部署时运行良好。 Web 部件是使用 WSP Builder 开发的,打包然后通过 stsadm 部署。 Web 部件已部署到开发箱数十次(甚至一百次),没有出现任何问题。 现在,Web 部件会抛出一个错误,该错误会破坏其所在的页面:
对象引用未设置为 对象的实例。 描述: 期间发生未处理的异常 当前网络的执行 要求。 请检查堆栈跟踪 有关错误的更多信息 以及它在代码中的起源。
异常详细信息: System.NullReferenceException:对象 未设置对实例的引用 对象。
来源错误:
生成了未处理的异常 当前执行期间 网络请求。 有关信息 异常的起源和地点 可以使用异常来识别 下面的堆栈跟踪。
堆栈跟踪:
[NullReferenceException:对象 未设置对实例的引用 对象。]
NYCIRB.DMS.WebParts.SearchUpload.SearchUpload.HandleException(异常 例如) +62
NYCIRB.DMS.WebParts.SearchUpload.SearchUpload.OnLoad(EventArgs e) +214
System.Web.UI.Control.LoadRecursive() +50 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Page.ProcessRequestMain(布尔值 includeStagesBeforeAsyncPoint,布尔值 includeStagesAfterAsyncPoint) +627
在查看 Sharepoint 日志时,我发现这些错误一遍又一遍地重复,对应于尝试加载 Web 部件的时间:
01/19/2009 10:53:14.43 w3wp.exe (0x05E0)
0x00FC Windows SharePoint 服务
一般
72公斤高(#2:打不开 “Resources.en-US.resx”:没有这样的文件 或文件夹。) 01/19/2009 10:53:14.43 w3wp.exe (0x05E0)
0x00FC Windows SharePoint 服务
一般
8e26 中打开失败 语言资源 Fea367b94a9-4a15-42ba-b4a2-32420363e018 密钥文件资源。 2009年1月19日 10:53:17.55 w3wp.exe (0x05E0)
0x00FC Windows SharePoint 服务
一般
8e25 中 查找失败 带有键“XomlUrl”的字符串,密钥文件 核。 01/19/2009 10:53:17.55 w3wp.exe (0x05E0)
0x00FC Windows SharePoint 服务
一般
8l3c 中 本地化资源 找不到标记“XomlUrl” 文件路径:“C:\Program 文件\公用文件\微软 共享\Web 服务器 Extensions\12\Template\Features\Fields\fieldswss.xml"。
01/19/2009 10:53:17.55 w3wp.exe (0x05E0)
0x00FC Windows SharePoint 服务
一般
8e25 中 查找失败 带有键“RulesUrl”的字符串,密钥文件 核。 01/19/2009 10:53:17.55 w3wp.exe (0x05E0)
0x00FC Windows SharePoint 服务
一般
8l3c 中 本地化资源 无法找到令牌“RulesUrl” 对于路径为:“C:\Program 文件\公用文件\微软 共享\Web 服务器 Extensions\12\Template\Features\Fields\fieldswss.xml”。
我已通过解决方案管理手动撤回了 Web 部件,通过 stsadm 撤回,检查了资源文件是否存在,但无处可寻。我是几乎不知道为什么会发生这种情况或如何解决它。
I've been developing a Sharepoint web part, which had been working fine upon deployment. The web part has been developed with WSP Builder, packaged up and then deployed via stsadm. The web part has been deployed tens, if not a hundred times to the dev box with no problems. Now, the web part throws an error which breaks the page it's on:
Object reference not set to an
instance of an object. 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.NullReferenceException: Object
reference not set to an instance of an
object.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:
[NullReferenceException: Object
reference not set to an instance of an
object.]
NYCIRB.DMS.WebParts.SearchUpload.SearchUpload.HandleException(Exception
ex) +62
NYCIRB.DMS.WebParts.SearchUpload.SearchUpload.OnLoad(EventArgs
e) +214
System.Web.UI.Control.LoadRecursive()
+50 System.Web.UI.Control.LoadRecursive()
+141 System.Web.UI.Control.LoadRecursive()
+141 System.Web.UI.Control.LoadRecursive()
+141 System.Web.UI.Control.LoadRecursive()
+141 System.Web.UI.Control.LoadRecursive()
+141 System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean
includeStagesAfterAsyncPoint) +627
When looking through my Sharepoint logs, I find these errors repeated over and over which correspond to the time the web part was attempted to be loaded:
01/19/2009 10:53:14.43 w3wp.exe
(0x05E0)
0x00FC Windows SharePoint Services
General
72kg High (#2: Cannot open
"Resources.en-US.resx": no such file
or folder.) 01/19/2009 10:53:14.43
w3wp.exe (0x05E0)
0x00FC Windows SharePoint Services
General
8e26 Medium Failed to open the
language resource for
Fea367b94a9-4a15-42ba-b4a2-32420363e018
keyfile Resources. 01/19/2009
10:53:17.55 w3wp.exe (0x05E0)
0x00FC Windows SharePoint Services
General
8e25 Medium Failed to look up
string with key "XomlUrl", keyfile
core. 01/19/2009 10:53:17.55
w3wp.exe (0x05E0)
0x00FC Windows SharePoint Services
General
8l3c Medium Localized resource for
token 'XomlUrl' could not be found for
file with path: "C:\Program
Files\Common Files\Microsoft
Shared\Web Server
Extensions\12\Template\Features\Fields\fieldswss.xml".
01/19/2009 10:53:17.55 w3wp.exe
(0x05E0)
0x00FC Windows SharePoint Services
General
8e25 Medium Failed to look up
string with key "RulesUrl", keyfile
core. 01/19/2009 10:53:17.55
w3wp.exe (0x05E0)
0x00FC Windows SharePoint Services
General
8l3c Medium Localized resource for
token 'RulesUrl' could not be found
for file with path: "C:\Program
Files\Common Files\Microsoft
Shared\Web Server
Extensions\12\Template\Features\Fields\fieldswss.xml".
I've retracted the web part manually through Solution Management, retracted through stsadm, checked for the existence of the resource file, which is nowhere to be found. I'm pretty much at a loss to why this happened or how to resolve it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试确保所有资源文件包含所有行。 在经典的 aspx 中,如果您有 resources.resx 和 resources.en-us.resx 并且第二个不包含某些条目,框架会自动查找默认文件并提供默认翻译。 遗憾的是,它在 MOSS 中不起作用。
try to meke sure that all your resource files contain all rows. In classic aspx if you have resources.resx and resources.en-us.resx and the second doesn't contain some entry, framework automatically looks into default file and serves default translation. It doesn't work like this in MOSS sadly.