IOException: Logon failure: unknown user name or bad password.

G

Guest

Hello,

I have a Win2K server that is connected to our network, but not on any
domain...it's just a stand alone hardware server with a folder share having
'Everyone' granted full access. From any PC we can connect to this machine by
typing in '\\SS2066\database' then Windows prompts for a username and
password..then it will open up the shared folder.....now I have developed a
simple app in VB.NET.... here is the code....

Dim sPath As String = "\\ss2066\database\test.txt"
Dim TS As System.IO.StreamWriter
Try
TS = New System.IO.StreamWriter(sPath) '<- (Exception Message:
"Logon failure: unknown user name or bad password."
TS.WriteLine(Now.ToString)
Catch Ex As Exception
Windows.Forms.MessageBox.Show(Ex.Message)
Finally
If TS IsNot Nothing Then
TS.Flush()
TS.Close()
End If
TS = Nothing
End Try

I get a logon failure message. I know the normal way around this is to
create an account on that server that this user will connect with, but this
is not possible as it is not on any domain.... it's just a stand alone
server. Furthermore, this app is intended to be used by more than one person.
So, is there anyway to 'Impersonate' an account on that server from within a
windows app like you can in ASP.NET?

Any help will be greatly appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top