Unable to launch the IIS Express Web server

Failed to register URL “http://localhost:63647” for site application. Error description: The process cannot access the file because it is being used by another process (0x80070020). 1. Open project properties. 2. Choose “Web” on the left hand side. 3. Update the…

Section is locked (ipSecurity configuration)

Module IpRestrictionModule Notification BeginRequest Handler ExtensionlessUrl-Integrated-4.0 Error Code 0x80070021 Config Error This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault=”Deny”), or set explicitly…

Convert float string to int c#

Converting a string to a integer seems to be trivial. But there could be endless of formats and styles on the string so it’s not always that easy that it’s seems. If you have a string like “629.00” and want…

View current sql queries on MSSQL database

To view current sql queries running on sql database you can use this sql script to get current query and elapsed time. SELECT sqltext.TEXT, req.session_id, req.status, req.command, req.cpu_time, req.total_elapsed_time FROM sys.dm_exec_requests req CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext I have only…

Abstract InjectionMemberElement object cannot be created

Case: Azure webapp. Solution with multiple projects that uses unity. Working fine on localhost but not when published, getting the message: “An error occurred creating the configuration section handler for unity: An abstract InjectionMemberElement object cannot be created. Please specify…

Entity type is not part of the model for current context

The entity type <Type> is not part of the model for the current context. ExceptionType: System.InvalidOperationException System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) vid System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) vid System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() vid System.Web.Http.Controllers.ApiControllerActionInvoker.d__0.MoveNext() — Slut på stackspårningen från föregående plats där ett undantag utlöstes — vid System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)…

Local IIS failed to map the path ‘/’

Got an exception of System.InvalidOperationException: “Failed to map the path ‘/’” when starting the site on a local IIS. System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +556 [HttpException (0x80004005): Det gick inte att mappa sökvägen /.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +579 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)…

Windows shortcut show desktop

In order to create a shortcut that shows the desktop you can create a shortcut in the quick launch section. Here is how: 1. Open the quick launch folder. 2. Create a new text file. 3. Copy and paste the…