I am currently trying to get an object I'm creating to write to a text file
after it has been called by a code behind file, unfortunately it's putting
up a fight and I can't find any information on doing this. I am able to write
to the text file using the same code in a .vb code behind file but when I
create the dll file it seems to be unable to instantiate the object. I suspect
I'm missing something v.simple. Unfortunately I get the compilation error


BC30182: Type expected

This would seem to imply I am not importing a necessary library, (I have
tried importing any relevent libraries I can think of...)


code for dll object file

Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Diagnostics
Imports System.IO
Imports System.Collections
Imports System.Text
Imports System.Reflection

Namespace FatalErrorWrite1

Public Class fatalerrorwrite
'have tested code: code works but not in object here
Dim objStreamWriter As StreamWriter

Public Function ErrorWriting(ErrorMessage As String) As Object


objStreamWriter = New StreamWriter("C:\Test.txt")
objStreamWriter.WriteLine("From the dll object")
objStreamWriter.Close()
Dim filename As String = "C:\TEST.TXT"


End function


End Class

End Namespace



code for aspx file

<%@ Page Language="VB" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.SqlClient" %>
<%@ import Namespace="FatalErrorWrite1" %>
<%@ import Namespace="System.IO.FileStream " %>
<%@ import Namespace="System.IO" %>
<script runat="server">


Sub Page(sa As Object, Ex As EventArgs)
Dim FERR As New FatalErrorWrite()

FERR.ErrorWriting("AAAARRGHH!!!")

End sub

</script>
<html>
<head>
<title>mike table example</title>
</head>
<body>
<font face="verdana" size="5">
<form runat="server">
page executed
</form>
</font>
</body>
</html>