Tagged Questions
12
votes
3answers
6k views
What exactly this error is?
Database i am using is MySQL 5.1. I specified, i believe, right connectionstring in my web.config. but when i run my web app. it throws this exception:-
MySql.Data.MySqlClient.MySqlException: The ...
10
votes
4answers
73k views
How to fix “The ConnectionString property has not been initialized”
When I start my application I get: The ConnectionString property has not been initialized.
Web.config:
<connectionStrings>
<add name="MyDB"
connectionString="Data ...
7
votes
1answer
260 views
Tracking down database connection issues
Background
We have a number of web applications on different web servers that connect to a single database server. Over the past couple months, we have noticed that every once in awhile, our web ...
6
votes
3answers
1k views
Is the database connection in this class “reusable”?
I'm new to asp.net so this might be really basic question, but i cant figure it out.
I found a bit of code on the internet, that connects to database. And i created a namespace and some classes to ...
5
votes
10answers
3k views
Is it acceptable to keep a db connection open for the life of the page?
Everybody knows that you should close a connection immediately after you finish using it.
Due to a flaw in my domain object model design, I've had to leave the connection open for the full page life ...
5
votes
5answers
2k views
Is there a need to secure connection string in web.config?
So I am using connection strings in my web.config using SQL authentication.
Of course people say this could be a vulnerability as you are storing password in plaintext.
However, from what I know, ...
4
votes
6answers
220 views
Is connecting to DB still costlier?
I'm relatively newbie to ASP.NET, and just building my second realtime webapplication.
When I was learning ASP.NET a year back, I have been told "It is costlier to connect and grab data from ...
4
votes
5answers
475 views
Closing a conneciton in the “unload” method
I have inherited a web framework whereby the previous developer has opened and closed his database connections in the init/unload methods of the page life cycle. Essentially constructor is like this ...
4
votes
1answer
538 views
SQL Server 2008 R2 Express error: Cannot open database “PersonnelPro” requested by the login. The login failed
I am using SQL Server 2008 R2 Express and the "SQL Server and Windows Authentication" mode in my database. I can open the database using Enterprise Manager, but when I run my aspx application, I get: ...
3
votes
2answers
3k views
Impersonating a User in Asp.Net
My DBA requires all database access to be done through trusted domain account. This can be done if you set the web.config . This requires the user to login or to be on the domain for IE pass the ...
3
votes
1answer
217 views
how can I enable database logging in my ASP.net application
how can I enable database logging in my ASP.net application?
I am using VS2010 (ASP.net MVC2 Project) and would like to see logging that highlights database activity between the application and the ...
3
votes
4answers
12k views
SQL Express connection string hell ASP.Net
SQL Express 2005 is running locally. I have a project written by another person running on the same machine. All I want to do is connect to it, can't be that hard right?
This is the one I use in my ...
2
votes
4answers
4k views
ASP.NET/ADO.NET: Handling many database connections inside a .NET Object?
We have a .NET object that does a lot of reading/writing with the database. Throughout the life cycle of this object (or the asp page that uses it), it may hit the database with a query/update ...
2
votes
6answers
1k views
ASP.net best practise - where do I connect to database from?
cn = new SqlConnection(
ConfigurationManager.ConnectionStrings["LocalSqlServer"].ToString());
cn.Open();
Where should this code go assuming I have content pages and master pages?
Should I ...
2
votes
5answers
119 views
How to minimize concurrent database connections?
My hosting company blocked my website for using more than 15 concurrent database connections. But in my code I closed each and every connection that I opened. But still they are saying that there are ...