Archive for Windows:
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:
- Stop the IIS - run iisreset /stop command in your command prompt.
- Remove everything in the c:/inetpub/temp/apppools folder. If you can't, look below for a few PowerShell commands you need to run.
- Start the IIS - run iisrest /start command in your command prompt.
- 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:
- Stop-Service -Force WAS.
- Stop-Service W3SVC.
- Remove apppols folder files.
- Run Start-Service W3SVC.
If you want real error messages for your web application in the development environment, make sure you do this:
- Go to your web application under Sites and choose .NET Error Pages in the right pane.
- Click Edit Feature Settings in the most right pane.
- Make sure Mode is set to Off:
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.
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.
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:
- 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.
- Rebuild your project and attach to process and you should be fine - the breakpoint should be hit.
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)
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.
- 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?
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:
- 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:
- 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.
- Under Advanced Settings, find Identity and choose LocalService as the Built-in account (or LocalSystem if that's the option you've got):
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:
- Go to Control Panel->Programs and Features, choose Turn Windows Features on or off.
- Navigate to Internet Information Services->World Wide Web Services->Security and tick the desired authentication modes:
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.
- The SQL Server Browser service is running.
You can find it under Services (Control Panel->Administrative Tools->Services)
- 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.
- 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.
- 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.
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.
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:
- Enable IIS and ASP.NET
- Install SQL Server 2008 + Management Studio (plus ASP.NET MVC)
- 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)
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
- ASP.NET MVC
Once you've downloaded and installed Web Platform Installer, activate the features under 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.
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:
- Click the start button, right click Computer and choose Properties:
- At Control Panel Home, choose Remote settings:
- Finally, set your desired option in the Remote 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.