How to implement TDD in ASP.NET WebForms

Microsoft introduced ASP.NET MVC because they thought they could make money from an untapped market – those who feel that Web Forms are too “heavyweight”, and who are programming using a lighter-weight framework. This includes those who are accustomed to the MVC paradigm. It also includes those who couldn’t figure out how to do unit … Read more

Differences between ASP.NET Web Application (.NET Framework) vs ASP.NET Core Web Application (.NET Framework)

Option 1 – ASP.NET Web Application Option 3 – ASP.NET Core Web Application Although both project templates use Full .Net Framework, Option 1 is for creating projects using legacy version of ASP.NET MVC in which we can use Global.asax. Option 3 is totally new concept in which wwwroot folder, using task runners and everything is … Read more

You do not have permission to access the IIS configuration file – Web app error

I was able to solve this issue doing the following: 1- Go to C:\Windows\System32\inetsrv and double click on directory config and accept the warning message. 2- Go to C:\Windows\System32\inetsrv\config directory and double click on directory Export and accept the warning message. Then you will be able to run the app in your local IIS without … Read more

How to force Visual Studio to re-create the SSL certificate for a .NET Core Web Application running Kestrel?

I finally figured it out. For anyone else who runs into this, the steps to fix it are: All localhost certificates must be deleted in certificate manager. They can be found in Personal and Trusted Root The secrets.json file must be deleted. This can be found in \Users\[user]\AppData\Roaming\Microsoft\UserSecrets\ In powershell, re-run dotnet dev-certs https –trust … Read more

VS2017 Could not load file or assembly Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll or one of its dependencies

I had a similar issue (with the additional message The “BuildShadowTask” task failed unexpectedly) with a project originally developed with VS2010, and got to spend the last few hours learning about yet another legacy facet of the build process. There is a good chance that you are dealing with private accessor files (.accessor), which were … Read more

Creating Reports in ASP.Net with Entity Framework

Below is a quick sample of how i set the report datasource in one of my .NET winForms applications. public void getMyReportData() { using (myEntityDataModel v = new myEntityDataModel()) { var reportQuery = (from r in v.myTable select new { l.ID, l.LeaveApplicationDate, l.EmployeeNumber, l.EmployeeName, l.StartDate, l.EndDate, l.Supervisor, l.Department, l.Col1, l.Col2, ……., ……., l.Address }).ToList(); reportViewer1.LocalReport.DataSources.Clear(); … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)