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

What is considered a service provider?

952


What is the use of placeholder control?

1014


What is the difference between asp.net and mvc?

1109


What are the advantages of the code-behind feature?

982


In Code-Behind class which kind of code (server or client) is found ?

1050


How many languages are supported by .NET at present time?

771


Why cyclomatic complexity is important?

1024


How to integrate angular 8 with asp.net mvc 5? : Asp.Net MVC

879


What is cookies cache and session?

952


Which ASP.NET configuration options are supported in the ASP.NET implementation on the shared web hosting platform?

1111


Why Unload event of MasterPage Calls first in ASP.net ?

1039


How to change Master page in ASP.Net using code?

1060


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

1296


What is cookies in asp net?

938


How many types of sessions in asp.net?

1104