So i'm trying to use The Exception Handling Application Block from the Enterprise Library, but i just can't figure out how to do this.
This is my code from my WCF project:
namespace TextWebService
{
[ServiceContract]
public interface ITextWebService
{
[OperationContract]
string ToLower(string inputString);
[OperationContract]
string ToUpper(string inputString);
}
}
...
using Microsoft.Practices.EnterpriseLibrary.ExceptionHandling;
namespace TextWebService
{
public class TextWebService : ITextWebService
{
public string ToLower(string inputString)
{
return inputString.ToLower();
}
public string ToUpper(string inputString)
{
return inputString.ToUpper();
}
}
}
The ASP.NEt that uses this service has a textbox and "Invoke Service Methods" button which transforms the input string like so:
Everytime when I input large text, I get this error:
I just want a simple example how can I prevent that error from showing, or modify it and use the exception handling application bloc. I tried a lot of examples, but just can't seem to get it. P.S. it must be done from WCF