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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Windows Service networking restrictions?

Windows Service networking restrictions?

Scheduled Pinned Locked Moved C#
sysadminquestion
3 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.
  • J Offline
    J Offline
    jkersch
    wrote on last edited by
    #1

    hi there, today i realized a really strange behaviour of windows services. i made a windows service that regularly checks some network services. i wrote a class to perform these checks. it works perfectly when i wrap it into a userspace program (command line). but the same piece of code always refuses to connect when wrapped into a windows service. is there something i have to obey when doing network programming with windows services? thanks, j.

    G 1 Reply Last reply
    0
    • J jkersch

      hi there, today i realized a really strange behaviour of windows services. i made a windows service that regularly checks some network services. i wrote a class to perform these checks. it works perfectly when i wrap it into a userspace program (command line). but the same piece of code always refuses to connect when wrapped into a windows service. is there something i have to obey when doing network programming with windows services? thanks, j.

      G Offline
      G Offline
      GloryKidd
      wrote on last edited by
      #2

      First what user account is your service running under? Local System accounts will not have access to network resources. The easy solution is to go to the services and set the service to run under your account. Then it would have the same rights you have. D Nuckolls "If you think its expensive to hire a Professional... Wait till you hire an Amateur!"

      J 1 Reply Last reply
      0
      • G GloryKidd

        First what user account is your service running under? Local System accounts will not have access to network resources. The easy solution is to go to the services and set the service to run under your account. Then it would have the same rights you have. D Nuckolls "If you think its expensive to hire a Professional... Wait till you hire an Amateur!"

        J Offline
        J Offline
        jkersch
        wrote on last edited by
        #3

        i tried my account (is in domain admin group),tried local system account (ok,now i know that this definitely doesn´t work ;) and Domain Administrator Account, it´s all the same. now i just run the networking stuff wrapped in a commandline tool with task scheduler, but a windows service would my favourite choice... thanks though j.

        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