Home : Shared Hosting : Sitemap

WHATS INCLUDED:

VB Script & ASP Applications
27th March 2008

Explaining some of the uses for VB script and ASP in the modern development environment. This also explains some uses on server side manipulation and systems maintenance.

The articles index can be located here

(Thu, 11 Mar 2010 09:19:37 GMT)
'Console killer' launches in June
A gaming service that aims to kill off the traditional gaming console will begin streaming games over the net in June this year.

(Wed, 10 Mar 2010 12:53:07 GMT)
Mobile phone allows boss to snoop
Mobile technology that could allow prying bosses to monitor every movement of their staff is developed in Japan.

(Thu, 11 Mar 2010 03:57:11 GMT)
Sony shows off motion controller
Sony reveals details about its new motion controller the PlayStation Move, as a contender to market leader Nintendo Wii.

(Wed, 10 Mar 2010 16:57:16 GMT)
Internet up for Nobel Peace Prize
The internet is among a record 237 individuals and organisations nominated for this year's Nobel Peace Prize.

(Wed, 10 Mar 2010 11:19:13 GMT)
Facebook calls for 'iconic games'
Facebook calls on game designers to make an iconic title, such as Mario or Halo, specifically for the social network.

(Wed, 10 Mar 2010 10:39:06 GMT)
File-sharing sanctions 'unfair'
Illegal file-sharers should be fined, rather than have their internet connection cut off, says the boss of BT.

(Tue, 09 Mar 2010 11:29:38 GMT)
Hard drive evolution could hit XP
Hard drives are about to undergo one of the biggest format shifts in 30 years but it could cause problems for Windows XP users.

(Tue, 09 Mar 2010 11:51:07 GMT)
Porn net domain name plan revived
A plan to create a .xxx net domain for adult content will be revisited three years after it was rejected by internet regulators.

(Tue, 09 Mar 2010 17:17:28 GMT)
Nanotech 'fuse' for novel battery
A never-before-seen reaction in nanotubes could make for batteries that pack a mighty punch, say researchers.

(Thu, 11 Mar 2010 09:28:32 GMT)
dot.Rory
New skirmishes in war of Daily Mail v the internet

(Mon, 08 Mar 2010 10:24:35 GMT)
Vital statistics
Explore the inner workings of the web and its growth

(Tue, 09 Mar 2010 11:23:42 GMT)
dot.Maggie
Dotcom crash: Where were you on 10 March 2000?

(Wed, 10 Mar 2010 10:16:32 GMT)
Final Fantasy
Costumed fans queue for launch

(Sun, 07 Mar 2010 06:41:45 GMT)
Well-rounded
Indian computer graduates get etiquette classes

(Tue, 09 Mar 2010 23:27:19 GMT)
Dotcom Crash
10 years on from when the Nasdaq bubble burst

(Wed, 10 Mar 2010 10:12:37 GMT)
Banking fraud 'moves to internet'
Fraudsters are continuing their switch from traditional card fraud to raiding online bank accounts, research suggests.

(Tue, 09 Mar 2010 14:25:58 GMT)
Games migrate to the social side
The merging of social networks and games is set to dominate this year's Game Developers Conference in San Francisco.

(Mon, 08 Mar 2010 08:52:59 GMT)
Internet access 'a human right'
Almost four in five people worldwide see internet access as a fundamental right, a poll for the BBC World Service suggests.

(Tue, 09 Mar 2010 16:42:24 GMT)
Sony eyeing June launch of 3D TV
Electronics giant Sony says its new 3D television will be on sale in Japan from June, with a cost of £2,600 for a 46-inch screen model.

(Mon, 08 Mar 2010 18:25:15 GMT)
US eases sanctions for freer web
The US eases sanctions on Iran, Cuba and Sudan to help further the use of internet services and support opposition groups.

(Tue, 09 Mar 2010 10:17:11 GMT)
Skynet satellite system extended
Skynet 5, the UK's single biggest space project, is to get a fourth satellite to up the bandwidth available to British forces.

(Tue, 09 Mar 2010 13:48:18 GMT)
Facebook death 'lessons to learn'
The home secretary says internet safety lessons must be learned after a convicted sex offender contacts and kills a teenager.

(Mon, 08 Mar 2010 12:02:51 GMT)
Weak questions put e-mail at risk
Questions used as security checks on websites need to be replaced by better tests to see who someone is, say researchers.

(Tue, 02 Mar 2010 12:14:03 GMT)
Has copyright gone too far?
Has copyright gone too far? asks Bill Thompson.

(Tue, 02 Feb 2010 12:06:49 GMT)
Open society and open systems
Openness must be defended, says Bill Thompson.

(Thu, 31 Dec 2009 14:00:50 GMT)
The past is the future for tech
Bill Thompson keeps an eye on the future

(Wed, 16 Dec 2009 11:51:06 GMT)
The media and the message
Innovation is the key for papers says Bill Thompson

(Fri, 05 Mar 2010 17:33:33 GMT)
Sun spotters protect the Earth
Your help is needed to watch the surface of the Sun

