I`ve a website that i want to deploy, but it failes because it need to access the ASPNETDB.mdf..
I`m totaly confused, because i`ve deleted this file, but every time i try to publish the website, visual studio add`s the ASPNETDB.mdf to the app_data directory
Does anybody knows how i can stop this in visual studio 2010? or atleast stop visualstudio trying to deploy the aspnetdb?
Are you trying to use ASP.NET Membership services? Because if you are, I think that is the default database it includes for membership management. You have to tell asp.net that you want to use your production database to hold the membership table information,
otherwise it will always include that in your deployment.
Clubict
Member
222 Points
194 Posts
how to prevent deploying ASPNETdb.mdf in visual studio 2010
Dec 21, 2011 12:22 PM|LINK
Hi All,
I`ve a website that i want to deploy, but it failes because it need to access the ASPNETDB.mdf..
I`m totaly confused, because i`ve deleted this file, but every time i try to publish the website, visual studio add`s the ASPNETDB.mdf to the app_data directory
Does anybody knows how i can stop this in visual studio 2010? or atleast stop visualstudio trying to deploy the aspnetdb?
Best regards,
Mark
bbcompent1
All-Star
32974 Points
8500 Posts
Moderator
Re: how to prevent deploying ASPNETdb.mdf in visual studio 2010
Dec 21, 2011 12:28 PM|LINK
Are you trying to use ASP.NET Membership services? Because if you are, I think that is the default database it includes for membership management. You have to tell asp.net that you want to use your production database to hold the membership table information, otherwise it will always include that in your deployment.
Clubict
Member
222 Points
194 Posts
Re: how to prevent deploying ASPNETdb.mdf in visual studio 2010
Dec 21, 2011 12:41 PM|LINK
Hi BBcompent,
Thanks for you quick response!
Yes i`m using the membership service.
Hoi can i tell asp.net to use my production database? (In 2008 i never had this problem)
Best regards,
Mark
bbcompent1
All-Star
32974 Points
8500 Posts
Moderator
Re: how to prevent deploying ASPNETdb.mdf in visual studio 2010
Dec 21, 2011 12:52 PM|LINK
In a similar posting, that can be done this way (see post below)
http://forums.asp.net/post/4729655.aspx
Clubict
Member
222 Points
194 Posts
Re: how to prevent deploying ASPNETdb.mdf in visual studio 2010
Dec 21, 2011 12:55 PM|LINK
The post is unavailable...
bbcompent1
All-Star
32974 Points
8500 Posts
Moderator
Re: how to prevent deploying ASPNETdb.mdf in visual studio 2010
Dec 21, 2011 01:00 PM|LINK
Sorry, url poster here is wierd. Try this one: http://forums.asp.net/post/4729655.aspx
Clubict
Member
222 Points
194 Posts
Re: how to prevent deploying ASPNETdb.mdf in visual studio 2010
Dec 21, 2011 01:03 PM|LINK
Hi bbcompent,
Link is giving me the same result...(The page you are looking for is not available...)(It`s exactly the same link)
bbcompent1
All-Star
32974 Points
8500 Posts
Moderator
Re: how to prevent deploying ASPNETdb.mdf in visual studio 2010
Dec 21, 2011 01:07 PM|LINK
Ok, what I was trying to get to show was this:
Ok, what you need is to add a connection string to the Membership Provider. Put this in where your connection string block is:
bbcompent1
All-Star
32974 Points
8500 Posts
Moderator
Re: how to prevent deploying ASPNETdb.mdf in visual studio 2010
Dec 21, 2011 01:10 PM|LINK
Sorry forgot the part for teh provider name:
<add name="SQLServerMembershipProvider" connectionString="Server;Database=yourdb;User=youruser;Password=yourpassword;" providerName="System.Data.SqlClient" />
Clubict
Member
222 Points
194 Posts
Re: how to prevent deploying ASPNETdb.mdf in visual studio 2010
Dec 21, 2011 01:12 PM|LINK
Still don`t understand you completly..
here is my code..from the config
What must i do then when you remove the connectionstringName and replace it with a connectionstring?