When creating a file with Fso, the return is a TextStream object...
When Fso wants to set the properties of a file or folder, what you must get is a file or folder object.
Make a file. Then use GetFile to get the File object of this file. Then set its Attributes property value and it is fine.
<%
'Create an example of a FileSystemObject object
Set MyFileObject=Server.CreateObject(Scripting.FileSystemObject)
'Create an example of a File object
Set Myfile=MyFileObject.GetFile(server.mappath(1.txt))
'Set its properties to read-only
MyFile.attributes=1
%>