Wednesday, September 27, 2006

more podcast/on-demand adventures

B asked that the podcast page be revised to have one Download link, which would force a download dialog, and one listen link, which would let people listen on-demand.

The download part was already researched earlier, with a script from ASP101.com . Slightly modified to prevent people from accessing any files outside the relevant folder, using split(strFilePath,"\") and split(strFilePath,"/").

The asp script would not run at first, and IIS6 was giving a 404 error! Had to go to Web extensions and explicitly allow asp.

Next, it was running out of buffer for larger files. Googled, found that the default buffer was 4 MB. Some of our files are even > 20 MB. While non-buffered solution might have been more elegant, since that has to be implemented site-wide and might cause other weird side effects, decided to go for increasing the buffer. AspBufferingLimit in C:\WINDOWS\system32\inetsrv\metabase.xml

Adventures:
First opened the metabase.xml in Wordpad, modified and tried to save -
couldn't, since IIS was running. Stopped IIS from Services->IIS Mgt (it
stopped SMTP, SSL, WWW Publishing service etc) and then saved, OK.

But when started IIS Mgt, refused to start. Wordpad had corrupted the file,
adding ? in various places. Opened it in Notepad to see line numbers, checked
the various line numbers shown in Event Viewer error messages, guessed the
correct characters (like Proce?s = Process ) and saved the metabase.xml. Then
IIS Mgt service started OK, SMTP, SSL, WWW services started OK, but
stream.radiosai.org website was not showing anything, other websites were OK.

Guessed that some of the corrupted lines were in the logging part, so opened
the logging in Properties of Radiosai Downloads website, added a tick mark to
"Time taken" and restarted the website -> Voila! it works.

No comments:

Post a Comment