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. aspnet username / machine.config

aspnet username / machine.config

Scheduled Pinned Locked Moved ASP.NET
asp-netcsharpsysadminwindows-adminquestion
5 Posts 3 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.
  • L Offline
    L Offline
    lxhan
    wrote on last edited by
    #1

    I have a website that is created in asp.net that needs read access to certain files on the network. Since the aspnet username doesn't have access rights it can't read the file on the network. What's the proper method or steps to setup the machine.config if I want to grant access to the network files. Of course, I want to prevent hackers from looking into the machine.config file, and looking at the username and password. Do I have to change the username or password in the machine.config file? Do I have to change anything on IIS ver 5.01? How is the user account, ASPNET created on the network? Thanks!

    V 1 Reply Last reply
    0
    • L lxhan

      I have a website that is created in asp.net that needs read access to certain files on the network. Since the aspnet username doesn't have access rights it can't read the file on the network. What's the proper method or steps to setup the machine.config if I want to grant access to the network files. Of course, I want to prevent hackers from looking into the machine.config file, and looking at the username and password. Do I have to change the username or password in the machine.config file? Do I have to change anything on IIS ver 5.01? How is the user account, ASPNET created on the network? Thanks!

      V Offline
      V Offline
      VenkatFor NET
      wrote on last edited by
      #2

      The best way, I guess is to map to the network computer which you want to access as if it is a local drive. And then, while sharing the drive on the network, you can set permissions on the folder which you wanted access including the user or Anomnymous user. Or I think, we can also impersonation to run the app in a particular user context which can be specified in section of web.config. I do not think, we need to change anything in Machine.Config to set this up and personally do not suggest to modify Machine.Config, unless strictly necessary. Hope this helps Bhaskara

      J L 2 Replies Last reply
      0
      • V VenkatFor NET

        The best way, I guess is to map to the network computer which you want to access as if it is a local drive. And then, while sharing the drive on the network, you can set permissions on the folder which you wanted access including the user or Anomnymous user. Or I think, we can also impersonation to run the app in a particular user context which can be specified in section of web.config. I do not think, we need to change anything in Machine.Config to set this up and personally do not suggest to modify Machine.Config, unless strictly necessary. Hope this helps Bhaskara

        J Offline
        J Offline
        Javier Lozano
        wrote on last edited by
        #3

        Bhaskra is correct. You can create a new user (in your Domain or Local computer) in which the web app runs under IIS. (Under the directory security tab). Then under the web.config for the app, you can do the following:

        This will make the app run under that user rather than the ASPNET user. ~javier lozano (blog || email)

        L 1 Reply Last reply
        0
        • J Javier Lozano

          Bhaskra is correct. You can create a new user (in your Domain or Local computer) in which the web app runs under IIS. (Under the directory security tab). Then under the web.config for the app, you can do the following:

          This will make the app run under that user rather than the ASPNET user. ~javier lozano (blog || email)

          L Offline
          L Offline
          lxhan
          wrote on last edited by
          #4

          javier, Thanks a million!! Can I ask you for one more favor? I didn't get your sample code. If possible may I see the web.config sample you suggested. lxhan

          1 Reply Last reply
          0
          • V VenkatFor NET

            The best way, I guess is to map to the network computer which you want to access as if it is a local drive. And then, while sharing the drive on the network, you can set permissions on the folder which you wanted access including the user or Anomnymous user. Or I think, we can also impersonation to run the app in a particular user context which can be specified in section of web.config. I do not think, we need to change anything in Machine.Config to set this up and personally do not suggest to modify Machine.Config, unless strictly necessary. Hope this helps Bhaskara

            L Offline
            L Offline
            lxhan
            wrote on last edited by
            #5

            Thanks for you input!

            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