Why do I get the following server exception (500 response) when calling GetResponse() (HttpWebRequest) on a page with a WebDatePicker on it?
Exception information: Exception type: FormatException Exception message: 'auto' cannot be parsed as a unit as there are no numeric values in it. Examples of valid unit strings are '1px' and '.5in'. at System.Web.UI.WebControls.Unit..ctor(String value, CultureInfo culture, UnitType defaultType) at System.Web.UI.Html32TextWriter.ConvertToHtmlSize(String value) at System.Web.UI.Html32TextWriter.OnStyleAttributeRender(String name, String value, HtmlTextWriterStyle key) at System.Web.UI.HtmlTextWriter.FilterAttributes() at System.Web.UI.HtmlTextWriter.RenderBeginTag(HtmlTextWriterTag tagKey) at System.Web.UI.Html32TextWriter.RenderBeginTag(HtmlTextWriterTag tagKey) at Infragistics.Web.UI.EditorControls.TextEditorRenderer.RenderButton(HtmlTextWriter writer, Int32 type, String css) at Infragistics.Web.UI.EditorControls.TextEditorRenderer.RenderTableControl(HtmlTextWriter writer) at Infragistics.Web.UI.EditorControls.TextEditorRenderer.RenderContents(HtmlTextWriter writer) at Infragistics.Web.UI.Framework.RunBot.HandleRenderContents(HtmlTextWriter writer, RendererBase renderer) at Infragistics.Web.UI.Framework.ControlMain.RenderContents(HtmlTextWriter writer) at Infragistics.Web.UI.Framework.ControlMain.Render(HtmlTextWriter writer) at Infragistics.Web.UI.EditorControls.WebTextEditor.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Control.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.UpdatePanel.RenderChildren(HtmlTextWriter writer) at System.Web.UI.UpdatePanel.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Page.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Hello FireStorm12,
Can you tell me what version and what build is the “WebDatePicker” control that you use in your application?
Also where in your code (in what event) do you call “GetResponse()” method?
If you can send me a simple example or code snippet that can allow me to reproduce this behavior it will be very useful in quickly identifying the cause of this exception.
I am looking forward to hearing from you.
Infragistics4.Web.v11.1, Version=11.1.20111.1006
I call GetResonse() from a separate WinForms application that I use to poll various web applications to determine their status. The code is essentially this:
// Create a HttpWebRequest to check for response
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create("http://" + url);
webRequest.Timeout = Constants.ResponseTimout;
webRequest.Credentials = CredentialCache.DefaultCredentials;
NetworkCredential nc = CredentialCache.DefaultNetworkCredentials;
WebProxy proxy = new WebProxy("http://" + url);
proxy.Credentials = nc;
webRequest.Proxy = proxy;
try
{
using(HttpWebResponse resp = (HttpWebResponse)webRequest.GetResponse())
if(resp.StatusCode == HttpStatusCode.OK)
return true;
else
return false;
}
catch(Exception e2)
LogError(string.Format("*** ERROR CHECKING APP FOR RESPONSE ***{0}{1}{0}",
CRLF, e2.Message), e2);
Can you answer the following questions:
Do you have other controls on this page?
If you remove the "WebDatePicker" control does this exception still occur or it is not present?
Are you able to load other pages with this code and does the page tested can be opened with the browser?
Does the page uploaded on remote Server or tested on Development Server?
I am waiting for your response.
We would love a response to msoft001's question, and to the issue in general!
Hello !
We have the same error when opening page on iPad native application "uiwebview" with WebDatePicker on it.. problem is that dropdown button renders style with "height:auto":
<input type="hidden" id="txtStartDate_clientState" name="txtStartDate_clientState" /><table title="{0}" id="txtStartDate" class="igte_EditWithButtons" cellspacing="0" cellpadding="0" border="0" style="height:18px;width:150px;"> <tr> <td class="igte_Inner" valign="top"><input readonly="readonly" id="x:264563936.0:mkr:3" class="igte_EditInContainer" type="text" value="01.10.2012" style="ime-mode:disabled;padding:0px;float:left;height:100%;width:98%;" /></td><td id="x:264563936.1:mkr:2" align="center" valign="middle" class="igte_Button igte_ButtonSize" style="height:auto;line-height:1px;font-size:1px;"><img class="igte_ButtonImg" src="../ig_res/Default/images/igte_custom.gif" alt="Drop Down Calendar" /></td> </tr> </table>
If I hide the button with property: Buttons-CustomButtonDisplay="None" then button page opens on iPad, button is not visible but I can not select any date.
When I click on webdatepicker, keyboard is not opening :-/
Is there any possiblity to remove property "height:auto" that is set on webdatepicker button ?
I have created support case in your behalf with number – "CAS-72082-L22XNW".
You can access your case from "My IG > My Support Activity" section in our Web Site (you must Log In first). You can use this support case to send and receive progress updates, samples and any additional information that can be helpful in resolving your issue.
Thank you for choosing Infragistics.
1) There are two WebDatePickers, a couple of standard buttons and text boxes, and a Crystal Reports viewer.
2) I have not tried removing the WebDatePickers.
3) The code is part of a home-grown application monitor that we have been using for years. This is the only application with the problem.
4) The page opens and functions normally in a web browser.