命名的ScriptReference响应不再起作用 [英] scriptreference named respond no longer works

查看:436
本文介绍了命名的ScriptReference响应不再起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用:Visual Studio的前preSS 2013的Web编写.NET 4.5.1网站

Using: Visual Studio Express 2013 for Web to write a .NET 4.5.1 site.

项目最初建立在默认的创建新网站模板,因此有问题的部件是由IDE添加到我的项目,并没有被修改。

Project initially built on the default "Create New Website" template therefore the parts in question were added to my project by the IDE and have not been edited.

这一直是数周之久的项目,今天我开始就该收到错误出蓝色的为罐头项目在创建时添加。它已经无错工作到现在。

This has been a several weeks long project and today I began receiving an error out of the blue in relation to "canned" items added at create time. It has been working without error until now.

错误消息是:

Server Error in '/' Application.  

'respond' is not a valid script name.  The name must end in '.js'.

我已经调试这直接关系到这条线在我的Site.Master文件:

I have debugged this to be directly related to this line in my site.master file:

<asp:ScriptReference Name="respond" />

查看评论在这里此引用包含在我的主文件的部分:
    
        
        
    

SEE COMMENT HERE This reference is contained in the section of my master file:

这是更大的群体由IDE添加在创建时scriptreferences的一部分。

This is part of the much larger group of scriptreferences added by the IDE at create time.

在疑难解答我曾尝试加入.js文件;添加路径属性的实际文件;而且完全注释掉行了。

In troubleshooting I have tried adding the .js; add a path attribute to the actual file; and commented out the line entirely.

添加的延伸和/或路径的结果在不同的错误:

Adding the extension and/or the path results in a different error:

Server Error in '/' Application.

The assembly 'System.Web.Extensions, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' does not contain a Web resource that
has the name 'respond.js'. Make sure that the resource name is spelled correctly.

的唯一成功的故障排除已被注释掉吧但这打破了另一项关键功能:访问我的链接需要.aspx扩展现在的previously我可以访问我的链接,而无需指定的扩展我的文件...这是该项目通过IDE创建的默认方式,所以与此修复程序到位,没有我的链接,而不每一个编辑,包括和推广工作。 不理想

The only successful troubleshooting has been commenting it out BUT this breaks another key feature: Accessing my links requires the .ASPX extension now as previously I could access my links without specifying the extension on my file... and this is the default way the project was created via the ide, so with this fix in place, none of my links work without editing each and every one to include and extension. NOT IDEAL.

我一直使用包管理器来更新尝试,没有什么是成功的在那里。我也已经验证了respond.js文件存在于我的脚本文件夹中做其他人一样引导。

I've tried using the Package Manager to update and nothing has been successful there. I have also verified the respond.js file exists in my scripts folder as do the others like bootstrap.

我已经在这里搜查,一派相当长的一段时间,但也有包含来自摘录的ScriptManager这么多无关的结果,结果是无穷无尽的。

I have searched here and googled for quite some time but there are so many unrelated results that contain excerpts from the scriptmanager that the results are endless.

我不能确定需要为这个或其他文件都需要修正。重建我的网站有没有影响,我已经删除每一个职位,我读了说可能工作了不同但类似的问题。TEMP文件

I am unsure of the correction needed for this or if other files are required. Rebuilding my site has no effect, I've removed "temp" files per one post I read that said it might work for a different but similar issue.

什么是这个错误的纠正措施?

What is the corrective action for this error?

推荐答案

在文件的Site.Master找到行:

In Site.Master file locate the line:

<asp:ScriptReference Name="respond"/>

和修改为:

<asp:ScriptReference Name="respond" Assembly="System.Web.Extensions" />

这篇关于命名的ScriptReference响应不再起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