Thank you for visiting!

Please consider subscribing to the RSS feed or following me on Twitter.

Archive for Windows:

Service Unavailable after Windows 10 Update

After updating to Windows 10 Fall Creators update, we encountered the Service Unavailable 503 message on our IIS websites.

The error looks like this:

The worker process for application pool 'APP_POOL_NAME' encountered an error
'Cannot read configuration file ' trying to read configuration data from file '\?\',
line number '0'. The data field contains the error code.

A solution that worked, is this:

  1. Stop the IIS - run iisreset /stop command in your command prompt.
  2. Remove everything in the c:/inetpub/temp/apppools folder. If you can't, look below for a few PowerShell commands you need to run.
  3. Start the IIS - run iisrest /start command in your command prompt.
  4. Make sure all your IIS app pools are running.
If you can't remove the files in the apppools folder, use Windows PowerShell to stop two services:
  1. Stop-Service -Force WAS.
  2. Stop-Service W3SVC.
  3. Remove apppols folder files.
  4. Run Start-Service W3SVC.


Real Error Messages from IIS

If you want real error messages for your web application in the development environment, make sure you do this:


  1. Go to your web application under Sites and choose .NET Error Pages in the right pane.
  2. Click Edit Feature Settings in the most right pane.
  3. Make sure Mode is set to Off:
    IIS: Error Pages Off

In Web.Config:

Make sure the following httpErrors element is in the <system.webServer> node for the application, with errorMode set to Detailed and existingResponse set to PassThrough:

<httpErrors errorMode="Detailed" existingResponse="PassThrough">
    <remove statusCode="404" subStatusCode="-1" />
    <error statusCode="404" path="/404" responseMode="ExecuteURL" />

The 404 handling in above code is just for good measure.

Now you should once again get real .NET error messages from IIS.

Take Ownership on Windows 10

Update: Now there's a nice tool with an interface that you can use instead. Reset Files Permission

After installing Windows 10, you suddenly don't have permissions to save in some locations. It doesn't matter if you're an administrator either.

After some research, I found a simple solution in this thread on TenForums.

Simply fire up a command prompt (hit Windows key, type CMD, right click and choose Run as administrator) and run this command on your location or drive (change E: to appropriate):

icacls "E:" /setowner "Administrators" /T /C

Depending of the number of files in your location, it might take some time.

How To Solve The "Breakpoint will not currently be hit" Error

When trying to debug in Visual Studio, you get the following error:

Breakpoint will not currently be hit. No symbols loaded for this document.

After some research, I came up with a solution: delete temporary ASP.NET files. This is how you do it:

  1. Locate your temporary ASP.NET files and delete them. They're probably located in C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files.
  2. Rebuild your project and attach to process and you should be fine - the breakpoint should be hit.

Fixing "The file exists" IOException Error

If you get the System.IO.IOException: The file exists error, it's probably because your C:/Windows/Temp folder is absolutely full with temporary files. In fact, if you have more than 65535 files in your temp folder, the method GetTempFileName will throw this error.

To resolve this, just remove all temporary files in C:/Windows/Temp. It might take some time, but it will solve the problem.

Here's the stack trace I got:

System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

My favourite Windows tools

I recently bought myself a brand new Solid State Drive and re-installed Windows 7 plus all necessary programs. Here's my compiled list of the tools I can't live without.

Developer tools first

After a clean Windows 7 installation, I download Microsoft's Web Platform Installer, which is really useful for developers. It'll install all the tools necessary for .NET web developmentweb server as well as the latest .NET framework, SQL Server, plus much more if you want it to. Try it out, it'll save you a whole lot of time! Here's a blog post on how to install the .NET development tools you need.

No .NET environment is complete without Visual Studio though. I'm of course sticking with Visual Studio 2010.

Tools that improve my everyday computer usage

For file archives.
Great file explorer with dual panes. My explorer of choice since 2007 something.
Foxit Reader
Fastest pdf reader ever.
Copy files faster. Improves speed a lot.
J.River Media Center
Music player totally worth the minor cost. Best ever.
Free and fast Photoshop alternative.
Watching photo albums.
For window and multi screen management. I use it solely for the shortcut commands.
Daemon Tools Lite
File mounting.
Ftp client.
Damn NFO Viewer
View NFO files.
Smooth text editor.
Download torrents.
VLC Media Player
Media player of choice.

Tools for collaboration

Great client for obvious reasons. Calls made simple.
Windows Live Messenger
The IM client.
Google Talk
Keep track of your mail and Gmail contacts.
Twitter desktop style.

The browsers

Google Chrome
The one and only. Fast and reliable.
The best browser for web developers.

Tools from the largest of them all

No comments needed.

Do you have any favourite Windows tools?

Solve login failed error for IIS APPPOOL\DefaultAppPool

I recently ran into the classic SQL Server connection error message "Login failed". This, of course, nearly always has to do with insufficient rights to the database.

However, I also got this error message:

Login failed for user 'IIS APPPOOL\DefaultAppPool

In this case, I tried to anonymously connect to a SQL Server Database (in Windows 7, mind).

