MVC2 project created in VS2010SP1 and am trying to deploy to Windows Server 2003 using Web Deploy publish method. The mdf does exist in my local App_Data folder. I get the above error, followed by"User does not have permission to perform this action."
On the server all of the expected folders are created EXCEPT App_Data. None of the actual files are deployed however.
In the Publish Web dialog I've specified a server administrator account and password and have verified that this account has sysadmin role on SQLExpress on the server. That account also has Full Control permission on wwwroot on the server.
The server's Application Event Log shows an error with Web Deploy as Source echoeing the "...could not be created..." and stating "User does not have permission to perform this action." The event log entry is shown under the Administrator login account.
So, why can't this database be created? Any solutions, or troubleshooting tips would be greatly appreciated!
Do you deploy this site to a shared server or do you operate your own dedicated server? Based on the error message, it seems that you deploy it to a shared server. Please be advised that on a shared server, you are not permitted to create a database directly.
You may wish to consult this issue with your current host first and let me know of the progress you make there.
As followup I'd like to report that I have tried to deploy to a Server 2008 system with the same results; i.e., failure to deploy the database and the same permissions related error message. So, the problems exists on Server 2003 and 2008, IIS6 and IIS7.
Thanks for the response. Yes, ftp is "easier", but I can't (or don't know how) to deploy the database via ftp. Also, ultimately I'll need to transform the config file as well -- so web deploy looks like the Right Way (except of course I can't get it to
work yet!)
Can you tell me how I might verify your diagnosis that there's a missing rule? Is that a setting within VS2010 deploy setup -- or something on the server/IIS side?
Although I've made a bit of (apparent) progress I'm still unable to deploy my app with the database included. I've now verified that the database "install" fails with a deployment package in the same way it fails when I try to "Publish" from VS2010.
Assuming the error message is on target (which I don't really know for sure) it would appear that creation of the database is failing due to bad/missing permissions "somewhere". I've tinkered with permissions within IIS, within SQL Server (adding logins
with sysadmin privs.) etc., but still no joy. One issue of course is, whose credentials are being used at the point where the database is to be created? Also, who is using those credentials (SQL, IIS, ??).
I'd very much appreciate any responses that might lead me down the proper trail. I think I've already explored all the wrong ones!
wlcohagan
Member
8 Points
6 Posts
Web Deployment: |DataDirectory|aspnetdb.mdf Could not be created
Jan 31, 2012 04:43 PM|LINK
MVC2 project created in VS2010SP1 and am trying to deploy to Windows Server 2003 using Web Deploy publish method. The mdf does exist in my local App_Data folder. I get the above error, followed by"User does not have permission to perform this action."
On the server all of the expected folders are created EXCEPT App_Data. None of the actual files are deployed however.
In the Publish Web dialog I've specified a server administrator account and password and have verified that this account has sysadmin role on SQLExpress on the server. That account also has Full Control permission on wwwroot on the server.
The server's Application Event Log shows an error with Web Deploy as Source echoeing the "...could not be created..." and stating "User does not have permission to perform this action." The event log entry is shown under the Administrator login account.
So, why can't this database be created? Any solutions, or troubleshooting tips would be greatly appreciated!
Bill
aspnetdb
necro_mancer
Star
8169 Points
1595 Posts
Re: Web Deployment: |DataDirectory|aspnetdb.mdf Could not be created
Feb 01, 2012 02:58 AM|LINK
hi wccohagan,
Do you deploy this site to a shared server or do you operate your own dedicated server? Based on the error message, it seems that you deploy it to a shared server. Please be advised that on a shared server, you are not permitted to create a database directly. You may wish to consult this issue with your current host first and let me know of the progress you make there.
Thanks heaps!
aspnetdb
Professional SQL 2008 R2 Service
wlcohagan
Member
8 Points
6 Posts
Re: Web Deployment: |DataDirectory|aspnetdb.mdf Could not be created
Feb 01, 2012 01:15 PM|LINK
No, I am not using a shared server. I operate my own server.
Thanks for your response; however server ownership/control is not the issue here.
Regards,
Bill
aspnetdb
wlcohagan
Member
8 Points
6 Posts
Re: Web Deployment: |DataDirectory|aspnetdb.mdf Could not be created
Feb 01, 2012 01:17 PM|LINK
As followup I'd like to report that I have tried to deploy to a Server 2008 system with the same results; i.e., failure to deploy the database and the same permissions related error message. So, the problems exists on Server 2003 and 2008, IIS6 and IIS7.
Bill
aspnetdb
kctt
Contributor
5130 Points
970 Posts
Re: Web Deployment: |DataDirectory|aspnetdb.mdf Could not be created
Feb 02, 2012 01:04 AM|LINK
Most likely web deploy has missing rule in "management service delegation".
Instead of trying to use web deploy, i would say it's easier to use ftp to upload files.
Web deploy is like a blackbox that usually does not work and when it does not work, we don't know what's wrong inside.
wlcohagan
Member
8 Points
6 Posts
Re: Web Deployment: |DataDirectory|aspnetdb.mdf Could not be created
Feb 02, 2012 01:39 AM|LINK
kctt
Thanks for the response. Yes, ftp is "easier", but I can't (or don't know how) to deploy the database via ftp. Also, ultimately I'll need to transform the config file as well -- so web deploy looks like the Right Way (except of course I can't get it to work yet!)
Can you tell me how I might verify your diagnosis that there's a missing rule? Is that a setting within VS2010 deploy setup -- or something on the server/IIS side?
Thanks again,
Bill
wlcohagan
Member
8 Points
6 Posts
Re: Web Deployment: |DataDirectory|aspnetdb.mdf Could not be created
Feb 08, 2012 03:28 PM|LINK
Although I've made a bit of (apparent) progress I'm still unable to deploy my app with the database included. I've now verified that the database "install" fails with a deployment package in the same way it fails when I try to "Publish" from VS2010.
Assuming the error message is on target (which I don't really know for sure) it would appear that creation of the database is failing due to bad/missing permissions "somewhere". I've tinkered with permissions within IIS, within SQL Server (adding logins with sysadmin privs.) etc., but still no joy. One issue of course is, whose credentials are being used at the point where the database is to be created? Also, who is using those credentials (SQL, IIS, ??).
I'd very much appreciate any responses that might lead me down the proper trail. I think I've already explored all the wrong ones!
Thanks in advance,
Bill