Unable to achieve database connectivity with my ASP.NET web application

Note : Apologies for the poorly formatted text in this post.

Hello all,

I am a novice web application developer and I use Visual Studio 2005 (Full) to build my applications

I have successfully set up a domain @ http://devlab.uni.cc

I have an ASP 2.0 web application which runs successfully on my
computer with no errors and problems. (It uses a membership system, and I have created Admninistrator account. I have tested it and it works successfully.) I uploaded all the contents of my
project folder to the directory /www/app through FTP, all successfully
deployed with no errors.

The entire application is present in the directory /www/app [Including the
Default.aspx file].

Now, when I visit the page http://devlab.uni.cc/app, it throws an SQL Exception.

The details of the exception are as follows (Please visit the page for the
full details of the error) :

Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: An attempt to
attach an auto-named database for file
E:\wwwdata\5c773e6f\www\app\App_Data\Personal.mdf failed. A database with
the same name exists, or specified file cannot be opened, or it is located
on UNC share.

The above exception was thrown for Personal.mdf, but I have also seen it being thrown for the second database of my project, which is ASPNETDB.mdf.

Both these databases in my App_Data folder : Personal.mdf and ASPNETDB.mdf

My files are organized in the following manner in the project folder (the
/www/app directory i.e)(click the link below to see a picture of how I've
organized the files and folders in my project folder) :
http://img.photobucket.com/albums/v77/techblues/pic.jpg

My databases are present in the App_Data folder inside the app directory.
They are SQL Server '05 databases, if that helps.

I'd like to know what the possible cause of the error is and how to
rectify it.

A big thank you for reading this. If I can help you help me by providing more information about my project, then I will surely try to do so.

Regards,
Sridhar aka .NETBloake

PS : I have debugging enabled in my web.config file so that the sourced code which threw the exxception can be seen, if that's of any help :)


Answer this question

Unable to achieve database connectivity with my ASP.NET web application

  • RapidLord

    1) Try attaching the files manually.

    2) Check the default connection string in machine.config.



  • Unable to achieve database connectivity with my ASP.NET web application