I'm authoring a .net webservice that connects to a SQLExpress database in th
e
same project. When the code calls the database the following exception is
thrown:
"An attempt to attach an auto-named database for file
C:\[...]\App_Data\App_Data\MyDatabase.mdf failed. A database with the sa
me
name exists, or specified file cannot be opened, or it is located on UNC
share."
I've read all the online help I can find but none of the suggestions work.
* I've deleted the SQLExpress folder in my ApplicationData
* I've made sure to enable user instances in the server and RECONFIGURE
* I've restarted the service
* I've ensured that ASPNET and NETWORK SERVICE has rights to the APP_DATA
folder.
Nothing changes. What is the cause of this issue' How can I fix it'
Thanks,
JasonSolved.
It took finally writing this post to see that the rendered connection string
renders "APP_DATA" twice.
This is how the project defaults - I didn't do that. Screw them.
Jason
"Jason" wrote:
> I'm authoring a .net webservice that connects to a SQLExpress database in
the
> same project. When the code calls the database the following exception is
> thrown:
> "An attempt to attach an auto-named database for file
> C:\[...]\App_Data\App_Data\MyDatabase.mdf failed. A database with the
same
> name exists, or specified file cannot be opened, or it is located on UNC
> share."
> I've read all the online help I can find but none of the suggestions work.
> * I've deleted the SQLExpress folder in my ApplicationData
> * I've made sure to enable user instances in the server and RECONFIGURE
> * I've restarted the service
> * I've ensured that ASPNET and NETWORK SERVICE has rights to the APP_DATA
> folder.
> Nothing changes. What is the cause of this issue' How can I fix it'
> Thanks,
> Jason|||Congratulations!
Have a great day!
Charles Wang
Microsoft Online Community Support
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment