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

Is asp.net a programming language?

1073


Name some asp objects?

1050


What are the differences between code behind and code inline?

1167


How response object is related to asp's response object?

959


How can we inherit a static member?

1112


Explain the use of duration attribute of @outputcache page directive.

1154


How is my content secured from unauthorized access?

1013


Can you explain page lifecycle in net?

1010


Differentiate between authentication and authorization.

1011


What are resource file and how do we generate resource file?

1021


Difference between application events and session events

1069


What is the life cycle of an asp.net page?

964


How could you modify xaml content from javascript?

1060


What is bound controls

1106


Where session id is stored?

1027