What Is an ASAX File?

How to Open, Edit, & Convert ASAX Files

Screenshot of several ASAX files in Windows 10
ASAX Files.

A file with the ASAX file extension is an ASP.NET Server Application file that's used by ASP.NET applications.

The most common ASAX file is the global.asax file (also called ASP.NET Application File) that's used for handling certain functions like when the application starts up or shuts down. A web application can only have one of these ASAX files, and it's completely optional to include with the application.

Below the following section is some additional information on ASAX files.

How to Open an ASAX File

Microsoft's Visual Studio software can open ASAX files, as can their free Community edition.

Since ASAX files are just text files that contain code, you can use any text editor to open them. Windows has the Notepad application built-in to the OS that can open the file, but so can third-party text editors like the free Notepad++.

Note: ASAX files are not intended to be viewed or opened by the browser. If you've downloaded an ASAX file and expected it to contain information (like a document or other saved data), it's likely that something is wrong with the website, and instead of generating usable information, it provided this server-side file instead.

If this happens, you should be able to rename the file extension from .ASAX to the extension that the file should have been saved with. For example, say you're trying to download a bank statement in the PDF format but you get an ASAX file instead; just rename the file from .ASAX to .PDF so that you can open it in a PDF reader as intended.

Important: You can not normally change a file's extension like this and expect the new file to work normally. For that, you'd need a file converter tool. However, in this instance, the problem lies solely in the fact that the file extension was inappropriately named, so renaming it to the right extension will work just fine.

If you find that an application on your PC does try to open the ASAX file but it's the wrong application or if you would rather have another installed program open ASAX files, see my How to Change the Default Program for a Specific File Extension guide for making that change in Windows.

Still Can't Open the File?

The programs mentioned above should have no problem opening ASAX files. If they aren't working, it's more than likely the case that you're not really using an ASAX file, which can happen if you've misread the file extension.

For example, ASX and ASA files are not the same as ASAX files. Even though their file extensions are very similar, an ASX file is a Microsoft ASF Redirector file that stores a playlist of audio or video files, like ASF files. You can open an ASX file with VLC or Windows Media Player. ASA files are ASP Configuration files that a text editor can open.

The same could be said for many other similarly spelled file extensions: just because the same or similar letters are used does not mean that the formats are related and can be opened with the same programs.

If you don't really have an ASAX file, research the real file extension to learn more about the file format it's in and which programs can open or convert it.

More Information on the Global.asax File

The global.asax file resides in the root directory of the ASP.NET application and can not be downloaded or viewed by any request except ones that originate on the server side. This means that any external attempt to view or download this particular ASAX file is blocked by default.

You can read more about what the global.asax file is used for over at the Microsoft Developer Network website and at DotNetCurry.com. The ASP.NET website explains how to use the global.asax file and gives a sample file so you can see how the information in the file is structured. Another good source on the purpose of the global.asax file is this Stack Overflow thread.

How to Convert an ASAX File

An ASAX file that needs to remain functional as an ASP.NET file should not be converted to any other format. Doing so would mean that the application can't find the file and so can't use it like it needs to.

If you're looking for how to convert global.asax to Code-Behind in order to put the source code in a separate file, see this thread at Coding Forums. However, you should also take a look at this article at ASP Alliance, which describes how ASP.NET v2.0 replaced Code-Behind with Code-Beside.

More Help With ASAX Files

See Get More Help for information about contacting me on social networks or via email, posting on tech support forums, and more. Let me know what kinds of problems you're having with opening or using the ASAX file and I'll see what I can do to help.