Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Active Server Pages integration

Not sure if any of the other Beta testers know this, but you can integrate CityDesk with Active Server Pages. All you have to do is create a new template that uses the ".asp" file extension. Then you can integrate your ASP script with your CityScript...Very cool!

Note, however, that in order to use the "Preview" feature in CityDesk with ASP pages, you have to be running FTP. That is because if you navigate to an ASP page by directory/file-name in IE, the ASP parser doesn't kick in, and you're prompted to download the file. It's not that hard to set up a local FTP server, though, if you still want to publish locally.

I haven't done anything ultra-complicated with my ASP integrated CityDesk pages, so I'll post any problems that I encounter. This integration opens up a lot of doors, however, for more interactive sites that still want to enable content management. Oh, and this integration solves my banner rotation issue (see my other post) because I can roll my own banner rotation code.

Jonathan Goodyear (aka angryCoder)
Tuesday, October 16, 2001

That's somewhat of a pain to have to set up your own ftp server, here's a better way!

After publishing, the little button that says Internet Explorer has a drop down next to it.  Go down and select Configure Preview.  Then add a new item which points to Internet Explorer and hardcodes the URL (and virtual directory) of your preview site (like http://localhost/CityDeskSite/index.asp) and name it "ASP Preview".  Now you don't need to set up an FTP server just to preview your ASP pages!!!  Just Publish and select "ASP Preview".  Voila!

Michael Pryor
Tuesday, October 16, 2001

I guess that I just like to do things the hard way...Where were you about an hour ago? ;-) Thanx for the tip...

Jonathan Goodyear (aka angryCoder)
Tuesday, October 16, 2001

My first bug report. If you navigate to a file with the ".asp" file extension in IE, and select the option to "Edit with CityDesk", it throws an error, as follows:

"The specified file (C:\Documents and Settings\Administrator\Local Settings\Temporary Internet Files\Content.IE5\2XZKHWRY\fog000000009[1].htm) does not exist"

Interesting to note is that it appears to be searching for an ".htm" file. This could be the source of the bug. You should also note that if I navigate to a file with an ".html" extension and choose the "Edit with CityDesk" option, everything works fine.

My environment:
Machine: Dell Inspiron 7000 laptop
OS: Windows 2000 Server
RAM: 256MB
Processor: 400Mhz
Publish method: FTP

Let me know if you need any further info on this...

Jonathan Goodyear (aka angryCoder)
Tuesday, October 16, 2001

Jonathan, in that case, can you edit with another editor (like Notepad or Frontpage) with the IE toolbar button?

Joel Spolsky
Tuesday, October 16, 2001

Yes...I can open it just fine in both FrontPage and Notepad. As another question, how does CityDesk know which database file to open? Does it just assume that the file is in the default database on startup?

Jonathan Goodyear (aka angryCoder)
Tuesday, October 16, 2001

It stores little notes to itself in a comment at the top of the HTML files. :) The note contains some magic numbers which are also stored in your CityDesk.INI file so that we can figure out which CityDesk site to open, without revealing your directory structure to the web at large.

[I guess that explains the bug. The little note may not be put in with ASP pages.]

Joel Spolsky
Tuesday, October 16, 2001

Indeed, the "edit with cityDesk" feature only works with .htm or .html extensions. That's because we have to insert a comment at the top of the file, something which we only know how to do safely to .htm and .html files.

Joel Spolsky
Thursday, October 18, 2001

*  Recent Topics

*  Fog Creek Home