Set IIS to use Pass through authentication but SQL Server login is showing NT Authority\System RRS feed

  • Question

  • User38196249 posted


    I am new to ASP.net, I build a web based tool to allow users to modify and insert data on a table.  I set up both the IIS and SQL Server access to Windows Authentication.  I  also add a column that will register the user who modifed or inserted the data.  It works but when I publish it, I can see my user id on the website but when I tried to edit a column the Modified by field showed NT AUTHORITY\System.  I also tried see if the IIS authentication pass through the SQL server by disabling my team mate's account and let him modifed a column and it still let him.

    I don't know much about C# coding so I thought to make it simple by letting the access control be on the SQL Server side.  If the NT user is not added as as user on the SQL server, he should be able to edit or insert data.

    Any help will be appreciated.

    Tuesday, October 23, 2012 8:19 PM


All replies

  • User750226543 posted

    Are you trying to set the value in the field to be the user currently logged onto the system? if so, it might be better to just use the IPrincipal username, Page.User.Identity.Name and pass this into the insert/update as a param.

    Wednesday, October 24, 2012 3:55 AM
  • User-179079940 posted

    give database permision in sql server in iis user to access this database

    Wednesday, October 24, 2012 3:57 AM
  • User38196249 posted

    That is one thing I wanted to happen but the main one is for the IIS authentication to pass through the SQL server.  I wanted to put the access control on the SQL Server where in if the user who access the tool is not registered as a user on the SQL database will be denied of access.



    Wednesday, October 24, 2012 12:33 PM
  • User38196249 posted

    Hi kaushikmaheta,

    Can you please elaborate what you are suggesting here? 



    Wednesday, October 24, 2012 12:35 PM
  • User750226543 posted

    You may want to look at impersonation...


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 25, 2012 9:09 AM
  • User38196249 posted

    Thanks for your help.  I was able make it work by fixing the errors after enabling the impersonation and Windows authentication at the same time.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, October 30, 2012 12:10 PM