Custom FormsControl JavaScript error

Posted by Community Admin on 04-Aug-2018 13:15

Custom FormsControl JavaScript error

All Replies

Posted by Community Admin on 14-Jan-2015 00:00

High Level Problem:

Bug in SF 7.1 prevented FormControls extension

Solution: This article was great! And (mostly) solved the issue.

www.sitefinity.com/.../custom-formscontrol-javascript-error-in-sitefinity-7.1

 New Problem:

 However, on pages where the master page includes an <asp:ScriptManager ID="xxxxx" runat="sever" /> tag, control will not load.

Question: What is the proper way to load the script when the ScriptManager is in the .master file?

Thank you in advance, for your time.

Error Received:

Assembly 'SitefinityWebApp, Version=7.1.5200.0,
Culture=neutral, PublicKeyToken=null' does not contain a Web resource
with name
'SitefinityWebApp.Custom.FormsEnhancements.FormsNotification.js'.

[InvalidOperationException: Assembly 'SitefinityWebApp, Version=7.1.5200.0, Culture=neutral, PublicKeyToken=null' does not contain a Web resource with name 'SitefinityWebApp.Custom.FormsEnhancements.FormsNotification.js'.]
System.Web.UI.WebResourceUtil.VerifyAssemblyContainsReleaseWebResource(Assembly assembly, String releaseResourceName, Assembly currentAjaxAssembly) +429434
System.Web.UI.ScriptReference.ShouldUseDebugScript(String releaseName, Assembly assembly, Boolean isDebuggingEnabled, Assembly currentAjaxAssembly) +86
System.Web.UI.ScriptReference.DetermineResourceNameAndAssembly(ScriptManager scriptManager, Boolean isDebuggingEnabled, String& resourceName, Assembly& assembly) +95
System.Web.UI.ScriptReference.GetUrlFromName(ScriptManager scriptManager, IControl scriptManagerControl, Boolean zip, Boolean useCdnPath) +103
System.Web.UI.ScriptReference.GetUrlInternal(ScriptManager scriptManager, Boolean zip, Boolean useCdnPath) +601
System.Web.UI.ScriptReference.GetUrl(ScriptManager scriptManager, Boolean zip) +195
System.Web.UI.ScriptManager.RegisterUniqueScripts(List`1 uniqueScripts) +194
System.Web.UI.ScriptManager.RegisterScripts() +467
System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e) +122
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Page.OnPreRenderComplete(EventArgs e) +121
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1155

Posted by Community Admin on 19-Jan-2015 00:00
Hello Stephen,

Please make sure that the .js file's Build action is set to embedded resource. Additionally have you tried to to register it in the AssemblyInfo.cs? 

http://stackoverflow.com/questions/1669630/ajax-assembly-error-assembly-0-does-not-contain-a-web-resource-with-name-1

Regards,
Pavel Benov
Telerik
 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 
Posted by Community Admin on 19-Jan-2015 00:00

Pavel -

 

Thank you. The AssembyInfo solution was in fact what I needed.  (I had already ensured it was an embedded resource).

 

This thread is closed