C# Object to XML
C# Object to XML
JSON to Object
JSON Object to C# Object
Convert List of Variables to JSON
Note: Does NOT work with Azure Function. Create an C# object first and then pass the C# object.
.NET Web API Optional Parameter
int? <parametername> = null Optional parameters needs to be nullable type and initialized to null.
Stock API
https://finnhub.io/ https://www.alphavantage.co/ https://polygon.io/
Create a gRPC client and server in ASP.NET Core
Warning ASP.NET Core gRPC is not currently supported on Azure App Service or IIS. The HTTP/2 implementation of Http.Sys does not support HTTP response trailing headers which gRPC relies on. For more information, see this GitHub issue. Sources: Create a .NET Core gRPC client and server in ASP.NET Core | Microsoft Docs
.NET Web API Return JSON instead of XML
By default, Web API returns both XML and JSON depending the the client. You the specifically specify what format you return. Bounding WebAPI to send only json formatted data Now there are cases where we want our application to receive only JSON formatted data irrespective of the ACCEPT header value. To achieve this, add a... » read more
Web Api Help Pages
Setup Note: When setting up Web Api Help Pages, make sure to enable it in your app, else the description field will not work. Go to Areas\HelpPage\App_Start\HelpPageConfig.cs. Around line 36, you’ll want to make sure you uncommented the line as below: Go to Project=>Properties=>Build. Under Output, make sure the “XML documentation file” box is checked,... » read more
MaxReceivedMessageSize Error
Error: WCF Client returns the following error … System.ServiceModel.CommunicationException: The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element. Fix: Note: This is a client setting, not a server setting. For WCF Test Client Right Click on “Config File” ->... » read more