简体   繁体   中英

How to access database in asp.net on Lan (IIS Server)

I have an asp.net website that runs on my localhost and creates records on Sql server 2008 on my machine. When i try to run this website over LAN (from an other pc) the pages that don't have any relation with the database run.
The other pages that shows records don't run.
Any solution for this?

Thanks in advance.

  1. Ensure your connection string is correctly pointing to the SQL Server with the right credentials.
  2. Ensure the SQL server can be connected remotely by opening up port 1433, 1434 etc in the Firewall. (else you'll get an error like 'a network-related or instance specific error...')

Why am I getting "Cannot Connect to Server - A network-related or instance-specific error"?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM