0

I built a project and I used a HoverMenuExtender on the page and for this I also added a ScriptManager on the page and my project is running successfully on my local system without any error but when I deploy it on the remote server then there is an error:

enter image description here

In my code I used ScriptManager below the form tag.

Arian Motamedi
  • 7,123
  • 10
  • 42
  • 82
chitrakant sahu
  • 211
  • 3
  • 8
  • 18

3 Answers3

1

I am sure you tried this already but just in case put your ScriptManager between the FORM tags, see what happens:

<form id="MyScriptManagerForm" runat="server">
    <asp:ScriptManager ID="MyScriptManager" runat="server" EnablePageMethods="true" >
        <Services>
            <asp:ServiceReference Path="~/WebServices/Tralalalalala.svc" />
        </Services>
    </asp:ScriptManager>
 </form>
Milan
  • 3,209
  • 1
  • 35
  • 46
  • This answer helped in a case I had today: strangely enough, there was no exception with the tag outside the form in dev and in debug builds - it occurred only on the production machine with a release build. – Cee McSharpface Mar 07 '16 at 09:20
0

It could be that the server your are deploying to does not have Ajax extensions installed. Depending on which version of Ajax you are using you can try to copy System.Web.Extensions.dll into your bin folder and deploy again.

user2315985
  • 2,848
  • 5
  • 17
  • 18
0

Use this in master page

<asp:ScriptManager ID="ScriptManager"   runat="server" />

Reference

Community
  • 1
  • 1
Amit
  • 15,217
  • 8
  • 46
  • 68
  • i have not used master page on my project but i used ScriptManager in each page where i used AjaxControl – chitrakant sahu May 16 '13 at 17:53
  • i tried it but it show error i.e. Control 'ScriptManager1' of type 'ScriptManager' must be placed inside a form tag with runat=server. 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.Web.HttpException: Control 'ScriptManager1' of type 'ScriptManager' must be placed inside a form tag with runat=server. plz give me another solution – chitrakant sahu May 17 '13 at 07:22
  • Please check my reference, it may useful to you. – Amit May 17 '13 at 07:31