Update panel not working when deployed

ASP.net 3.5
VS 2008

I have a farly simpel updatepanel that displays a message while a process is run.

This works in my dev environment but not when I deploy to my test server.

The rendered source is here
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

	<html>
		<head><title>AuxFieldsCopy</title>

		<style type="text/css">
			.IE8Fix
			{
				z-index: 100;
			}
			</style>
		</head>
		
		<body bgcolor="#e1e8ff">
			<form name="aspnetForm" method="post" action="Default.aspx" id="aspnetForm">
				<div>
					<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
					<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
					<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE3MzAwNjQ3NzBkZNxpreNmeSHMATFz9ijBYgQxGEOB" />
				</div>

				<script type="text/javascript">
					//<![CDATA[
						var theForm = document.forms['aspnetForm'];
						if (!theForm) {
							theForm = document.aspnetForm;
						}

						function __doPostBack(eventTarget, eventArgument) {
							if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
								theForm.__EVENTTARGET.value = eventTarget;
								theForm.__EVENTARGUMENT.value = eventArgument;
								theForm.submit();
							}
						}
					//]]>
				</script>

				<script src="/AuxFieldsCopy/WebResource.axd?d=BXorplrtRI8jKKKbTrPpHQ2&amp;t=634008426268081153" type="text/javascript"></script>

				<script src="/AuxFieldsCopy/ScriptResource.axd?d=MrcZMpnU39RBH8JllHm4O9Fdq8ug3RFEjbCDn59HRnjLzq5Jno94IPxBeiCoF0K3r-8Iuog4nvoaUzXC3gy-rdAF175p2uv_DHlQLhU7xKE1&amp;t=ffffffff834486da" type="text/javascript"></script>

				<script type="text/javascript">
					//<![CDATA[
					if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client-side framework failed to load.');
					//]]>
				</script>

				<script src="/AuxFieldsCopy/ScriptResource.axd?d=MrcZMpnU39RBH8JllHm4O9Fdq8ug3RFEjbCDn59HRnjLzq5Jno94IPxBeiCoF0K3pxMzML3Y2mhcj0uO-Ekx9Ov0R2hy1COVLd9BIo60ebiV9_i9S3gKUEAUew29SxDt0&amp;t=ffffffff834486da" type="text/javascript"></script>
				
				<script src="/AuxFieldsCopy/WebResource.axd?d=9rjnnirny92jbhiV-rT1cw2&amp;t=634008426268081153" type="text/javascript"></script>

				<div>

					<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWAgLcwdbBAgKTj/PCCXLHxQbRprD2X63FZ9EXVRQBa0SB" />
				</div>

				<div id="CONTAINER">
					<script type="text/javascript">
						//<![CDATA[
						Sys.WebForms.PageRequestManager._initialize('ctl00$asm', document.getElementById('aspnetForm'));
						Sys.WebForms.PageRequestManager.getInstance()._updateControls(['tctl00$ContentPlaceHolder2$Panel'], [], [], 90);
						//]]>
					</script>

				<div id="TITLE">
					<table>
						<tr>
							<td style="width: 350px;">
								<img id="ctl00_Image1" src="2738.gif" style="border-width:0px;" />
							</td>
							<td>
								<h2>Auxilliary Fields Copy</h2>
							</td>
						</tr>
					</table>
					<table>
						<tr>
							<td>&nbsp;</td>
						</tr>
					</table>
				</div>

				<div id="MAIN">

					<div id="ctl00_ContentPlaceHolder2_Panel">

						<div id="ctl00_ContentPlaceHolder2_Panel1" style="height:425px;">

							<div id="ctl00_ContentPlaceHolder2_progress" style="display:none;">

								<div style="position: absolute; top: 350px;  left: 50px; padding-top: 10px;" align="center">
									<img src="ajax_busy.gif" style="padding-right: 3px; padding-left: 10px;" alt="" />
									
									<span id="ctl00_ContentPlaceHolder2_lblUpdate">Running update. Please wait...</span>
								</div>
							</div>

							<div style="position: absolute; top: 200px;  left: 50px;  height: 136px; width: 232px; background-color: #d1e8ff; z-index: 10;">

								<input type="submit" name="ctl00$ContentPlaceHolder2$btnRun" value="Run" onclick="document.getElementById('ctl00_ContentPlaceHolder2_lblUpdate').innerText = 'Copying Auxilliary Fields from Package header to package members. Please wait...';" id="ctl00_ContentPlaceHolder2_btnRun" style="position: absolute; top: 99px; left: 79px; width: 60px; height: 30px;" />

								<span id="ctl00_ContentPlaceHolder2_Label1" style="position: absolute; top: 20px; left: 15px; width: 202px; height: 65px;">Script to copy Auxilliary Fields from Package header to package members</span>

							</div>
						</div>
					</div>
				</div>
			</div>

			<script type="text/javascript">
				//<![CDATA[
				WebForm_AutoFocus('ctl00_ContentPlaceHolder2_btnRun');Sys.Application.initialize();
				Sys.Application.add_init(function() {
					$create(Sys.UI._UpdateProgress, {"associatedUpdatePanelId":null,"displayAfter":500,"dynamicLayout":true}, null, null, 		$get("ctl00_ContentPlaceHolder2_progress"));
				});
				//]]>
			</script>
		</form>
	</body>
</html>

Open in new window


I ran it in IE and got the following script error

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2; .NET CLR 1.1.4322; .NET4.0C; .NET4.0E)
Timestamp: Tue, 3 Apr 2012 10:51:07 UTC


