Insert default value SQL primary key

I have a table in Microsoft SQL Server where insert or updates isn’t possible. Table is only responsible to increment a unique id. The table looks like this: CREATE TABLE [dbo].[CustomerOrderNumbers]( [customerOrderNumberId] [int] IDENTITY(1,1) NOT NULL, [createdOn] [datetime] NOT NULL,…

Cordova build APK – Package damaged

I tried to build an APK (Android) in Cordova, build is successful so far so good! When transferring the file to my mobile I got error message during install “Installation is not possible, package is damaged”. I created a new…

Use only Swedish servers in tor browser

If you want to use only Swedish servers in Tor browser (or any other country) to connect on you can do it like this: 1. Open the file “torrc” at “Tor Browser\Browser\TorBrowser\Data\Tor\”. 2. Add line “ExitNodes {countryCode}”. You can use…

Unable to launch the IIS Express Web server

Unable to launch the IIS Express Web server. Output from IIS Express. Failed to register URL for site. The format of the specified network name is invalid 0x800704BE. The error occured beacause I had a IP binding to 192.168.0.50 added…

Export PFX file from CRT/CER/P7B

Certificate handling. If you want to export a PFX file from a .CRT, .CER or .P7B file, follow these steps: 1. Install Windows 10 SDK (). 2. Navigate to folder: C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64. 3. Start “certmgr.exe”. 4. In the window…

Could not load file or assembly System.Web.WebPages.Razor

Suddenly got the error message when starting a MVC application: Could not load file or assembly ‘System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified. Description: An unhandled exception occurred during the execution…

Failed to Execute URL ASP.net

Got this error (System.Web.HttpException: Failed to Execute URL at ISAPIWorkerRequestInProcForIIS6) when starting up my asp.net website. The error occured beacause the project Managed pipeline mode was set to: Classic. When I changed the pipeline mode to Integrated the website started…

Visual Studio 2017 changing font colors

Have had some problems with Visual Studio 2017 and my color scheme (self created). But at every startup VS changed the color scheme to something completely different. No other settings where affected only the colors were changed. This bug have…

Submit dynamically created form using jQuery

Tried to submit a dynamically created form from an ajax response using jQuery. But couldn’t get it to work. Used the call $(“#formId”).submit(); At last I found the cause why the form wasn’t submitting. In the form a button element…

Lines between braces in Visual Studio 2017

Have recently installed Visual Studio 2017 (release candidate version). And I’m not a big fan of the vertical lines between if declarations, methods, classes and namespaces. It becomes very cluttered when you have a lot of if’s or short methods.…

VS 2017 RC

Wow now is Visual Studio 2017 available for test (release candidate version). Microsoft seems to release a new version every second year now of Visual Studio. Some new features I really like so far: Visual Studio has been optimized to…

Benchmarking – SQL with and without index

Everybody likes when processes are running at optimal performance. SQL queries is a typical example where the answer of the two equal queries can be delivered with different speed. Indexes on a table can have a large impact on the…