Results 1 to 8 of 8

Thread: login details for filestream

  1. #1

    Thread Starter
    Fanatic Member carlblanchard's Avatar
    Join Date
    Sep 2003
    Location
    Bournemouth (UK)
    Posts
    539

    login details for filestream

    Hey All

    Im accessing some files on a different server im using system.io and doing a file.copyto to a temp directory on local machines

    i get a login error at line

    Dim fs As FileStream = f1.Create

    error is

    Logon failure: unknown user name or bad password.
    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.IO.IOException: Logon failure: unknown user name or bad password.
    I could always just add my login to the other machine however i would perfer to do this via code as the calling user is currently using the asp.net login

    kind regards

    Carl
    I am curretly building a defect management system for software and web developers,
    If you wana try it out (beta test) and keep it for free just send me a message

  2. #2
    Hyperactive Member CyberHawke's Avatar
    Join Date
    May 2004
    Location
    Washington DC
    Posts
    477
    Perhaps some others will be able to explain this more elegantly than I but, your issue revolves around .NET security. Your app does not have permission to access the local hard drive on the machines due to the local security policy implemented on the client machines.

    I suggest you delve deeply into .NET security to get this one resolved.

    Sorry I couldn't be more helpful.

  3. #3
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Originally posted by CyberHawke
    Perhaps some others will be able to explain this more elegantly than I but, your issue revolves around .NET security. Your app does not have permission to access the local hard drive on the machines due to the local security policy implemented on the client machines.

    I suggest you delve deeply into .NET security to get this one resolved.

    Sorry I couldn't be more helpful.
    It sounds more like a simple windows sharing/security issue.
    Carl - look up information on the Net APIs for WindowsNT based systems.
    Basically, its the API way of using the net use command.

    Try this from your machine before you use your application :
    net use \\servername\folder /user:domain_name\user_name password

    e.g.

    net use \\nt2\shared /user:mydomain\jamie vbf2004
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  4. #4

    Thread Starter
    Fanatic Member carlblanchard's Avatar
    Join Date
    Sep 2003
    Location
    Bournemouth (UK)
    Posts
    539
    thanks plenderj

    but i dont see how that will work....

    Dim f1 As FileInfo = New FileInfo("\\server\share\filename.txt")
    Dim f2 As FileInfo = New FileInfo("\\server\temp")

    Dim fs As FileStream = f1.Create
    fs.Close()

    f1.CopyTo(f2, True)
    I am curretly building a defect management system for software and web developers,
    If you wana try it out (beta test) and keep it for free just send me a message

  5. #5

    Thread Starter
    Fanatic Member carlblanchard's Avatar
    Join Date
    Sep 2003
    Location
    Bournemouth (UK)
    Posts
    539
    any one else got any comments on this ?
    I am curretly building a defect management system for software and web developers,
    If you wana try it out (beta test) and keep it for free just send me a message

  6. #6

    Thread Starter
    Fanatic Member carlblanchard's Avatar
    Join Date
    Sep 2003
    Location
    Bournemouth (UK)
    Posts
    539
    bump
    I am curretly building a defect management system for software and web developers,
    If you wana try it out (beta test) and keep it for free just send me a message

  7. #7
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Its a windows authentication problem. You need to authenticate with the server before you create your file.
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  8. #8

    Thread Starter
    Fanatic Member carlblanchard's Avatar
    Join Date
    Sep 2003
    Location
    Bournemouth (UK)
    Posts
    539
    JOB DONE,

    virtual directory of main site mapped to the file server.

    Nice Job
    I am curretly building a defect management system for software and web developers,
    If you wana try it out (beta test) and keep it for free just send me a message

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width