Need help with ASP.Net 2.0 SQL connection error

Soldato
Joined
5 Aug 2006
Posts
4,261
So this morning i started fiddling with ASP.net 2.0 since i was board and think i need it for collage.. anyway

all went well then for no apparent reason the login boxes and password recovery etc bits dont work.

They work fine if i boot up VWD and debug the application but if i close it, and try and get to the site normally it dosent work.

Thing is as far as i can remember it was working so i've probably 'ed something up (although i cant remember fiddling with anything!)

Firstly the server is IIS 5.1 or whatever the one that comes with XP pro is

My connection string in the ASP.net settings is :

data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true

looks right to me?

and the actual error is

Failed to update database "C:\INETPUB\WWWROOT\APP_DATA\ASPNETDB.MDF" because the database is read-only.



apparently. the physical file system is fine, its not checked as read-only. and just for safe measure i tried allowing the site to read and write and all that in the properties in IIS.

so any ideas?

tia

alec
 
1) Make sure App_Data directory or any contained files does not have file system attribute Read-only set.

2) Give user ASPNET and NETWORK SERVICE Modify control over the App_Data directory.

3) Run IISRESET to restart IIS to refresh its permissions.
 
1) Make sure App_Data directory or any contained files does not have file system attribute Read-only set.

2) Give user ASPNET and NETWORK SERVICE Modify control over the App_Data directory.

3) Run IISRESET to restart IIS to refresh its permissions.
2) did the trick,

your a star. im actualy a little embarrised i didn't check this mysql! << lmao i honestly just typed that. myself* sorry.

thanks a lot

:cool:

ta

alec



*edit*

and your first post too. top man
 
Back
Top Bottom