The Case Against Location: File System


tran-land-045

See this picture?

That’s what could happen to your application if you decide to build your ASP.NET web site using the File System location instead of the HTTP location.

To illustrate, let me relate a situation that came up when I first started using ASP.NET back with Beta 2 of 1.0.

Prior to ASP.NET 1.0, I had built an application using a combination of Java and C++ that allowed us to use Visual Source Safe over the Internet.  When .NET came out, I had some time and decided to port the application over to .NET.  The port went rather smoothly and I was able to add some features using .NET that I wasn’t able to add using Java, primarily the Visual Studio integration.

The transport mechanism for the .NET version was Web Services.  The web service would call the VSS COM object to get the directory structure, permissions, and to get and check in the file.


Everything worked fine in Beta 2, but when the release version came out, everything suddenly stopped working because the release version of ASP.NET had all the security stuff implemented that wasn’t in the Beta.

You can run into the same issue today by using the File System because when you develop using the file system, you are running the ASP.NET application as yourself rather than as the user account that would run the ASP.NET account if you were running it under IIS.

Most of the time, this would never be an issue.  But your development environment should always look as much like your production and test environments as is possible.  This includes using IIS with the same security roles, file permissions, database access, and any other environmental issues that may be unique to your application.

That way, when you finally deploy your application to production, you can be relatively sure it will work just like it did when you developed it.

Just like the driver of the car above, just because you’ve never had a problem driving 80MPH on a 55MPH road before doesn’t mean you can keep doing it and get away with it.

Ads by Lake Quincy Media

Other Related Items:

D-Link DP-301U 10/100TX 1-USB Port Print ServerD-Link DP-301U 10/100TX 1-USB Port Print ServerThe D- Link DP-301U is a compact print server that connects to your Ethernet or Fast Ethernet network. With its high-speed USB port, the DP-301U allow... Read More >
Viewables® Color Labeling System Starter Kit for Hanging File Folders (SMD64902)Viewables® Color Labeling System Starter Kit for Hanging File Folders (SMD64902)Smead 64902 Viewables Color Labeling System Hanging Folders 3-1/2in Assorted 25/pk

Related Post

One Response to “The Case Against Location: File System”

DotNetNuke Sponsor

 

Most Valuable Blogger
Sponsor