I am designing a WCF service that will return a response code (e.g. 0 for success or another number for errors). In addition, all web service methods will perform several general checks (e.g. apiKey authentication).
I am wondering if there is a best practice approach or organization and receipt of these response and message codes.
Thanks for any suggestions.
Ideally, do not use response codes. Return something useful on success (or void) and rule out an error on failure.
. , 99% , - . . . 2 , , , , 600 000 , -... , -, . - .
SO :
. , . - . FaultContract FaultException <T> . . .
Source: https://habr.com/ru/post/1764182/More articles:Does ASP.NET MVC 2.0 use exceptions to control flow? - asp.net-mvcDebugger improvements? - debuggingЕсть ли способ создать макрос препроцессора для функции? - c++ROR: best practices for large translation dictionaries - dictionaryCannot connect to remote mysql server - mysqlJ2EE: Singleton against keeping things in session - javaNSMutableString appendString generates SIGABRT - objective-cDo not modify the list, but still get a ConcurrentModificationException - javaКак несколько клиентов могут быть уведомлены о действиях отдельных пользователей? Веб-каналы - javascriptjqueryui datepicker появляется при каждом вызове диалога - jqueryAll Articles