How to authenticate web service? When you enter the web
service url in browser it should ask username and password.
After entering the un&pwd we have to show its methods and
service description(wsdl).
Answers were Sorted based on User's Feedback
Answer / gp_bellamkonda
If external clients want to access our webservices,We can
declare and use our own keys like userid,password and
domain in web.config.
TYPE IN WEB.CONFIG
=============
<appSettings>
<add key ="UserID" value ="User123"/>
<add key ="Password" value="Pwd@123"/>
<add key="Domain" value ="ABC"/>
</appSettings>
and
IN CODE
=======
try
{
ISAuthenticatedUser = new AuthenticateUsers
().Authenticate(LoginUserId, LoginPassword, "DEVDCDOM");
if (ISAuthenticatedUser == "Error")
returnMSg = "Application error has
occured.Please check log files for details.";
else if (ISAuthenticatedUser
== "Authentication Failed")
returnMSg = "USer not Authorized.";
}
catch (Exception ex)
{
throw ex;
}
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / siyaa
The webservice has to be created under windows
authentication mode and it has to be impersonated with a
username and password .
Is This Answer Correct ? | 1 Yes | 2 No |
what is collections in .net? why we use?
Classes and structs can be declared as static, is this statement true or false?
Is namespace necessary in c#?
What is delegates in c#?
How do you implement multiple inheritance in .NET?
In c#.Net Application For DataGridview binding which method is faster in below two case?Why..? 1)looping-Using For loop 2)Databinding direct using Dataset
c# code for how to merge two sorted arrays Input : A = 2,5,8,4 B = 3,9,10,5 Output : 2,3,4,5,5,8,9,10
Explain the Abstract class in c#.net
What is console based application?
What is sqladapter c#?
What is difference between Method and function
Which is better python or c#?