I get an error: Object reference not set to an instance of an object. Line 35
What does the whole exception.tostring say?|||Object reference not set to an instance of an object.
Dim clsWDD As New WebDevDB.WebDevDB
Dim intLeng As Int32
Dim intLock As Int32Dim strAppl As String = "MyApplication"
Dim strData As String = "This is my text data!"Dim strFile As String = "MyFile"
intLock = clsWDD.LockTextFile(strAppl, strFile) 'line 35
intLeng = clsWDD.WriteTextFile(strAppl, strFile, strData, WriteAction.Create)
intLock = clsWDD.UnlockTextFile(intLock)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 33: Dim strFile As String = "MyFile"
Line 34:
Line 35: intLock = clsWDD.LockTextFile(strAppl, strFile)
Line 36: intLeng = clsWDD.WriteTextFile(strAppl, strFile, strData, WriteAction.Create)
Line 37: intLock = clsWDD.UnlockTextFile(intLock)
Source File: C:\Inetpub\wwwroot\TestSolution\WebForm1.aspx.vb Line: 35
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
WebDevDB.WebDevDB.GetConnectionString()
WebDevDB.WebDevDB.LockTextFile(String ApplicationName, String FileName, Byte LockSeconds, Byte LockAttempts)
TestSolution.WebForm1.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\TestSolution\WebForm1.aspx.vb:35
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
No comments:
Post a Comment