c# - How to show a customized windows authentication with sql server -


i have table in listdown ips allow access of service. service is

website/service.asmx

in there hundreds of web methods.

the table name: iptable  column: ip nvarchar(max)     202.192.25.150     215.215.215.215     115.119.185.199 

when person hit on above service first check requester ip address ,suppose if in list open windows authentication popup (customize)*, else redirect on root website root. *customize: windows authentication mean user/password check sql server's table h_user not windows users,

so question possible show customized windows authentication ?

i'm not sure how can implement windows authentication requirement. can implement customized authentication below.

  • create authentication method
    • use request.userhostaddress retrieve client ip address
    • check requested ip address valid or not (from table)
    • if valid returns true else false
  • call authentication method in every web method
  • if returns true proceed next; else redirect root site

authentication method signature:

public bool isauthenticateduser() {    -- requested ip address    -- check requested ip address available or not    -- if requested ip address available in db allow proceed; else redirect root site } 

call method in main.


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -