Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Logon Failure?

Logon Failure?

Scheduled Pinned Locked Moved ASP.NET
questionsysadminhelp
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Britnt7
    wrote on last edited by
    #1

    Dim Directories As String() = System.IO.Directory.GetDirectories("\\vol1\test\")

    The error that I get is Logon Failure: unknown user name or bad password. How do I implement my username and password into the statement above to access the network drive? Thanks in advance.:)

    A 1 Reply Last reply
    0
    • B Britnt7

      Dim Directories As String() = System.IO.Directory.GetDirectories("\\vol1\test\")

      The error that I get is Logon Failure: unknown user name or bad password. How do I implement my username and password into the statement above to access the network drive? Thanks in advance.:)

      A Offline
      A Offline
      Andrew Quinn AUS
      wrote on last edited by
      #2

      Hi Britnt7, Sorry I couldn't get back to you sooner. The problem is that your ASP.NET application is running in a process under the local machines IUSR_ account. This has limited access at best - but out on a corporate network is about as useful as the proverbial chocolate teapot. In *most* network setups I've encountered you can get access by just putting the following in your applications web.config

      <system.web>
      <identity impersonate="true"/>
      ...
      ...
      ...
      </system.web>

      This is fine in most intranets, but public-facing networks will be bolted down more-so and you will have to create a DOMAIN user account or group that the process will need to use. As this is an extremely verbose process to describe here and now, here is a link that will help you along... MSDN - Building Secure ASP.NET Applications: Authentication, Authorization, and Secure Communication Hope this helps, Andy

      B 1 Reply Last reply
      0
      • A Andrew Quinn AUS

        Hi Britnt7, Sorry I couldn't get back to you sooner. The problem is that your ASP.NET application is running in a process under the local machines IUSR_ account. This has limited access at best - but out on a corporate network is about as useful as the proverbial chocolate teapot. In *most* network setups I've encountered you can get access by just putting the following in your applications web.config

        <system.web>
        <identity impersonate="true"/>
        ...
        ...
        ...
        </system.web>

        This is fine in most intranets, but public-facing networks will be bolted down more-so and you will have to create a DOMAIN user account or group that the process will need to use. As this is an extremely verbose process to describe here and now, here is a link that will help you along... MSDN - Building Secure ASP.NET Applications: Authentication, Authorization, and Secure Communication Hope this helps, Andy

        B Offline
        B Offline
        Britnt7
        wrote on last edited by
        #3

        Is that all I have to add the the Web.config file?

        identity impersonate="true"
        ...
        ...
        ...

        or is there something that I am suppose to substitute for the ...? Thanks again:)

        A 1 Reply Last reply
        0
        • B Britnt7

          Is that all I have to add the the Web.config file?

          identity impersonate="true"
          ...
          ...
          ...

          or is there something that I am suppose to substitute for the ...? Thanks again:)

          A Offline
          A Offline
          Andrew Quinn AUS
          wrote on last edited by
          #4

          Just add the identity tag into your web.config file. the "..." is just to symbolise the rest of the contents of the web.config file. Now if your network isn't too heavily bolted down, you should be able to connect to the network resource. Of course if read access to the shared directory is guarded (i.e. "Everyone" doesn't have access) then you will need to do more configuring.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups