4 Replies - 560 Views - Last Post: 09 June 2020 - 08:49 AM

#1 aspfun   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 137
  • Joined: 16-January 13

Connection string in web.config file

Posted 08 June 2020 - 02:07 PM

I stored connection string in web.config file in which including server name, user name and password.

Also, I use publish way to compile asp.net apps to web server.

But, IT people said that web.config file need to be encrypted.

Questions.

1) How to encrypt web.config?

2) Is there another way to store connection string?
Is This A Good Question/Topic? 0
  • +

Replies To: Connection string in web.config file

#2 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 15743
  • View blog
  • Posts: 63,068
  • Joined: 12-June 08

Re: Connection string in web.config file

Posted 08 June 2020 - 02:30 PM

Whatcha using? ASP.NET .NET Framework, Core?
Was This Post Helpful? 0
  • +
  • -

#3 aspfun   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 137
  • Joined: 16-January 13

Re: Connection string in web.config file

Posted 08 June 2020 - 02:46 PM

View Postmodi123_1, on 08 June 2020 - 02:30 PM, said:

Whatcha using? ASP.NET .NET Framework, Core?


Framework
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 15743
  • View blog
  • Posts: 63,068
  • Joined: 12-June 08

Re: Connection string in web.config file

Posted 08 June 2020 - 03:18 PM

Pretty straight forward since I think 2.0. Use ASPNET_REGIIS to get the connection string, plunk it into your config, and access it in the form with ConfigurationManager.ConnectionStrings.

https://docs.microso...-information-cs

https://www.codeproj...g-in-Web-Config
Was This Post Helpful? 0
  • +
  • -

#5 no2pencil   User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6865
  • View blog
  • Posts: 31,644
  • Joined: 10-May 07

Re: Connection string in web.config file

Posted 09 June 2020 - 08:49 AM

** Moved to Web Servers & Hosting **
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1