Hi I am working on my final year project and after over coming one major problem with sql server I have encountered another.
It feels as if I have tried everthing to solve it but cant get my head around it. I really do not have much time left to finish my project and am very worried in case I cant get the app / db fixed in time.
The problem started when I was showing my friend the website over the internet. There was a space in the address / folder name so I decided to create a new folder and copy the contents of the code from the old folder to the new one. This included the app_data directory that holds the databases for my system.
After setting up a virtual directory in IIS v 5.1 i ran the website only to be confronted with not being able to log in.
I have three connections ..... aspnetdb.mdf, x.mdf, y.mdf.
x.mdf and y.mdf are both being read from ok when I run the app but it doesnt seem to be reading from the aspnetdb.mdf database.
I have tried all sorts of things and had all sorts of error messages including:
cant write to database as its read only
cant access database because its already there.
It seems to me that there is more than one aspnetdb.mdf file attached therefore the app is reading from the new one and not the one i want it to.
I will paste the web.config file below. Please note that before i copied and pasted code to a different location this web.config was working fine. Also note that when I hit ctrl+alt+del it shows up 3 sqlservr processes -
sqlServr.exe - Network Service
sqlServr.exe - Rodney (my log on name)
sqlServr.exe - ASPNET
<connectionStrings>
<add name="Classes" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Classes.mdf"
providerName="System.Data.SqlClient" />
<add name="Iftams" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Iftams.mdf"
providerName="System.Data.SqlClient" />
<remove name="UsersDB" />
<add name="UsersDB" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|ASPNETDB.mdf;Integrated Security=True;User Instance=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
I have tried reinstalling sqlserver, creating a new website from the vs2005 ide and also creating a virtual directory first and then copying files to it.
I have also tried attaching to management studio, changing user settings etc
I really dont know what to do next. My head is fried. Please help.
I would really appreciate your help on this one.
Regards in hope
Rodney
The ASP.net forum is a better place to ask questions about ASP.net and Visual Web Developer. You can find all the forums at http://forums.asp.net/ and the forum that is specifically about SQL Express in VWD at http://forums.asp.net/54/ShowForum.aspx.
Regards,
Mike Wachal
SQL Express team
-
Check out my tips for getting your answer faster and how to ask a good question: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=307712&SiteID=1
No comments:
Post a Comment