Enable authentication in ASP.NET webservice?

If you're using class ASP. NET ASMX Web Services, I would suggest you download Microsoft's Web Service Enhancements 3.0 . That will enable you to properly support WS-Security.

Up vote 1 down vote favorite 1 share g+ share fb share tw.

How do I configure . NET webservice to require all consumers to supply credentials, then verify their validity against database table? .net asp.net authentication web-services link|improve this question asked Jul 13 '10 at 13:58LoveDotNet1,272419 78% accept rate.

If you're using class ASP. NET ASMX Web Services, I would suggest you download Microsoft's Web Service Enhancements 3.0. That will enable you to properly support WS-Security.

You could also use custom SOAP Headers, but that method doesn't conform to WS-Security standards and could cause interoperability problems if you're consuming the services from a non-. NET platform. If you're using WCF, you just need to configure your binding to use the proper type of security.

Take a look at Bindings and Security. It's a broad overview and you'll have to dig a little deeper to get the specifics for your type of binding.

Isn't WSE 3.0 just for . NET 2.0? – LoveDotNet Jul 13 '10 at 14:09 SOAP headers not supported on other platforms other than .

NET, are you sure? – Chris Diver Jul 13 '10 at 14:11 @Chris Diver - They may be supported, but they don't conform to the standard for Web Service Interop so it's not guaranteed. – Justin Niessner Jul 13 '10 at 14:18 @Justin - but they conform to the standard of SOAP web services.

– Chris Diver Jul 13 '10 at 14:24 1 @Sphynx - WSE 3.0 is only supported for Visual Studio 2005, correct. If you're using Visual Studio 2008, Microsoft advocates migrating to WCF if you need the added functionality. – Justin Niessner Jul 13 '10 at 14:27.

Lots of ways to do this. Have a look at the SoapHeader class for one - there is a sample here.

Bah, didn't spot the web service! Forms authentication is explained in this article: msdn.microsoft.com/en-us/library/ff64707... Basically, there is a configuration section for authentication. If you want to expose it to the public then forms is the best way, if its a LAN or closed network jobby then you could use Windows Auth.

Another MSDN article about Web Service security: msdn.microsoft.com/en-us/library/ms99641... Just an obligatory note - if you can, look into using WCF, not web services as WCF completely replaces web services from a . NET perspective.

Looks as if you could do worse than read: progtutorials.tripod.com/Authen.htm "Forms Authentication".

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions


Thank You!
send