Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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).

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between == and object.equals?

1069


What is hashset c#?

1051


Where’s global assembly cache located on the system?

1061


What is the main purpose of delegates in c#?

1020


You have got 1 million parking slots. At a time a parking slot can be free or not. To get next slot easily which data structure to implement?

1125


What are custom exceptions?

986


List down the differences between public, static and void keywords?

915


What is c# best for?

993


What is the difference between decimal and integer?

1200


Explain the steps to create satellite assembly?

950


How Is The Dll Hell Problem Solved In .net?

1069


What will be the output of the following code?

964


What is difference between private and static constructor?

980


What is jit (just in time)?

1033


What is xslt in c#?

920