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. C#
  4. login

login

Scheduled Pinned Locked Moved C#
databasesysadmincsharpsql-serverquestion
2 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.
  • F Offline
    F Offline
    fmardani
    wrote on last edited by
    #1

    I have created a .net 2.0 windows application. Trusted connection to connect to sql server. Using sql server System_User, the application gets the loginname for the user in sql server. Now I have created webservices to be used in this project. It seems that I can not use my existng method (Trusted connection) to get the loginName of the user. So in sql server, created a webuser account. Everyone now is using the system using the webuser account. But, this way I do not know exactly which user is using the application because all I see is webuser hitting the database through the application. How do you suggest I log the users? I was thinking may be I should create roles on the network. i.e. NormalUsers, managers, chairmen, etc,... Then add the appropriate users to these roles on the network. I can then create a login screen. Windows application can then find the user identity. This user can then be traced from the users table in sql server and get it's ID. ID can be used to be inserted into the Audit table. What do you think please? THnaks

    D 1 Reply Last reply
    0
    • F fmardani

      I have created a .net 2.0 windows application. Trusted connection to connect to sql server. Using sql server System_User, the application gets the loginname for the user in sql server. Now I have created webservices to be used in this project. It seems that I can not use my existng method (Trusted connection) to get the loginName of the user. So in sql server, created a webuser account. Everyone now is using the system using the webuser account. But, this way I do not know exactly which user is using the application because all I see is webuser hitting the database through the application. How do you suggest I log the users? I was thinking may be I should create roles on the network. i.e. NormalUsers, managers, chairmen, etc,... Then add the appropriate users to these roles on the network. I can then create a login screen. Windows application can then find the user identity. This user can then be traced from the users table in sql server and get it's ID. ID can be used to be inserted into the Audit table. What do you think please? THnaks

      D Offline
      D Offline
      Dustin Metzgar
      wrote on last edited by
      #2

      If it's an internal network and you have a domain, I would just use integrated security. To handle database access you can either impersonate a user temporarily, use a SQL server login, or give the users themselves access to the database. That prevents you from having to use a login screen but still gives you access to their identities. In case you're not on a domain, you'll have to create a login page and roles and manage all of that. There should be plenty of examples out there on how to do that.

      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