0

We have created a webservice in C# for sharing data with user. The data is available in csv or Excel format.

The data will be converted into XML and provided to users through a webservice. The users will use only a browser kind of interface to get the data. There is no client side application to call the webservice. The users will just use the plain url as below:

http:///WebService.asmx/HelloWorld?table=users

We want to implement data level security. So, different users calling the same webservice will get different data. We need to authenticate the users based on the windows NT Name.

We don't want to pass any credential in the webservice url. "Is there a method to capture the user NT Name of the user calling the webservice?" Based on that name we want to restrict the data while passing it on to the user.

Please suggest any other possibility if there is any.

Prabhu Appu

2
  • are you calling a service through ajax? Commented May 28, 2014 at 8:57
  • Take a look at this: Transport Security with Windows Authentication. You can intercept the username on the WCF side, and give the appropriate data back to the user defined by username/group or something else. Commented May 28, 2014 at 8:59

1 Answer 1

2

You can set up your application to use Windows authentication.

Read How to: Configure an XML Web Service for Windows Authentication.

Basically, you have to add this to your web.config:

<authentication mode= "Windows">
</authentication>

And change the authentication of your client to include the right NetworkCredentials.

Sign up to request clarification or add additional context in comments.

2 Comments

there no client side application to call the webservice. user will just use the plain url as below... is there a way to handle the user's NT name in webservice >serverip/WebService.asmx/HelloWorld?table=users
Okay, then your browser should supply that if possible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.