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. General Programming
  3. .NET (Core and Framework)
  4. user & directory for webservice

user & directory for webservice

Scheduled Pinned Locked Moved .NET (Core and Framework)
questionasp-netwindows-admin
2 Posts 1 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
    LittleWhiteDog
    wrote on last edited by
    #1

    Hi, I hope to be in the right forum with this question: 1/ I would like to create a webservice method, that returns the username of the user that executes its assembly. I hope to be clear here. Typically it would be the ASPNET user that is returned, but i want to get the exact user. 2/ I also would like to return the IIS folder in which the webservice files are installed. When i use "return Directory.GetCurrentDirectory();", then i get "c:\windows\system32". But i'd like to have "c:\inetpub\wwwroot\bin" or something like that. Is this possible? And if so ... what do i have to do ?

    don't waste your time, or time will waste you

    L 1 Reply Last reply
    0
    • L LittleWhiteDog

      Hi, I hope to be in the right forum with this question: 1/ I would like to create a webservice method, that returns the username of the user that executes its assembly. I hope to be clear here. Typically it would be the ASPNET user that is returned, but i want to get the exact user. 2/ I also would like to return the IIS folder in which the webservice files are installed. When i use "return Directory.GetCurrentDirectory();", then i get "c:\windows\system32". But i'd like to have "c:\inetpub\wwwroot\bin" or something like that. Is this possible? And if so ... what do i have to do ?

      don't waste your time, or time will waste you

      L Offline
      L Offline
      LittleWhiteDog
      wrote on last edited by
      #2

      woops, just found the answer to question 2/ : return Server.MapPath("/"); I still have question n° 1/. I just can't get the user that executes the webservice. Please help. thx !

      don't waste your time, or time will waste you

      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