Login failed for user ‘NT AUTHORITY\NETWORK SERVICE’

After our server people did some MS SQL database restores from some old backups to find some data, some .NET websites we had on the server started showing an error. (note I couldn’t see the error and had to disable custom errors from remote only, see here http://tech.ralpharama.co.uk/1/viewing-errors-remote-machine-after-sql-restores-broke-sites Server Error in '/' Application. Cannot open database... » read more

How to use Chilkat S3_DownloadBytes and S3_UploadBytes to copy images in Classic ASP

Copy images between Amazon s3 buckets in memory only using Chilkat’s S3_DownloadBytes and S3_UploadBytes. Example classic ASP code.  Function http_copy_bytes(contentType,bucketSourceName,bucketDestName,objectName,justFileName)     Dim success, binaryImage      ‘ Set up chilkat http     Dim http : Set http = Server.CreateObject(“Chilkat.Http”)     http_unlock(http)     http.AwsAccessKey = AwsAccessKey ‘ your key     http.AwsSecretKey = AwsSecretKey ‘ your key ... » read more

Why won’t SVN update this file?

I had a nightmare recently with SVN refusing to update a file, then skipping a folder. Here’s what worked for me. SVN refused to update a particular file ‘template.html’ in a folder ‘newsletter’ deep in a tree. It just ignored it. Odd. I delete the file, template.html. Ran update again. Nothing, just says up to... » read more

CDONTS, CDOSYS, IIS 6.0, IIS 7.0 and headaches…

I’m adding a few old things to this blog, this is pretty old! We moved from an old IIS 6.0 server setup with Classic ASP code sending bulk newsletter emails using CDONTS, to a new Windows 2008 R2 server in the cloud with IIS 7.5. We also moved to using a 3rd party SMTP service... » read more

How can I use Visual Studio as the editor in WinSCP?

Note this is no longer what I do! I use Visual Studio Code After a bit of searching I found the answer. Add a new external editor in WinSCP (Options/Preferences/Editors/Add), With this info: External Editor: “C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe” /Edit !.! External editor opens each file in a separate window: not checked/blank Force text... » read more

Getting MSBuild Error MSB3021 in Visual Studio

For no reason a rebuild of a .NET MVC project created these errors that wouldn’t go away with restarts, cleans, running as administrator, etc: Error 383 Unable to copy file “..\root\foo\bar\thing\test.thing.xml” to “bar\thing\test.thing.xml”. Access to the path ‘bar\thing\test.thing.xml’ is denied As detailed here: https://stackoverflow.com/questions/2895898/visual-studio-build-fails-unable-to-copy-exe-file-from-obj-debug-to-bin-debug The only thing that worked for me was the answer by https://stackoverflow.com/users/2435679/adrian-booth When... » read more

ASP.NET Core Web Forms App: A namespace cannot directly contain members such as fields

After creating a new Razor web forms app I scaffolded in an existing database: Scaffold-DbContext "Server=<server>;Database=<db-name>;User ID=<username>;Password=<password>;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models And kept getting an error on the newly created entries: A namespace cannot directly contain members such as fields After ensuring I had added Entity Framework to the project using NuGet, I still got the... » read more