脚本资源&网络资源错误
这是错误的图片:
这是我的 web.config 的副本:
<?xml version="1.0"?>
<configuration>
<connectionStrings>
<add name="BaseConnectionString" connectionString="Data Source=BRYAN-PC;Initial Catalog=Base;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="Data Source=BRYAN-PC;Initial Catalog=Base;Integrated Security=True"
cookieless="false"
timeout="500000"
/>
<httpRuntime requestValidationMode="2.0" />
<!-- Prevent excess code to clutter source -->
<pages buffer="true" validateRequest="true" enableViewState="true"/>
</system.web>
</configuration>
我很好奇为什么会发生这些错误。我唯一使用的 ajax 是 jsTree 插件,它最初没有显示这些错误。我设置了 jsTree 插件以使用 [System.Web.Services.WebMethod]
与后台代码进行交互。
任何人都可以阐明如何修复这些错误吗?代码或其功能没有被破坏,但这些错误清楚地表明我遗漏了一些东西。
如果有人需要更多信息,请告诉我。谢谢!
编辑:我忘了提及我在哪个页面并不重要。错误总是出现。
EDIT2:我什至根本没有使用任何 AJAX Toolkit 东西,所以我删除了它,ScriptResource 问题消失了,但我的 WebResource 问题没有消失。
Here is a picture of the errors:
Here is a copy of my web.config:
<?xml version="1.0"?>
<configuration>
<connectionStrings>
<add name="BaseConnectionString" connectionString="Data Source=BRYAN-PC;Initial Catalog=Base;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="Data Source=BRYAN-PC;Initial Catalog=Base;Integrated Security=True"
cookieless="false"
timeout="500000"
/>
<httpRuntime requestValidationMode="2.0" />
<!-- Prevent excess code to clutter source -->
<pages buffer="true" validateRequest="true" enableViewState="true"/>
</system.web>
</configuration>
I am curious as to why these errors are happening. The only ajax I have going on is the jsTree pluggin which originally wasn't showing these errors. I set up the jsTree plugin to use [System.Web.Services.WebMethod]
to talk to the code behind.
Can anyone shed some light on how to fix these errors? The code or it's functionality isn't broken but these errors clearly show that I am missing something.
IF anyone requires additional information, please let me know. Thanks!
EDIT: I forgot to mention that it didn't matter what page I was on. The errors shows up all the time.
EDIT2: I am not even using any AJAX Toolkit things at all so I removed it and the ScriptResource issues went away but not my WebResource Issues.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
WebResource 通常指向您在构建时嵌入到 dll 中的那些 JavaScript 文件?我将验证这些文件是否正确构建(您必须在属性窗口中将构建选项设置为“嵌入资源”)。
您还应该能够通过阅读错误行来找出它所抱怨的 javascript 文件。
WebResource normally point to those JavaScript files you embed in your dll when doing build? I will verify those files are built correctly (you have to set up build option in property window as "embed resource").
You should also be able to figure out which javascript file it's complaining by reading the error line.