Posts

Showing posts from January, 2019

The request body must contain the following parameter: 'client_secret or client_assertion'

Image
What type is the AAD registered Application in your case? If the clientId is from a "Server-side Web app", then specify an extra option -clientsercet. Otherwise register a "Native app" and use the clientid alone.

missing compiler required member 'microsoft.csharp.runtimebinder.binder.convert'

Image
To be able to compile you need to add a reference to   Microsoft.CSharp.dll . Follow the steps below: 1. Right click on references 2. Click on add reference and a modal with the left menu (assemblies, projects, COM and browse) will appear. 3. Click Assemblies 4. Check Microsoft.CSharp and click Ok. 5. Clean and build your project and the error should disappear.  There you go!

Bring back restoring database in SqlServer

Image
If you see the database restoring as depicted in the figure below You can you the query below to solve the issue RESTORE DATABASE [Database Name]    WITH RECOVERY

Log into event viewer using c#

Image
T his code will write directly to the event log Application: //Reference using System.Diagnostics; //Program using (EventLog eventLog = new EventLog("Application")) {    eventLog.Source = "Application";    eventLog.WriteEntry("Your Message", EventLogEntryType.Information, 101, 1); } Figure below depicts the event viewer log: