Software engineering and business solutions blog featuring SaaS reviews, automation tools, and business insurance guides. Buyer-intent content designed to drive high-quality traffic and conversions.
Tuesday, October 02, 2018
.NET Core 500 Exception how to see your errors
If you are developing using .Net Core be sure to set the final Configure to the following and be sure to use your keyboard short cut alt+enter to bring in the missing using namespaces for
your references needed.
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
env.EnvironmentName = EnvironmentName.Development;
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/error");
}
app.UseStatusCodePages();
// Enable middleware to serve generated Swagger as a JSON endpoint.
app.UseSwagger();
// Enable middleware to serve swagger-ui (HTML, JS, CSS, etc.),
// specifying the Swagger JSON endpoint.
app.UseSwaggerUI(c =>
{
c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
c.RoutePrefix = string.Empty;
});
app.UseMvc();
}
}
Subscribe to:
Post Comments (Atom)
Synology vs Custom NAS Home Lab: A Comparative Overview for Business Owners
Synology vs Custom NAS Home Lab Introduction Network Attached Storage (NAS) solutions have become integral for business owners seeki...
-
How to clear SharePoint People Picker suggestion cache If you have been SharePoint Site owner long enough, you would have definitely ...
-
Getting the following error (Figure 1): Server Error in '/' Application. ID4014: A SecurityTokenHandler is not registered to ...
-
The problem was that the remote connection needed to utilize Named Pipes, but in order to utilize Named Pipes both the machine hosting the i...
No comments:
Post a Comment