This is how to solve the problem:

  1. In Internet Information Services, right click the website that tries to connect to the database->choose Manage Web Site -> Advanced Settings. Take a look at the Application Pool used, in this case DefaultAppPool:
    IIS Application Pool settings
  2. Now that you know the application pool the website uses, instead right click Application Pools (in IIS root) -> right click the correct application pool -> choose Advanced Settings.
  3. Under Advanced Settings, find Identity and choose LocalService as the Built-in account (or LocalSystem if that's the option you've got):
    Change Application Pool Identity to LocalService
  4. Done!

How to enable authentication modes for IIS

Sometimes you want different authentication modes with your ASP.NET website. Normally, you can enable and disable a number of authentication modes in IIS under the Authentication section for your website, but there may be a scenario where a couple of these authentication modes are missing.

To resolve this problem, you have to enable these under Windows Features:

  1. Go to Control Panel->Programs and Features, choose Turn Windows Features on or off.
  2. Navigate to Internet Information Services->World Wide Web Services->Security and tick the desired authentication modes:
    Enable IIS authentication modes

How to get SQL Server 2008 running

If you get the login failed error message for your SQL Server database, then it's a good idea to make sure that everything runs as it should. Here's a post on how you get SQL Server 2008 up and running.

Make sure:

  1. The SQL Server Browser service is running.
    You can find it under Services (Control Panel->Administrative Tools->Services)
  2. TCP/IP is activated.
    You can activate TCP/IP through SQL Server Configuration Manager, under SQL Server Network Configuration->Protocols for (SQLEXPRESS). Right click TCP/IP in the list to activate.
  3. SQL Server and Windows Authentication mode is activated.
    In SQL Server Management Studio, right click your instance->Properties->Security and tick SQL Server and Windows authentication mode.
  4. Remote Connections are allowed for your SQL Server instance.
    In SQL Server Management Studio, right click your instance->Properties->Connections and tick Allow remote connections to this server.

Last, but not least - make sure your SQL Server database credentials are correct! Mind the server, database name, user and password.

How to install .NET developer tools on Windows 7

I ran into problems with IIS and ASP.NET after I installed Windows 7, so I thought I'd share my then successful installation process with you.

Clean install of Win 7

First of all, a clean installation of Windows 7 is preferred. I recommend you this because it's otherwise possible you encounter a strange problem which has to do with an upgrade.

A clean installation of Windows 7 will always minimize your problems, plus it's the best start you can get.

First instructions

To minimize upcoming problems, the best thing to do is to install the .NET developer tools before you install anything else.

Make sure you install these tools before anything else and your installation will probably as smooth as anything.

My successful installation process went like this:

  1. Enable IIS and ASP.NET
  2. Install SQL Server 2008 + Management Studio (plus ASP.NET MVC)
  3. Install Visual Studio 2008 + Service Pack 1

Enable IIS and ASP.NET

After the installation of Windows 7 is done, it's first time for IIS and ASP.NET.

You'll have to enable these features through Windows Features which is located under Programs and Features in the Control Panel.

In the Windows Features window, make sure the following options are ticked:

  • Internet Information Services (you can also activate IIS 6 under Web Management Tools->IIS 6 Management Compatibility)
  • ASP.NET (under World Wide Web Services->Application Development Features)

Turning on IIS and ASP.NET in Windows Features

Use Web Platform Installer to install SQL Server and ASP.NET MVC

Microsoft Web Platform Installer is an awesome tool which will help you install programs, modules and much more related to .NET development. Use Web Platform Installer to install the following:

  • SQL Server 2008 + SP1
  • SQL Server Management Studio Express

Once you've downloaded and installed Web Platform Installer, activate the features under the Web Platform tab:

Microsoft Web Platform Installer, the Web Platform tab

The installer will automatically download and install all your selected features. Gone are the days with meaningless steps in the SQL Server installation process!

Mind, you can also choose to install a whole lot of other features, but I recommend you to save them for later.

Install Visual Studio 2008 + SP1

Final step is to install Visual Studio 2008 and Service Pack 1.

Once this is done, you should be set and everything should be fine.

If problems occur

If you encounter any problems, it's always a good shot to use your search engine to find anything related to the problem.

I tried a lot of different solutions though and no solution helped me - a clean installation and the above installation flow solved my problems.

How to enable Remote Desktop in Windows 7

Remote Desktop is awesome when you need to connect to another PC and work as if you were sitting in front of it. Remote Desktop is  simple to use, you just have to know how to enable it. Here's how:

  1. Click the start button, right click Computer and choose Properties:
  2. At Control Panel Home, choose Remote settings:
    Remote settings
  3. Finally, set your desired option in the Remote tab:
    Remote settings tab
    Here you can choose the less or more secure option, depending on your Windows version. For most Windows versions, the latter option with Network Level Authentications is recommended.

Also, make sure your firewall allow remote desktop connections.

You'll find the Windows Firewall under Control Panel -> All Control Panel Items -> Windows Firewall. Choose Allow a program or feature through Windows Firewall to change the options.

To the top