I had the classic situation where my site worked on the dev box, but not on the server. Dropdowns populated with data would not post back to the server. You'd choose an option and nothing would happen other than a page blink.
The server is 2008 R2 fully patched with .net 4.5 installed. The site has its own IP, not using default site in IIS. The page that was not working was default.aspx. IIS was set to use that as default, just like out of the box.
So, I made a test page called test.aspx that just had a simple dropdown box set to autopostback. When it changed value, the dropbox would be set to visible=false. I just wanted to prove the postback was happening.
When I went to the site by http://sitename.com/test.aspx it worked!
So I set it to be the default page in IIS.
When I went to the site by http://sitename.com my test page did not work. It would blink when I chose a different value, but the box did not disappear.
So I went to the site directly again by http://sitename.com/test.aspx and it worked again!
Basically, the ajax is not working if the page name is not directly specified and you arrive by it being the default page in IIS.
Sample code:
The server is 2008 R2 fully patched with .net 4.5 installed. The site has its own IP, not using default site in IIS. The page that was not working was default.aspx. IIS was set to use that as default, just like out of the box.
So, I made a test page called test.aspx that just had a simple dropdown box set to autopostback. When it changed value, the dropbox would be set to visible=false. I just wanted to prove the postback was happening.
When I went to the site by http://sitename.com/test.aspx it worked!
So I set it to be the default page in IIS.
When I went to the site by http://sitename.com my test page did not work. It would blink when I chose a different value, but the box did not disappear.
So I went to the site directly again by http://sitename.com/test.aspx and it worked again!
Basically, the ajax is not working if the page name is not directly specified and you arrive by it being the default page in IIS.
Sample code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Test" %>
<!DOCTYPE html>
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
div
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
>
<
Scripts
>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.Core.js"
/>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.jQuery.js"
/>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.jQueryInclude.js"
/>
</
Scripts
>
</
telerik:RadScriptManager
>
</
div
>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
</
telerik:RadAjaxManager
>
<
br
/>
<
br
/>
<
asp:DropDownList
ID
=
"DropDownList1"
runat
=
"server"
AutoPostBack
=
"True"
OnSelectedIndexChanged
=
"DropDownList1_SelectedIndexChanged"
>
<
asp:ListItem
>test</
asp:ListItem
>
<
asp:ListItem
Value
=
"1"
>test1</
asp:ListItem
>
</
asp:DropDownList
>
</
form
>
<
br
/>
<
br
/>
</
body
>
</
html
>