Hi,

i have developed a asp.net project(on visual studio 2005) and created a web setup,

this project is running fine while i am running in development enviorment(Visual studio), but

after installing the setup ,my installed website is running but it is not able to access sqlServer Database ...

what i have is

IIS V5.1

Sql server 2005

.net Framework 2.0

service pack 2

also tested in windows server 2003 but its throwing same problem.

i want immidiate help

Dani AI

Generated

As suggested, credentials and permissions are the most common causes; 's question about the connection string is the right next diagnostic. The situation where an app works under the VS development server but fails after installation usually comes from a mismatch between the development connection environment and the production one. The checklist below covers the practical items to verify in order of likelihood.

  • Confirm the deployed connection string matches the working development string (no stray AttachDbFileName/user-instance left from local SQL Express).
  • If using SQL authentication: verify the SQL login works from the server (connect with the same credentials using SQL Server Management Studio).
  • If using Windows authentication: confirm the web process identity (aspnet/Network Service/app-pool identity) has a SQL login and database user mapped with proper rights.
  • Named-instance issues: ensure SQL Browser is running or the instance port is specified; otherwise connections can time out.
  • Network/protocols: enable TCP/IP (and Named Pipes if needed) in SQL Server Configuration Manager and restart the SQL service.
  • Firewall: allow the SQL Server TCP port (default 1433) and UDP 1434 for SQL Browser.
  • Attach/MDf deployments: if the app used an MDF attach in development, attach the DB to the server instance for production and use Initial Catalog; also set NTFS permissions so the SQL Server service account can access the file.
  • Inspect exact error text (IIS logs, ASP.NET stack trace, SQL error log, Windows Event Viewer) — the login error/detail is key to the next step.

Example connection-string patterns (replace names/credentials before use):

Data Source=SERVERNAME;Initial Catalog=DatabaseName;User ID=sqluser;Password=secret;

Data Source=SERVERNAME;Initial Catalog=DatabaseName;Integrated Security=True;

Relevant Microsoft guidance: Connection strings (ADO.NET), , and .

Recommended Answers

All 2 Replies

Hi,
after installing the setup ,my installed website is running but it is not able to access sqlServer Database ...

I suggest a problem with DB credentials or the access to DB server/application. Please check if you can access the DB from that server with that credentials. Also are there read/write permissions for the credentials?
You could have hardcoded bad credentials or URL/PATH to the DataBase.

The webSite is an application without need of data, therefore it is running. But as soon as you need data it goes down.

How you define your connection string in your application?

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.