Hi all!
I'd like to introduce myself in this forum first. The name is Henrik, and I've been doing some designs for about 3-4 years now. During this time I've always used ASP and nowadays I've been using ASP .Net with C#.
I must say that it has been very nice to develope with ASP, but now it seems like ASP .Net is growing towards some big lump of information which isn't really any good at anything. Of course they talk some about security and optimisation and how good it will be, but it doesn't seem to exist any tutorials about the subjects. Either it's for the progamming language or it's for Visual Basic .Net which just is too terrifying for me to read. (I mean VISUAL BASIC!)
For example. A couple of days ago I borrowed a book from my library about C# .Net which I thought would help me with the web designing I do. It turned out to be a book about the programming language C# in Windows. I.e. one OS only and only 3 chapers out of 30 on web developing. At least it was something, I thought, and tried to do one example. The tricky part is that the book assumes you use visual studio 2002 (costs money), hence not writing out all the code, but assuming that the code is there.
After doing one of the book's examples it just didn't work. This is the stupid error I got:
______________________________________________
Server Error in '/lol/WebSites/WebSite1' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0115: 'ASP.LoginForm_aspx.FrameworkInitialize()': no suitable method found to override
Source Error:
[No relevant source lines]
Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.40607\Temp orary ASP.NET Files\lol_websites_website1\6899acdb\ec362f72\acfn z-qo.0.cs Line: 410
Show Detailed Compiler Output:
C:\WINDOWS\system32> "C:\WINDOWS\Microsoft.NET\Framework\v2.0.40607\csc .exe" /t:library /utf8output /R:"C:\WINDOWS\assembly\GAC_MSIL\System\
2.0.3600.0__b77a5c561934e089\System.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.
Drawing\2.0.3600.0__b03f5f7f11d50a3a\
System.Drawing.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.Data\
2.0.3600.0__b77a5c561934e089\System.Data.dll" /R:"C:\WINDOWS\assembly
\GAC_MSIL\System.Web\
2.0.3600.0__b03f5f7f11d50a3a\System.Web.
dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.40607\m scorlib.dll" /R:"C:\WINDOWS\assembly\
GAC_MSIL\System.Xml\
2.0.3600.0__b77a5c561934e089\System.Xml.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.EnterpriseSer vices\2.0.3600.0__b03f5f7f11d50a3a\
System.EnterpriseServices.dll" /
R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Service s\
2.0.3600.0__b03f5f7f11d50a3a\
System.Web.Services.dll" /R:"C:\WINDOWS\
assembly\GAC_MSIL\System.Web.Mobile\2.0.3600.0__b0 3f5f7f11d50a3a\
System.Web.Mobile.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.40607\T emporary ASP.NET Files\lol_websites_website1\6899acdb\ec362f72\icmy 3yrx.dll" /
out:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.40607 \Temporary ASP.NET Files\lol_websites_website1\
6899acdb\ec362f72\acfnz-qo.dll" /debug- /optimize+ /warnaserror /w:1 /nowarn:1659
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.40607\Tem porary ASP.NET Files\lol_websites_website1\
6899acdb\ec362f72\
acfnz-qo.0.cs" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.40607
\Temporary ASP.NET Files\
lol_websites_website1\6899acdb\ec362f72\acfnz-qo.1.cs"
Microsoft (R) Visual C# .NET Compiler version 8.00.40607.42
for Microsoft (R) Windows (R) .NET Framework version 2.0.40607
Copyright (C) Microsoft Corporation 2001-2003. All rights
reserved.
c:\WINDOWS\Microsoft.NET\Framework\v2.0.40607\Temp orary ASP.NET
Files\lol_websites_website1\6899acdb\ec362f72\acfn z-qo.0.cs
(410,33): error CS0115: 'ASP.LoginForm_aspx.FrameworkInitialize
()': no suitable method found to override
c:\WINDOWS\Microsoft.NET\Framework\v2.0.40607\
Temporary ASP.NET Files\lol_websites_website1\6899acdb\
ec362f72\acfnz-qo.0.cs(417,29): error CS0115: 'ASP.LoginForm_aspx.GetTypeHashCode()': no suitable
method found to override
Version Information: Microsoft .NET Framework Version:2.0.40607.42; ASP.NET Version:2.0.40607.42
_________________________
It said there were no relevant source lines! The how can I fix the problem? This happened just 5 minutes ago.
What I try to do is to implement a CMS on a website I'm making for a client. They should be able to easily update the content on the web site without using any other software than their browser. I've tried this in ASP .Net but it seems like it's all geared towards microsoft. Follow their examples and you'll be fine. Plus there are no examples or code snippets to find about this - not really any!
(I could add that my IE browser just stopped working, now only Firefox works, which is kinda strange concidering I didn't change any settings at all!)
Also the ASP .Net platform requires a very good server to be able to handle severe load. This is because it's very unoptimized, using windows as server. I'm for open source, so why not set up a server with linux which actually doesn't become slow when stressed? Why did for example the ASP .Net management console start to use 50 % CPU when I just viewed it? That's what I call a progmatic error.
Searching the web for '"ASP .NET" login C# database' doesn't really return anything. However, after 3 minutes of searching I found this really nice article on the web, for free:
http://www.sitepoint.com/article/php-mysql-tutorial/2
Very sleek in my opinion.
So now I'm thinking of migrating to PHP, setting up a little Apache server which can run my pages, and finally implementing the stuff I need.
Is really PHP as good as I hear? Is it more optimised? Can PHP create tables as in a guestbook without using spagetthi code, as ASP .Net can?
Can you use codebehind in PHP - i.e. separating the code from the content? Compiling the PHP code into DLLs for faster execution at runtime? Can chache be used to further speed things up?
Spagetthi code example:
<? while (!rs.EOF) { ?>
HTML code
<? server-code ?>
HTML code
}?>
________
So what do you think? Should I do the transfer, including all the time needed to learn yet another language?