In VS2005 beta2/MS-SQL EXPRESS if you are publishing your site to IIS virtual directory, attempt to access default user database (App_Data\aspnetdb.mdf) will fail. You will likely receive error message similar to this:
Failed to update database "D:\WebSites\ASPNET20CC\App_Data\ASPNETDB.MDF" because the database is read-only.
To reproduce the problem:
- Create simple web site with LoginControl and CreateUserWizard
- Publish site to IIS
- Browse login page from IIS virtual directory instead of Casiny
- Try to create new user or login with existing one
To fix the problem:
- Detach aspnetdb database from SQLEXPRESS using sseutil.exe utility.
- Remove *.mdf and *.ldf files from App_Data application directory
- Grant Read/Write access on App_Data to working process identity (ASPNET for IIS5.X or NETWORK SERVICE for IIS6)
- Copy *.mdf, *.ldf files back into App_Data folder
- Run application, refresh if any connection related error received
This bug is announced and fixed in later build of SSE. You can see full description here.