Wednesday, June 25, 2014

Classic ASP under IIS 7 and above

If you previously designed your web site using global.asa file (for some object initialization) you may wonder why site does not properly work.


To solve this issue, just configure the path where the global.asa file resides as an application.

If path was already configured as a virtual directory, you can simply right click on the right virtual directory and choose 'Convert To Application'



http://www.w3schools.com/asp/asp_globalasa.asp

http://stackoverflow.com/questions/7255685/reading-web-config-values-in-classic-asp

http://www.iis.net/learn/application-frameworks/running-classic-asp-applications-on-iis-7-and-iis-8/classic-asp-not-installed-by-default-on-iis

Tuesday, June 24, 2014

Explain Polymorphism in C#

Things can verb, but each thing can verb differently.

One way to deploy database for SQL Server

For using sqlcmd , see:
http://msdn.microsoft.com/en-us/library/ms180944.aspx


put this in a batch file:

set UName=smedlyuser
set DbName=funbeanweb
#set SName=localhost/SMEDLY
set SName=10.10.10.299,5422
set Pwd=supersecretpassword

echo drop_tables.sql... > _output_.txt
sqlcmd -S %SName% -U %UName% -P %Pwd% -d %DbName% -I -i drop_tables.sql >> _output_.txt 2>&1
echo create_tables.sql... >> _output_.txt
sqlcmd -S %SName% -U %UName% -P %Pwd% -d %DbName% -I -i create_tables.sql >> _output_.txt 2>&1
echo thing_data.sql... >> _output_.txt
sqlcmd -S %SName% -U %UName% -P %Pwd% -d %DbName% -I -i thing_data.sql >> _output_.txt 2>&1

@notepad _output_.txt

Friday, June 13, 2014

App_data is a special directory

App_Data is a special directory in ASP.NET which already has the correct security access permissions for database access.

Microsoft SQL Server versions for Developers

SQL Server Compact Edition
SQL Server Express

related concepts: LocalDb

Thursday, June 12, 2014

auto-implemented properties

The {get;set;} notation is making use of C#'s auto-implemented properties feature. This gives us the benefits of a property without requiring us to declare a backing field.

Wednesday, June 11, 2014

Entity Framework (EF) is really just a load of T4

(aka .tt files)
See: T4 Templates and the Entity Framework by Scott Allen , January 2011
http://msdn.microsoft.com/en-us/data/gg558520.aspx





Tuesday, June 10, 2014

MVC 3 Template Comparison: INTERNET vs INTRANET

Apparently, the INTRANET template just doesn't create the ACCOUNT model at all.


Entity Framework

• Databases are meant to manage changes to data.
• Object designs are meant to manage changes to requirements.