Got a weird error and panicked

My question: how can you safely edit and upload .aspx and other ASCII files on a Windows server?

A client wanted a phone number changed on his apsx/mssql website. I edited the .aspx files in a text editor, FTP’d them and got a form error. Re-uploaded the backup files and got a compiler error(?), I think.

The developer reverted to the old backup in its entirety, including the database.

I found that there was an error in one of his scripts but it wasn’t the same as the error I got initially (it’s a regex form field for a UK post code. His version swaps the password, by mistake, into that field, my edited script returns a ‘bad post-code error’, even when it’s not.)

Weird.

Any clues greatly appreciated.

Any chance in seeing the actual code?

I regret not. I just want to find out, for starters, if anything I did could have caused the error i.e. editing by hand in a text editor and uploading via FTP. Thanks for replying.

No, I often edit aspx files in notepad and FTP them up to the server. If you make a backup first and restore it, there should be no problems. Presuming you had a working backup. Hard to say without seeing the code though. But it should be safe to make file backups and edit in a text editor. You could have maybe had a incorrect page directive or something like that.

I wonder if WinSCP uploaded them in BINARY mode? That’s the only other thing I could think of. Pretty unsettling, I must say. Edit a few files, get an error, upload the backup and the whole thing goes kaput :confused:

Absolutely no way to say without seeing the error, but it should generally work to do this as others have pointed out. Actually have monkeypatched a few things adding <script runat=“server”> to fix some errors in real crisis. Don’t try that at home.

Client has now decided to re-do their site entirely. They don’t want to be hostage to the developer. It’ll probably be in PHP/MySQL :smiley: