Hi

the situation is, My database is online. On one system i have my asp.net project (as a server). i need to access this site in LAN. Means from anywhere i access site the database is live.

Am i right..!!

Now the problem is I am unable to access the database from site. On server it self.
This is when i am using windows 2000 server but its finely running on XP-server.

Can any one tell me why this is......

I am using...

1. Asp.Net 1.0
2. Windows 2000 sever
3. IIS 5.1
4. SQL Server 2000

Dani AI

Generated

The problem described by (site cannot open the database when hosted on the server while it works elsewhere) is almost always an environment or configuration issue, not an ASP.NET code bug. 's simple probe — whether the app runs on the development box — is the right first split: if it works there, focus on server-side differences (IIS identity, network protocols, firewall, SQL configuration).

A practical checklist, in order:

  • Confirm the database service is running and accepts connections from the host. Use Enterprise Manager/Query Analyzer or create a .udl file on the server and use its Test Connection to isolate SQL connectivity from ASP.NET.

  • Verify SQL network protocols are enabled on the server (use the SQL Server Network Utility for older SQL Server). If TCP/IP or Named Pipes are disabled, enable them and restart the SQL service.

  • If using Integrated Security, ensure the account IIS runs under has a SQL Server login and database permissions. For older ASP.NET/IIS setups this is commonly the local ASPNET or machine account.

  • Temporarily test with SQL authentication (a dedicated SQL login) to rule out Windows auth problems. Example connection string for testing:

    Data Source=SQLSERVERNAME;Initial Catalog=MyDatabase;User ID=dbuser;Password=secret;
  • Check for network blocking: confirm SQL is listening on 1433 (or the configured port) and that any host firewall allows inbound traffic. Quick check:

    netstat -ano | find "1433"
  • Review SQL Server error logs and Windows Event Viewer for failed login or network errors; messages there point directly at permission vs protocol failures.

Notes and cautions: the IIS/OS version must be correctly identified before following specific docs (mismatched assumptions cause wasted steps). Avoid leaving the sa account enabled with a weak password — use it only briefly for testing and then secure the server. Error text (exact message) is the key diagnostic; logs or the precise exception will narrow the cause quickly.

Is your application working on your development machine?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.