Groups | Blog | Home
all groups > asp.net webservices > july 2004 >

asp.net webservices : Adding a user dynamically in Web services ?



Raghu Raman
7/13/2004 8:53:43 PM


I've created a web service which runs thru web referrences and returns
a dataset to the Web forms.It gets the conn.string & qry as parameters
and produces the dataset.

I want to restrict the users accessing the web service & i can do that
in web.config file , if i know the users while creating the web service.

Is it possiable to restrict the users accessing the web service (after
it is running as dll) from the web forms with out altering the web
service physically.


With thanks in advance
Raghuraman


*** Sent via Developersdex http://www.developersdex.com ***
Saurabh Nandu
7/14/2004 6:00:02 AM
If you are using Windows Authentication then you can just modify the web.config file to state that you need Windows Credentials for users accessing the web service.
This can be done without a recompile.

But you will have to modify the consuming client to send accross the valid credentials..

--
Regards,
Saurabh Nandu
AksTech Solutions, reflecting your needs...
[ www.AksTech.com ]
[ www.MasterCSharp.com ]



[quoted text, click to view]
Dale
7/14/2004 8:58:29 PM
Saving the web.config file can restart your app. This might have unexpected
consequences. You could put the user identies into an application scope
collection upon Session_Start and build custom security handlers that check
for a flag or existence in a collection.

Dale

[quoted text, click to view]
web.config file to state that you need Windows Credentials for users
accessing the web service.
[quoted text, click to view]

AddThis Social Bookmark Button