skip to Main Content

I’m new to this site and a rookie asp.net. I want to create a simple, personal login website so I got VSExpress 2013 and used the template that came with it. I followed some asp.net tutorials to make it work for me and when I build and run it on my pc in VS, no problems. When I deploy it to the host server (godaddy, Plesk).. I get the error:

[InvalidOperationException: 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'. Make sure that the resource name is spelled correctly.]
   System.Web.UI.WebResourceUtil.VerifyAssemblyContainsReleaseWebResource(Assembly assembly, String releaseResourceName, Assembly currentAjaxAssembly) +292
   System.Web.UI.ScriptReference.ShouldUseDebugScript(String releaseName, Assembly assembly, Boolean isDebuggingEnabled, Assembly currentAjaxAssembly) +89
   System.Web.UI.ScriptReference.DetermineResourceNameAndAssembly(ScriptManager scriptManager, Boolean isDebuggingEnabled, String& resourceName, Assembly& assembly) +97
   System.Web.UI.ScriptReference.GetUrlFromName(ScriptManager scriptManager, IControl scriptManagerControl, Boolean zip, Boolean useCdnPath) +104
   System.Web.UI.ScriptReference.GetUrlInternal(ScriptManager scriptManager, Boolean zip, Boolean useCdnPath) +603
   System.Web.UI.ScriptReference.GetUrl(ScriptManager scriptManager, Boolean zip) +182
   System.Web.UI.ScriptManager.RegisterUniqueScripts(List`1 uniqueScripts) +204
   System.Web.UI.ScriptManager.RegisterScripts() +465
   System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e) +124
   System.Web.UI.Page.OnPreRenderComplete(EventArgs e) +121
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1155

The only code I can find that relates to ‘respond’ is:

In BundleConfig:

{
    Path = "~/Scripts/respond.min.js",
    DebugPath = "~/Scripts/respond.js",
}

In Site.Master

<asp:ScriptReference Name="respond" />

I also tried

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

from a post I found, but did not work. I also tried adding respond.js to the code above suggested from the same post but did not work.

For all the searching I’ve done there has been nothing that makes sense as a solution. So, I plea to you experts for some advise/tips. I’m not sure what files you would like to see so let me know..

3

Answers


  1. This problem goes away if the files already hosted on the server are deleted and then a fresh publishing of the site is done. The deletion should include folders including scripts, bin, etc. and all the files and folders that are uploaded when a new version upload for the site done.

    Login or Signup to reply.
  2. I found that I got this error when I switched my project from .Net 4.6.1 down to 4.6, and had to remove those lines from the bundle.config. Not sure if this will help you or not.

    Login or Signup to reply.
  3. //When you are referencing to the external JavaScript file, you should use some ways to make it consumable for .Net assembly to use JavaScript file that you found in HTML Template.
    .
    .
    you can use this method

    <asp:ScriptMAnager>
    <Scripts>
      <asp:ScriptReference Path="~/yourfile route/ *.js"/>
    <Scripts>
    

    enter image description here

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search