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. 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++. ASAX files aren’t intended to be viewed or opened by a web 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 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.

More Information on the Global.asax File

The global.asax file resides in the root directory of the ASP.NET application and can’t 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 at DotNetCurry.com. That 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 shouldn’t 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.

Still Can’t Open the File?

The programs mentioned above should have no problem opening ASAX files. If they aren’t working, it’s likely 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 aren’t 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 ASCX and any other similarly spelled file extensions: just because the same or similar letters are used doesn’t mean that the formats are related and that the files 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 format it’s in and which programs can open or convert it.