Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4112346
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:11:02+00:00 2026-05-20T22:11:02+00:00

im using a shared hosting company to host my site and db. they are

  • 0

im using a shared hosting company to host my site and db.
they are both being hosted on the same server.

to access the db i am currently supplying userid and password in the connection string within the web config.

this just makes me really uncomfortable.

is there i way to avoid giving userid/pass in web.config connection string?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T22:11:03+00:00Added an answer on May 20, 2026 at 10:11 pm

    You can switch to OS authentication:

    Data Source=myServerAddress;Initial
    Catalog=myDataBase;Integrated
    Security=SSPI;

    In this case grant db access to the account your site runs under. Or, just encrypt your connectionStrings section in web.config.

    Update:
    I’m not sure how this happens in hosting environments (the hoster should have some FAQ), but if your server is dedicated one and you have administrative privilegies on your Sql Server you can do that like

    create login [NT AUTHORITY\NETWORK SERVICE] from windows
    create user [NT AUTHORITY\NETWORK SERVICE] for login [NT AUTHORITY\NETWORK SERVICE]
    exec sp_addrolemember 'db_datareader',[NT AUTHORITY\NETWORK SERVICE]
    

    The account to grant access to is one the application pool in IIS is running under. NetworkService is default for IIS 6.0 but if the server is shared you probably have a custom account (granting access to NetworkService on shared server will expose your db to any service running under NetworkAccount).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using a shared hosting service to host my site so I can't
I am using a shared hosting through CIPL.in. They use cpanel. I am trying
I have a site developed in ASP.NET and hosted on a windows server using
I am using shared hosting with IIS7 and support for PHP. I am trying
I am using the ssl_requirements plugin on shared hosting account. This hosting provider uses
I'm using local shared objects within flash both to store significant amounts of user
Today we're using a shared SQL Server database and that is perfect as I
I built a client server application using posix shared memory and posix unnamed semaphores
How to protect database username and password in shared hosting enviornment using spring <bean
I'm currently having some trouble with my shared hosting as I can't use sessions

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.