Message: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500
Line: 4723
Char: 21
Code: 0
URI: http://thk01-dev-lon/AuxFieldsCopy/ScriptResource.axd?d=MrcZMpnU39RBH8JllHm4O9Fdq8ug3RFEjbCDn59HRnjLzq5Jno94IPxBeiCoF0K3r-8Iuog4nvoaUzXC3gy-rdAF175p2uv_DHlQLhU7xKE1&t=ffffffff834486da
                                            

Open in new window


Any suggestions?

TIA
LVL 13
Atdhe NuhiuAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Atdhe NuhiuConnect With a Mentor Author Commented:
Ok

I have just followed this http://msdn.microsoft.com/en-us/library/bb386580%28v=vs.90%29.aspx and deployed it on my server and everything works ok.

I will try and start from scratch with the one that does not work and see what happens
0
 
Imran Javed ZiaConnect With a Mentor Consultant Software Engineer - .NET ArchitectCommented:
Hi TIA,
There seems to be one of two issues:
First you web.config is not configured to support ajax on server as in our local machine we have ajax files registered in GAC or do not get authentication issues as we are using Vs web server (CASINY) on development machine. You may find following helpful in this context:
http://weblogs.asp.net/asptest/archive/2008/10/06/asp-net-ajax-and-http-handlers-a-cautionary-tale.aspx
http://www.asp.net/ajax/documentation/live/ConfiguringASPNETAJAX.aspx

alternatively you may find the following helpful,
http://weblogs.asp.net/leftslipper/archive/2007/02/26/sys-webforms-pagerequestmanagerparsererrorexception-what-it-is-and-how-to-avoid-it.aspx


For more details please provide information (version and etc) about iis and windows server.

Thanks
0
 
Atdhe NuhiuAuthor Commented:
Looked at the links but I did not find a solution

Windows server 2003 R2 iis 6.0
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Imran Javed ZiaConsultant Software Engineer - .NET ArchitectCommented:
Can you post your web config here?
0
 
Atdhe NuhiuAuthor Commented:
<?xml version="1.0"?>
<configuration>
	<configSections>
		<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
			<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
				<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
				<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
					<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
					<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
					<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
					<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
				</sectionGroup>
			</sectionGroup>
		</sectionGroup>
		<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
			<section name="AuxFieldsCopy.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
		</sectionGroup>
	</configSections>
	<appSettings/>
	<connectionStrings/>
	<system.web>
		<!-- 
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
        -->
		<compilation debug="true">
			<assemblies>
				<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
				<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
				<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
				<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
			</assemblies>
		</compilation>
		<!--
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
        -->
		<authentication mode="Windows"/>
		<!--
            The <customErrors> section enables configuration 
            of what to do if/when an unhandled error occurs 
            during the execution of a request. Specifically, 
            it enables developers to configure html error pages 
            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
		<pages>
			<controls>
				<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
				<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			</controls>
		</pages>
		<httpHandlers>
			<remove verb="*" path="*.asmx"/>
			<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
		</httpHandlers>
		<httpModules>
			<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
		</httpModules>
	</system.web>
	<system.codedom>
		<compilers>
			<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
				<providerOption name="CompilerVersion" value="v3.5"/>
				<providerOption name="WarnAsError" value="false"/>
			</compiler>
		</compilers>
	</system.codedom>
	<!-- 
        The system.webServer section is required for running ASP.NET AJAX under Internet
        Information Services 7.0.  It is not necessary for previous version of IIS.
    -->
	<system.webServer>
		<validation validateIntegratedModeConfiguration="false"/>
		<modules>
			<remove name="ScriptModule"/>
			<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
		</modules>
		<handlers>
			<remove name="WebServiceHandlerFactory-Integrated"/>
			<remove name="ScriptHandlerFactory"/>
			<remove name="ScriptHandlerFactoryAppServices"/>
			<remove name="ScriptResource"/>
			<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
		</handlers>
	</system.webServer>
	<runtime>
		<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
			<dependentAssembly>
				<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
				<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
			</dependentAssembly>
			<dependentAssembly>
				<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
				<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
			</dependentAssembly>
		</assemblyBinding>
	</runtime>
	<applicationSettings>
		<AuxFieldsCopy.Properties.Settings>
   <setting name="ConnectionString" serializeAs="String">
    <value>Data Source=server;Initial Catalog=db;Persist Security Info=True;User ID=user;Password=pswd;Connection Timeout=720</value>
   </setting>
   <setting name="Command" serializeAs="String">
    <value>PopulateAuxFields</value>
   </setting>
   <setting name="LogFile" serializeAs="String">
    <value>C:\AuxFieldsLog.txt</value>
   </setting>
  </AuxFieldsCopy.Properties.Settings>
	</applicationSettings>
</configuration>

Open in new window

0
 
Imran Javed ZiaConnect With a Mentor Consultant Software Engineer - .NET ArchitectCommented:
Just make sure that ajax related dll are in your bin file on server.
0
 
Atdhe NuhiuAuthor Commented:
AjaxControlToolkit.dll is in the bin directory
0
 
Imran Javed ZiaConnect With a Mentor Consultant Software Engineer - .NET ArchitectCommented:
Just create a new web site with ajax enabled and on default page just add an updateplanel and in this panel add a button and a label or text box. on post back change value of label to verify if it is working fine or not.

now deploy this test site on the server and check if it is working fine or not.
0
 
Atdhe NuhiuAuthor Commented:
Just create a new web site with ajax enabled

Not sure I know what you mean by this. Maybe I am missing something
0
 
Imran Javed ZiaConsultant Software Engineer - .NET ArchitectCommented:
if this site is working fine and there is no error when deployed on server?
0
 
Atdhe NuhiuAuthor Commented:
Well I started from scratch and got it working. I still don't know what was wrong with my initial effort but there you go.

Thakns
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.