SQL Server Connection in ASP.NET
I choose to write in English because seems many people held problem like I do. I had problem with SQL Server 2000, SQL Server 2005 (Express) in regular basis. I had some thought that the problem related to :
-
Permission
Please check your APP_DATA and APP_CODE folder permission, make sure it contains ASPNET and NETWORK SERVICE. Don't add all just try one by one, if you failed on ASPNET user then you could check NETWORK SERVICE also. -
Web.Config Setting
If you want your DATA stored on APP_DATA make sure had correct connectionString (this just example), change the necessary configuration according to your machine and SQL Instance<add name="DintCoreDB" connectionString="Data Source=DINT\SQLEXPRESS; AttachDBFilename=|DataDirectory|DintCoreDB.mdf; Integrated Security=true; User Instance=true"/>
-
SQL Server it self
SQL Server 2005 with Advanced Service had tricky configuration and it will make a headache, make sure you install this first before all things like Visual Studio. Replacing old instance could direct you into big mess which APP_DATA can't work properly. I don't know why this happen. I keep safe for this one as I don't have much time to experiment.
Hope this works.
Sorry, comments are closed