User Name Password Register
DaniWeb IT Discussion Community
All
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
Reply
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,123
Reputation: majestic0110 is on a distinguished road 
Rep Power: 3
Solved Threads: 47
majestic0110's Avatar
majestic0110 majestic0110 is online now Online
Veteran Poster

Re: ASPNETBD.mdf deployment problem

  #21  
May 16th, 2008
have you tried setting up a new user and logging in with their credits? try it...
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!
Reply With Quote  
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,123
Reputation: majestic0110 is on a distinguished road 
Rep Power: 3
Solved Threads: 47
majestic0110's Avatar
majestic0110 majestic0110 is online now Online
Veteran Poster

Re: ASPNETBD.mdf deployment problem

  #22  
May 16th, 2008
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!
Reply With Quote  
Join Date: May 2008
Posts: 18
Reputation: nmpgaspar is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
nmpgaspar nmpgaspar is offline Offline
Newbie Poster

Re: ASPNETBD.mdf deployment problem

  #23  
May 16th, 2008
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
Last edited by nmpgaspar : May 16th, 2008 at 12:36 pm.
Reply With Quote  
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,123
Reputation: majestic0110 is on a distinguished road 
Rep Power: 3
Solved Threads: 47
majestic0110's Avatar
majestic0110 majestic0110 is online now Online
Veteran Poster

Re: ASPNETBD.mdf deployment problem

  #24  
May 16th, 2008
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.
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!
Reply With Quote  
Join Date: May 2008
Posts: 18
Reputation: nmpgaspar is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
nmpgaspar nmpgaspar is offline Offline
Newbie Poster

Re: ASPNETBD.mdf deployment problem

  #25  
May 16th, 2008
Ok, i could only see that post now, i will give it a go.

I will try to setup a tunnel to the webserver, since it's on a secured lan. Else i will test that monday and get back to you!

Thanks a lot for your help dude!
Last edited by nmpgaspar : May 16th, 2008 at 4:13 pm.
Reply With Quote  
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,123
Reputation: majestic0110 is on a distinguished road 
Rep Power: 3
Solved Threads: 47
majestic0110's Avatar
majestic0110 majestic0110 is online now Online
Veteran Poster

Re: ASPNETBD.mdf deployment problem

  #26  
May 16th, 2008
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!
Reply With Quote  
Join Date: May 2008
Posts: 18
Reputation: nmpgaspar is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
nmpgaspar nmpgaspar is offline Offline
Newbie Poster

Re: ASPNETBD.mdf deployment problem

  #27  
May 19th, 2008
Hello mate!

When checking my SQL Server Management i do not see any ASPNETDB.mdf file. I think it's not "seeing" my database on my website.

Is that normal?

I saw that when adding the user"Computer_Name\NETWORK SERVICE" to grant write permissions..
Reply With Quote  
Join Date: May 2008
Posts: 18
Reputation: nmpgaspar is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
nmpgaspar nmpgaspar is offline Offline
Newbie Poster

Re: ASPNETBD.mdf deployment problem

  #28  
May 19th, 2008
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)"
Reply With Quote  
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,123
Reputation: majestic0110 is on a distinguished road 
Rep Power: 3
Solved Threads: 47
majestic0110's Avatar
majestic0110 majestic0110 is online now Online
Veteran Poster

Re: ASPNETBD.mdf deployment problem

  #29  
May 19th, 2008
Hi, does 'public' have full access 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!
Reply With Quote  
Join Date: May 2008
Posts: 18
Reputation: nmpgaspar is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
nmpgaspar nmpgaspar is offline Offline
Newbie Poster

Re: ASPNETBD.mdf deployment problem

  #30  
May 20th, 2008
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..
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb ASP.NET Marketplace
Thread Tools Display Modes

Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 2:29 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC