Alright. I promised myself I was not going to let myself post a topic on ASP.NET, but there has not been a post for a few days and that is no doubt a result of this silent pact.
I will try to contain my boiling anger, but this might digress fast.
Perhaps the best way to do this, is to simply go over what I was trying to do in ASP.NET and how it went so wrong. Basically on the same project as the before mentioned web interface for the System Log Server or SysLog Server from a few days ago. Anyway, I built the interface for the site well enough.
There were some issues that sat sour in my mouth, such as the fact that Visual Studio, the development software I am using, just could not get it through its head that I wanted to use frames. I even changed the doctype tag at the top of the page but it continued to flag errors saying I was not following HTML 4.01 Transitional. There were a large number of other nonesensical validation errors. Alright, I concede, I posted a link to the W3C validators throughout my site – but the last thing I need when starting a brand new server language is to have my small debug window filled with coding standards violations. I just want my site to work, Visual Studio, and cluttering my window with things that are not even errors is not helping. Oh, when I say clutter, this thing has spouted as many as 162 warnings. Most are simply formatting warnings that resulted when I copied the main driver functions from a tutorial that was apparently geared toward a Notepad programmer.
Warnings and clutter aside, the site needed some sort of user authentication system. Hard coded users are acceptable. Now, this is something I could do in PHP with only a dozen lines of code. Maybe writing it the first time would be challenging, but at this point it is old news to me – I just copy and paste it from a previous site I built. Copy + paste = done. Well, ASP.NET claims to have done better. They hide the coding behind a single drag and drop control and a quick configuration using their web-based configuration tool.
There seems to be a serioud fatel flaw to this perfect idea, however. And it is this that has been the source of most of my frusteration. With drag and drop and few configuration toggles on a short menu, the entire user process is hidden from me. Sure, this makes it easy, provided it worked, but since it did not, it turned into yet another ASP.NET nightmare. Basically, when I tested user login from the development server everything worked. But when I published to the production server the application did not recognize any of the users I setup.
My research into the issue revealed one common problem over and over with symptoms identical to mine. Score right? That is what I thought. The idea was that the user database Microsoft configures for you supports multiple applications using the same database – so if you failed to define an application name, Visual Studio will assign different names between the development and production sites. It seemed like my issue. But I actually did have my application named from the beginning. I checked it dozens of times since this problem was the only one I found over and over on the net.
I finally gave up on Internet research when my manager informed me that seperate from Microsoft SQL 2005 Express is a program called Microsoft SQL 2005 Express Manager (why it wasn’t packaged with Express is beyond me). Using this application to physically view the production database did not turn up anything at first, until I found a database table named “application_path” that did not have a single record in it. Despite how obvious the name is, the fact is, that the application path information and indeed all the info contained on this table is already included in another table I spent most of my time analyzing (the application information table) – so I do not really know the purpose of this other application path table. Regardless, I created a record on the table and copied the information to the appropriate fields. I almost cried when the thing suddenly worked.
Well it worked there… But something broke in Visual Studio. Now Visual Studio refuses to compile my web site with any kind of form based authentication. I am not even trying to run the site on my development server – just trying to compile the damn thing and a whole lot of nothing spits out. Currently, I have to comment out the offending code, compile the site, uncomment it on the other end, and copy the files to the production server.
My manager goes on and on about code-behind, the big new thing in web development introduced by Microsoft. I am not a believer. I want to develope my site without having to compile source code in a particular program (Visual Studio). I do not want to deal with extranuous files (two per page instead of one). I do not want my HTML hidden behind clunky ASP.NET controls.
PHP and ASP vanilla makes sense to me. It’s like coding HTML with some server-side rules behind it to generate additional HTML dynamically with each page load. ASP.NET tries to reinvent web site development. Maybe I am just someone who does not want to learn something completely new. I have a hard time swallowing that since this summer alone I have greately increased my knowledge of CSS, PHP, and Ruby, as well as built two sites in ASP.NET – even if the latter was achieved with a loss of blood.
Despite the drag and drop model Visual Studio uses and the library of pre-built controls, ASP.NET just is not the language of choice for someone who wants to only get skin deep. Learn the language well and I have no doubt it is every bit as powerfull as the rest. But try to experiment with it for a day and you will spend weeks with it – and it wont be because of any enjoyment.
Unknown8063 Interest