473,769 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

2.0: error opening ASPNETDB

RAM
Hello,
I have written simple ASP.NET application with logging in. I need to
open ASPNETDB database to read some information which is not available
using class library (custom table).
I have written:

using (SqlConnection aspnetdb = new
SqlConnection(C onfigurationMan ager.Connection Strings["ASPNETDB"].ConnectionStri ng))
{
aspnetdb.Open() ; // here problem
...
}
In web.config I have:
<add name="ASPNETDB" connectionStrin g="Data
Source=localhos t;Initial catalog=MIMMaga zynASPNETDB;Int egrated
Security=True;U ser Instance=True"/>

The problem occurs on opening ASPNETDB:
aspnetdb.Server Version...Messa ge is "Invalid operation. The connection
is closed."
aspnetdb.Server Version...Stack Trace is
" at System.Data.Sql Client.SqlConne ction.GetOpenCo nnection()\r\n
at System.Data.Sql Client.SqlConne ction.get_Serve rVersion()"

Please help.
/RAM/

PS. I really need to open ASPNETDB.
Jul 20 '06 #1
0 1183

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1636
by: Bendik Engebretsen | last post by:
I have made an ASP.NET 2.0 WebSite using the 'Personal WEB site' starter kit. It runs fine on my XP machine where I have the VStudio.NET 2005 Beta installed. But if I try to run it from our Win 2003 Server I get the following error: "Database 'D:\WEBSITES\BENDIK\APP_DATA\ASPNETDB.MDF' cannot be upgraded because it is read-only or has read-only files. Make the database or files writeable, and rerun recovery. An attempt to attach an...
2
4367
by: keithb | last post by:
This is on a remote server. Everything works in the development envirmonment. Any ideas? Thanks, Keith Failed to update database "C:\BTM_ROOT\APP_DATA\ASPNETDB.MDF" because the database is read-only. Description: An unhandled exception occurred during the execution of the
2
1310
by: JoeFusion | last post by:
Hi folks, I am trying to use the new User Profile functionality in ASP.Net 2, and on initial impression, it looked simple enough to use. But I seem to be getting in a bit of a mess as to what is going on internally, making it difficult for me to trace the SQL connectivity errors I seem to be getting suddenly. I have my own SQL Express database, on which I've run aspNet_regsql utility
1
2946
by: 3Dfelix | last post by:
Problems when uploading ASPNETDB.MDF to production server Hi all, I'm a little web with a login page and aspnetdb.mdf file as data base for users. I've done it on local server, with VS2005 and SQLExpress. On local it run OK. The problem araise when I upload the precompiled site to a production server. On production server I have SQLserver 2000. I have read that I need to create on server the same db using the command aspnet_regsql.exe. ...
1
1840
by: CFTK | last post by:
This is the error I get when I try to login in my application from another machine: An attempt to attach an auto-named database for file C:\Documents and Settings\....\App_Data\aspnetdb.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. What should I do..? I´m lost..!
3
1988
by: GaryDean | last post by:
I noticed that my asp.net project contains a 10 meg ASPNETDB.MDF database in the App_data folder. I never intentionally put it there, have never ran regsql.exe. Reading back on my logs it got there on March 7th the day I was adding some web references. How might this have gotten added to the project? -- Regards, Gary Blakely
4
6711
by: jobs | last post by:
Works great on my client when I test from vs.net 2005. Howevever, when I deploy to the web server, I get this error: remotely and local from the web server. An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error...
0
2509
by: jobs | last post by:
I renamed the name of my remote database where I had a working AspNetdb configuration working. I now get this error when I compile in development: An error occurred during the execution of the SQL file 'InstallCommon.sql'. The SQL error number is 1802 and the SqlException message is: CREATE DATABASE failed. Some file names listed could not be created. Check related errors. Cannot create file 'C:\xx\xx\APP_DATA\ASPNETDB_TMP.MDF'...
13
3332
by: AAaron123 | last post by:
I downloaded the personal website starter kit and when I run it I get the error shown below. I found a way of using Launch Surface Area Configuration that is supposed to fix the remote setting but I tried it and still get the error. I do not have SQL Server 2005 installed (thought I did once). I do have SQL Server 2008 installed. I don't see anywhere in the code where SQL Server 2005 is referenced.
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10210
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9990
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8869
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7406
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5297
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5445
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3560
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2814
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.