2016-06-20 29 views
1

Server Error in '/' Application.迴應是不是一個有效的腳本名稱,該名稱必須以.js文件

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

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.InvalidOperationException: 'respond' is not a valid script name. The name must end in '.js'.

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:

[InvalidOperationException: 'respond' is not a valid script name. The name must end in '.js'.] System.Web.UI.ScriptReference.GetDebugName(String releaseName) +140 System.Web.UI.ScriptReference.ShouldUseDebugScript(String releaseName, Assembly assembly, Boolean isDebuggingEnabled, Assembly currentAjaxAssembly) +48 System.Web.UI.ScriptReference.DetermineResourceNameAndAssembly(ScriptManager scriptManager, Boolean isDebuggingEnabled, String& resourceName, Assembly& assembly) +106 System.Web.UI.ScriptReference.GetUrlFromName(ScriptManager scriptManager, IControl scriptManagerControl, Boolean zip, Boolean useCdnPath) +77 System.Web.UI.ScriptReference.GetUrlInternal(ScriptManager scriptManager, Boolean zip, Boolean useCdnPath) +370 System.Web.UI.ScriptReference.GetUrlInternal(ScriptManager scriptManager, Boolean zip) +61 System.Web.UI.ScriptReference.GetUrl(ScriptManager scriptManager, Boolean zip) +123 System.Web.UI.ScriptManager.RegisterUniqueScripts(List`1 uniqueScripts) +167 System.Web.UI.ScriptManager.RegisterScripts() +405 System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e) +145 System.Web.UI.Page.OnPreRenderComplete(EventArgs e) +9753946 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5054

結束,我不知道在哪裏甚至開始尋找這個錯誤 的原因發生在我在VS2015調試我的ASP.NET Web應用程序。

它似乎發生了,如果我刪除Global.asax類,因爲在此之前,它可以在本地工作,但不會在部署到網絡時,當它引發類型歧義錯誤。 我現在已經重新加了Global.asax這個班,但無濟於事。

回答

2

加入

 RouteConfig.RegisterRoutes(RouteTable.Routes); 
     BundleConfig.RegisterBundles(BundleTable.Bundles); 

global.asax後,它的再次合作。

相關問題