ASP.NET Core and Windows Authentication

Just a reminder of how to configure ASP.NET Core and Windows Authentication

1. Configure IIS

2. Go to properties folder, file launchSettings.json and modify

"iisSettings": {     "windowsAuthentication": true,     "anonymousAuthentication": false,    //other data

3. When you compile and run , the Web.Config will be modified for forwardWindowsAuthToken :

<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" forwardWindowsAuthToken="true" stdoutLogEnabled="false" />

spot errors in VB

Please spot the errors in the following code in VB.NET:

Dim Diff As String = con.ExecuteCommand(“SELECT DATEDIFF(Day, (select [date] from table where Username = ‘” + txtUserName.Text + “‘), ‘” & DateTime.Now.ToString() & “‘)”)
If (Diff > 30) Then
End If


( find at least 3…)

Side note:

No wonder Visual Basic has died ( more or less). Guess future of server javascript ….

Generating Visual Studio solution( or project) references

A Visual Studio pacakge is a plugin of Visual Studio that can do (almost) anything inside Visual Studio

I have made a small project that generates a list of all solution ( or project) references from VS:


            foreach (var project in dte.Solution.Projects)
                var p = project as Project;
                if (p == null)

                var vsproject = p.Object as VSLangProj.VSProject;
                if (vsproject == null)

                string nameProject = p.Name;
                foreach (var reference in vsproject.References)
                    var r = reference as Reference;
                    if (r == null)

                    var pathRef = r.Path;

                    //this is a package                    
                    var pa = new PackageAdd();
                    pa.ProjectName = p.Name;
                    pa.IdentifierPackage = r.Identity;
                    pa.VersionPackage = r.Version;
                    pa.NamePackage = r.Name;


                    if (r.SourceProject != null)
                        pa.NamePackage = r.SourceProject.Name;

You can find the solution at

Also the video is at


Thank you for all the API

In our days it is simpler to make an application by putting together some API . I wanted to make a list of all my 5 Minutes .NET playlist videos . First, I have tried to find an application(nothing). Then I have read  You Tube API from . With 2 http requests( one for retrieving all videos from a playlist, the other to find video details) and a NuGet package to export to Excel/Word/PDF/HTML it was simple. You can find the whole project at . A video demo at . And the whole list at