I am developping an asp.net application. When an user clicks on a button, he calls a webservice passing also the parameter he has before entered in a textfield. When the webservice returns no results, it displays a popup, everything works well in local, but when I deploy my application on my windows server, the pop up is not displayed. This is my code:
if (!string.IsNullOrEmpty(textbox.text))
{
try
{
//webservice call
string result = webservice.function(textbox.text);
}
catch (SoapException ex)
{
Utils.Log_File(ex.Message);
Utils.Log_File(ex.StackTrace);
string message = ex.Message;
//this popup is not working on the deployed application
Page.ClientScript.RegisterClientScriptBlock(GetType(), "error from code behind", string.Format("alert('{0}')", message), true);
}
}
I debug my code from client side in chrome to see the error. When I debug the localhost everything works well, the popup from soapexception is displayed with this message '[E_E1] [Parameter NotFound]'
When I debug the server app, I am getting this error in chrome console :
<script type="text/javascript">
//<![CDATA[
alert('System.Web.Services.Protocols.SoapException: [E_E1] [Parameter NotFound]
[uncaught syntaxerror unexpected token illegal]
....