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 encrypt a connection string in web.config file?

Answer Posted / anand gopal makwa munger

write the code on web.config file Like below

<configuration>
<appSettings/>
<connectionStrings>
<add name="Connection" providerName="System.Data.SqlClient" connectionString="server=abc\Sqlexpress;IntegratedSecurity=SSPI;DataBase=XYZ"/>
</connectionStrings>
</configuration>

and write the code Behind page(ie .cs File)

ConnectionStringSettings con = ConfigurationManager.ConnectionStrings["Connection"];
SqlConnection conn = new SqlConnection(con.ConnectionString);

Is This Answer Correct ?    0 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the concept of event bubbling in ASP.NET?

1155


What is the mvc framework?

1059


What is the maximum number of classes that can be contained in one dll file?

1262


What is a web based system?

1023


What is caching? What are different ways of caching in asp.net?

1392


What are the advantages of Web API?

1166


What are sql notifications and sql invalidations?

994


Can you explain the importance of finalize method in .net?

1087


What is hidden field in asp.net?

1181


What is full trust in asp.net?

1179


Which is better union or union all?

1135


What are the main advantages of using asp.net?

1090


How can we communicate with each server in N-tier Architecture? and what are the methods?

2296


How can we identify that the Page is Post Back?

1060


i want to implement grid view value in paypal site. so how to create this code in asp.net with C#

1989