ASP.NET: IIS & Caching

In particular, the following resources were targeted to troubleshoot IIS 6 and caching in older systems.  You’re probably NOT a web admin if you’re reading this blog so don’t flush or kill anything without permissions.  

IIS RESET VS APP POOL RECYCLE

.NET: ASP.NET CORE 2.0

After a long patient wait, it has finally happened – I’m using ASP.NET CORE 2.0 on all my new projects at work and converting some of my old.   I’m very excited!

Why is this an important advancement for us Microsoft developers?   Simply put,  I can now write applications that will run cross-platform.   And I can do it easily.  I’m not so limited to operating systems or mobile vs. Desktop.  I can keep writing in my favorite flavor – C# — but I also get to stretch out my JavaScript muscles.   I can run Visual Studio on my Windows PC, my Mac, or my Linux box In fact, though Visual Studio makes life easier and faster, I don’t really even need it.   

I can download the .NET CORE SDK on either OS and I am ready to go.  I can use the same templates used in Visual Studio but just initialize them via the command prompt.  Code can be built and ran from this same prompt.  I can edit the code via any text editor.   To make it sweeter; however, downloading the free editor – Visual Studio Code – I can also walk through code and debug!    

I know, it’s been around a while, but in the corporate world, I’ve gotten started earlier than allot of folks.  I cannot say what this does to my efforts at continuous delivery – I actually started to think that I might permanently end up in the Java world without choice. 

You can read about ASP.NET CORE here!

.NET : Adding custom ASP.NET WebApi Help Page

1.  Add annotations to model, controller, etc. using System.ComponentModel.DataAnnotations
2.  Navigate to project “Properties” –> “Build” –> Output
3.  Check “XML Documentation file:”, then type in a name for the help document xml, and save
4.  In the solution, navigate to “Areas” –> “App_Start” –> “HelpPageConfig.cs”
5.  Uncomment the “config.SetDocumentationProvider…” line, add your created name for the help document xml, and save:
config.SetDocumentationProvider(new XmlDocumentationProvider(HttpContext.Current.Server.MapPath(“~/App_Data/DevOpsTaskHelp.XML”)));
6.  Build solution, navigate to help page “API”, and your annotations should be present.

Adding XML WebApi Comments To Swagger:
1.  Install-Package “Swashbuckle”
2.  Open the “SwaggerConfig.cs” file and uncomment the following line:
c.IncludeXmlComments(GetXmlCommentsPath());
3.  Generate method for “GetXmlCommentsPath()”
private static string GetXmlCommentsPath()
        {
            return System.String.Format(@”{0}binDevOpsTaskHelp.XML”, System.AppDomain.CurrentDomain.BaseDirectory);
        }

REFERENCE(S):
https://docs.microsoft.com/en-us/aspnet/web-api/overview/getting-started-with-aspnet-web-api/creating-api-help-pages
https://blogs.msdn.microsoft.com/yaohuang1/2012/09/30/asp-net-web-api-help-page-part-1-basic-help-page-customizations/