•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 391,687 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,207 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 1171 | Replies: 36 | Solved
![]() |
•
•
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,123
Reputation:
Rep Power: 3
Solved Threads: 47
•
•
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,123
Reputation:
Rep Power: 3
Solved Threads: 47
Apparently if you didn't set applicationname in the membership provider/rolemanager setting in the web.config, and access your application from different places(e.g. using application running on you local or on the server, even they are using same database) will create different application in the aspnet_applications table. Users created in one place cannot be used in other place.
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
•
•
Join Date: May 2008
Posts: 18
Reputation:
Rep Power: 1
Solved Threads: 0
When trying to add new users in runtime after deployment, i get:
Failed to update database "C:\INETPUB\WWWROOT\SITE\APP_DATA\ASPNETDB.MDF" because the database is read-only.
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: Failed to update database "C:\INETPUB\SITE\WWWROOT\ASPNETDB.MDF" because the database is read-only.
But in my VS2008, i can add users without problem.
gonna look for how to solve this error
Failed to update database "C:\INETPUB\WWWROOT\SITE\APP_DATA\ASPNETDB.MDF" because the database is read-only.
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: Failed to update database "C:\INETPUB\SITE\WWWROOT\ASPNETDB.MDF" because the database is read-only.
But in my VS2008, i can add users without problem.
gonna look for how to solve this error
Last edited by nmpgaspar : May 16th, 2008 at 12:36 pm.
•
•
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,123
Reputation:
Rep Power: 3
Solved Threads: 47
Check the file attributes in the website directoy. Ensure that the db is not marked read only and that the folder structure that contains it is also not read only. We will get there mate!
EDIT
Also, do this:
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. P.S. It is a good idea that you read the below article as restarting IIS can have some negative consequences and should generally be avoided.
Here are some instructions on granting ASPNET and NETWORK SERVICE control permissions:
http://forums.asp.net/t/1221631.aspx
Here is the low down on IISRESET:
http://technet2.microsoft.com/window....mspx?mfr=true
Hope this helps you.
EDIT
Also, do this:
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. P.S. It is a good idea that you read the below article as restarting IIS can have some negative consequences and should generally be avoided.
Here are some instructions on granting ASPNET and NETWORK SERVICE control permissions:
http://forums.asp.net/t/1221631.aspx
Here is the low down on IISRESET:
http://technet2.microsoft.com/window....mspx?mfr=true
Hope this helps you.
Last edited by majestic0110 : May 16th, 2008 at 1:27 pm.
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
•
•
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,123
Reputation:
Rep Power: 3
Solved Threads: 47
That's ok, I am just sorry I haven't managed to help you out totally yet. There is still time.....lol. I am deteremined to help fix this one!
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
•
•
Join Date: May 2008
Posts: 18
Reputation:
Rep Power: 1
Solved Threads: 0
I tryed to add it myself explicitly by doing:
Databases > Attach > Writing_The_Full_Path_for_ASPNETDB.mdf
but i got:
"Failed to retrieve data from this request.
Additional information:
An exception occured while executing Transact-SQL statement or batch.
User 'public' does not have permission to run DBCC checkprimaryfile. (Microsoft SQL Server, error: 2571)"
Databases > Attach > Writing_The_Full_Path_for_ASPNETDB.mdf
but i got:
"Failed to retrieve data from this request.
Additional information:
An exception occured while executing Transact-SQL statement or batch.
User 'public' does not have permission to run DBCC checkprimaryfile. (Microsoft SQL Server, error: 2571)"
•
•
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,123
Reputation:
Rep Power: 3
Solved Threads: 47
Hi, does 'public' have full access permissions?
i.e CREATE DATABASE, CREATE ANY DATABASE, or ALTER ANY DATABASE permissions.
i.e CREATE DATABASE, CREATE ANY DATABASE, or ALTER ANY DATABASE permissions.
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
•
•
Join Date: May 2008
Posts: 18
Reputation:
Rep Power: 1
Solved Threads: 0
Ok, i added a user to the SQL Express with all priveliges. I am now able to browser and attach the ASPNETBD.mdf.
But when clicking the final 'OK' i got:
"Unable to open physical file
c:\inetpub\wwwroot\myWebSite\App_Data\aspnetbd.mdf
operating system error 5: Access denied."
Gonna look on how to set those permissions..
But when clicking the final 'OK' i got:
"Unable to open physical file
c:\inetpub\wwwroot\myWebSite\App_Data\aspnetbd.mdf
operating system error 5: Access denied."
Gonna look on how to set those permissions..
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
Other Threads in the ASP.NET Forum
- Previous Thread: Please Help.login in asp
- Next Thread: showModalDialog



Linear Mode