Results 1 to 5 of 5

Thread: [2005] Logon failure: unknown user name or bad password

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2006
    Location
    Manchester, England
    Posts
    255

    Question [2005] Logon failure: unknown user name or bad password

    Hi,
    I'm getting an "Logon failure: unknown user name or bad password" error when I try to view my ASP.NET page through IIS or IE7. Everything works fine when I debug it using VWD 2005 Express.
    What the code is doing is checking for the existence of a specific folder within System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), and if it doesn't exist, create it.
    In VWD, it creates the folder if necessary, and copies a couple of XML files into it.
    Outside VWD, it doesn't create the folder, and highlights the line to copy files into it as being the problem - probably because the folder doesn't exist.
    I suspect that it is running the code through IIS or IE7 as user: IWAM_[Machine Name], but debugs the code in VWD as me.
    Any ideas how I get around this problem?

  2. #2
    Frenzied Member vbdotnetboy's Avatar
    Join Date
    Jun 2004
    Location
    Lewisburg, PA "Next year Raiders in the Super Bowl"
    Posts
    1,310

    Re: [2005] Logon failure: unknown user name or bad password

    if you are running on winxp make sure the ASP.NET account has read/write permissions for that directory if on win2k or win2k3 make sure that NETWORK SERVICES (i think that right) has read/write permissions for that directory

    Derek - Using VS 2008 99% of the time and VS 2003 1% of the time

    Please Help Us To Save Ana

    ● Helpful Links: DNR TV | Awesome site for tips | Using ADO.NET to work with Excel | Xml Namespace 2.0 Framework Changes|Ultra High Security Password Generator | Mendhak's ADO.NET Tutorial
    ● Code Bank: Random Password Generator | Generic DbProviderFactory Access
    ● Site Work: Bottle Run Xtreme | Spaids Racing.com

    Company I work for - CSSI

    WHEN POSTING PLEASE INDICATE VERSION

    Please use vbcode tags or code tags when posting code
    [highlight=vb]ALL your code goes here[/highlight] or [code]ALL your code goes here[/code]

    If my post helped you in anyway... please be kind and give me some ratings

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    May 2006
    Location
    Manchester, England
    Posts
    255

    Re: [2005] Logon failure: unknown user name or bad password

    Thanks for your reply.
    I've noticed that the problem seems to be to do with the network location of the source xml files I want to copy to the local hard disk.
    If I change the source to a local location, IIS and IE7 work fine.
    I only want to copy them to a local location because I seem to have problems trying to access the source xml on the network drive.
    Any ideas?

  4. #4
    Banned timeshifter's Avatar
    Join Date
    Mar 2004
    Location
    at my desk
    Posts
    2,465

    Re: [2005] Logon failure: unknown user name or bad password

    Does the directory containing the XML file have read/write permissions for the project?

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2005] Logon failure: unknown user name or bad password

    You're right, when in debug mode, the security context is you. And you have permission to perform those actions. When running under otherwise, it will use ASPNET or NETWORK SERVICE. Give both of these accounts full permissions on the folders to which you want to write something or create something.

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