All I wanted to do was write a username and password to a simple .txt file when the user pushed a 'register' button. I tried having the file located in its own directory, it didn't work so when I moved it to the same directory as the rest of the application, still nothing so I tried the /bin folder and still nothing. I get no errors with the following code, it just simply won't write to the file.
VB Code:
Dim objIStor As IsolatedStorage.IsolatedStorageFileStream Dim objSW As StreamWriter Dim _user, _pass As String 'Open file to write _user = txtUser.Text _pass = txtPass.Text objIStor = New IsolatedStorage.IsolatedStorageFileStream("login.txt", FileMode.OpenOrCreate) objSW = New StreamWriter(objIStor) objSW.WriteLine(_user) objSW.WriteLine(_pass) objSW.Close()
I don't understand why it won't write to the file
EDIT: Figured it out thanks =) Had to go and turn on simple file sharing in folder options so I could change the security settings to let ASPNET user change stuff in the folder.



Reply With Quote