• NullReferenceException with more informations (Propertyname)

    Hey, this week I saw this exception in Visual Studio 2017 (15.3.5): I was wondering when VS got the feature to display the property(getter) which caused the exception. Think the feature is new to VS. If anybody knows when this feature was added to VS, please comment below. :)
    Posted to Holger's Blog (Weblog) by Holger Vetter on 10-17-2017
  • Swagger IncludeXmlComments PlatformServices (obsolete) replacement

    We migrated a project to ASP.NET Core 2 (preview) and needed to configure swagger. In ASP.NET Core v1 we used this code to load the auto generated xml file into swagger: services.ConfigureSwaggerGen(options => { //Determine base path for the application. var basePath = PlatformServices.Default.Application.ApplicationBasePath; //Set the comments path
    Posted to Holger's Blog (Weblog) by Holger Vetter on 06-30-2017
  • Include XML documentation in ASP.NET Core publish

    I am using the auto generated XML file in Swagger. On my dev machine everything worked fine, but after publish the file was gone. This can result in an application crash on startup if you are not checking if the file exists before handing the filepath over to swagger. At the moment there is no UI for adding the XML to the publish output. I searched
    Posted to Holger's Blog (Weblog) by Holger Vetter on 05-15-2017
  • Graceful Shutdown Azure WebJobs using SDK functions

    When writing Microsoft Azure WebJobs maybe you ask yourself how to detect that the App Service hosting your webjob is shutting down. Earlier you would do something like this: As stated there you could create a FileWatcher on the file returned by " Environment.GetEnvironmentVariable
    Posted to Holger's Blog (Weblog) by Holger Vetter on 01-31-2017
  • VSO azure deployment - Unable to retrieve connectiondetails

    When deploying your application via visual studio online build process and using the "Azure App Service Deploy" build step, make sure the App Service you want to deploy to exists. Otherwise create it with the "Azure Resource Group Deployment" build step. In this build step, you should have a template file for creating the App Service
    Posted to Holger's Blog (Weblog) by Holger Vetter on 12-12-2016
  • Identify ASP.Net Core startup errors

    Maybe you know this great and informative error message "An error occurred while starting the application." from core when there was an exception during the startup. To identify and understand what happened, you must extend the Main method with the following things: UseSetting("detailedErrors", "true") CaptureStartupErrors
    Posted to Holger's Blog (Weblog) by Holger Vetter on 11-30-2016
  • How to identify Swagger errors

    Last week I had the problem that Swagger wasn't working. It just showed an HttpStatusCode 500 and in Visual Studio there wasn't any exception. To identify the error I had to activate the 'DeveloperExceptionPage' in the Configure method. public void Configure( IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory
    Posted to Holger's Blog (Weblog) by Holger Vetter on 11-18-2016
  • ASP.NET Core returns StatusCode:500

    I ported an MVC WEB API project to ASP.NET Core and now the Service just returned StatusCode: 500 every time I called it. Visual Studio doesn't give me any information or Exception to indicate what happened. To find the error I disabled "Enable just my Code" in the visual studio settings. Now the visual studio showed this exception from
    Posted to Holger's Blog (Weblog) by Holger Vetter on 11-10-2016
  • .NET Core json settings and environment variable

    Today we deployed .NET Core application on a test machine and then configured the application as environmental variable in the system. When we started the command line application, it couldn't find 'settings.json' file for reading the configuration. This happens because the application looks for it on the relative path where the command
    Posted to Holger's Blog (Weblog) by Holger Vetter on 10-19-2016
  • ASP.NET MVC WEB API Impersonation Thread issue

    In an ASP.NET MVC WEB API application I implemented Windows Authentication with custom roles by using an implementation of IIdentity. In my setup the user gets authenticated by NTLM, then we have the user name. Now there is a part in the OWIN Pipeline which gets the roles for this user and caches them. When the user sends a request to the server it
    Posted to Holger's Blog (Weblog) by Holger Vetter on 09-20-2016
Page 1 of 4 (36 items) 1 2 3 4 Next > | More Search Options is a .Net Community Blog powered by daenet GmbH.