Website and Service communication
HoneyMG
1
Reputation point
Hello!I have website which upload a file to service and then it checks header information. I want on the website to have label with error message if the file doesn`t have that header information. I decided to try with Soap exception. This is my code on web service:
try
{
if ((RFile.CheckHeaderValue(FullFilePath, "value1")
|| (RFile.CheckHeaderValue(FullFilePath,"value2")))
{
throw new SoapException("Please select value1 or value2",
SoapException.ClientFaultCode);
}
}
catch (SoapException ex)
{
throw ex;
}
Code from the website:
if (userID != null)
{
try
{
client.ScheduleJob(userProject.SelectedItem.Text,false,FullPath)
}
catch (SoapException ex)
{
string exp = ex.Message;
Label1.Text=exp;
}
}
When I debug it does catch the exception BUT on the service. On the website it doesn`t. Do you have any idea why? Or if someone have any idea how i can get response from service?
Thank you