(Mon, 01 Mar 2010 12:33:58 GMT)
Naples' online 'ethical' city
The web community founded on morals and manners

(Fri, 26 Feb 2010 18:02:23 GMT)
Will people pay for net news?
Can newspapers charge online and survive?

(Fri, 12 Feb 2010 15:42:40 GMT)
Are all bits created equal?
The US struggles with the battle over net neutrality

(Thu, 03 Sep 2009 12:23:55 GMT)
Digital Revolution


(Thu, 03 Sep 2009 12:26:10 GMT)
Internet Blog


Feed BBC News | Technology | UK Edition

Valid XHTML 1.0 Transitional

Blinklist delicious Digg Facebook furl Google Reddit Stumble Upon Technorati

ASP Tutorials - VB script and ASP Applications

Although many of us are now looking towards .NET technologies there is still worth in Classic ASP and Classic based VB applications. Moving forward in the industry using .NET technologies makes sense but unfortunately it hasn't been around forever and there is still allot of CLassic ASP applications out there and Classic VB applications. The worth of VB script for simple server side manipulation of file structures and Application manipulation are still apparent and in use today.

Over the years in Senior developer positions and Network Operations often working within architecture planning and implementations i have often hit walls that i have managed to overcome using VB script and good old Command line hooks. Working for companies that were modeled around SAAS (Software as a service) the need for hardware and cluster management was apparent. Using VB script to manipulate permissions to lock down possible exploits came in very handy, also using VB script for provisioning of services and automated tasks simplified allot of the hard manual labor, even virus scanning and network packet monitoring using VB had its uses.

Still it all sounds good but it sounds old hat and why would you want to do that?
Well..... still some of the largest suppliers within the UK of e-commerce use the legacy VB script automation written by our systems staff and its proven as easy to maintain and easy to upgrade. Server provisioning is done completely within scheduled VB hooks using CLI shells to automate tasks. Of course we cant mention names but its safe to say that one example is the largest UK based hosted e-commerce provider and before you think it its not Actinic its bigger! Another being logistics management systems and payment gateways.

So give me some examples if its so good i hear you cry....
Ok... lets take a hypothetical situation. Lets say i have 2 servers, i want to mirror the entire file structure by mapping a drive copying the entire contents, oh and lets not forget i don't want to set the permissions manually as its used for a web service, But to be more secure i want to map the drive, copy, then drop the connection. Lets look at an example and then i will explain.

-------------------------------------------------------------------------------------------------------------------------------------------
' Section A
strDriveLetter = "Z:"
strRemotePath = "\\SLAVESERVER\d$"
strUser = "atempadmin"
strPassword = "password"
strProfile = "false"

' Section B
set objShell = wscript.createObject("wscript.shell")
Set objNetwork = WScript.CreateObject("WScript.Network")
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath, _
strProfile, strUser, strPassword
path1 = "D:\"
path2 = "Z:\"

' Section C
set fso = CreateObject("Scripting.FileSystemObject")
set tfile = fso.CreateTextFile(path1 & "\lastdone.txt")
tfile.WriteLine(now())

' Section D
iReturn = objShell.Run("cmd.exe /C xcopy " & path1 & " " & path2 & " /e /Y /F /O /EXCLUDE:D:\web\server side\MyExcludes.txt", 1, TRUE)
iReturn = objShell.Run("cmd.exe /C xcopy " & path2 & " " & path1 & " /e /Y /F /O /EXCLUDE:D:\web\server side\MyExcludes.txt", 1, FALSE)
-------------------------------------------------------------------------------------------------------------------------------------------

Okay so what does it do?
The above script would be run on the server to be mirrored. I have split the script into sections A through D and i will explain each section and what is does. IN this eaxmple xcopy was used as its a stock tools supplied by any version of DOS, its a powerful tool and has the ability to copy ACL information saving the use of other CMD tools such as CACLS. So section A this holds the authentication information required to open a mapped drive using the WScript.Network method.

Section B, well this actually maps the drive using the details in section A. Also it sets up the shell object to run the CLI for the xcopy coming later in the script. When the script executes it will execute using a user that is the member of the system group, this will allow pretty much any CLI command to execute without permission issues. Also i have used this section to define the two paths, in this case the two drive letters.

Section C, I wanted to be able to create a simple 1 line log saying when the last sync occurred so this section basically creates a filesystem object and writes a line with a date/time. I can then recall this later if i wanted with an ASP file etc to pull back the value contained.

Finally Section D, this copies everything, however you will see 2 xcopy commands, this copies everything from the master to the slave, then it copies back incase there's anything new on the slave so that it is held on the master. As the initial copy goes master to slave then anything that has been updated on the slave that should not have been will simply be overwritten. Xcopy is a great command and well worth looking up. There's also an excludes files that tells xcopy to ignore certain files.

So there's one example, when we develop an application its not just about writing a system that does a job. We write systems that you can move from one system to another but also systems that get the most out of the environment. that they are hosted or managed on. Why have a system and a systems administrator. It makes more sense to have a system that manages itself as much as possible. Information on systems development can be found at www.angel-media.net

Username :
Password :