0

I am using Visual Studio 2010 with MVC 3 and MS SQL SERVER 2008 R2. I am working on a website that resides on a server that also has VS 2010 installed on it. I used the stock membership provider methods to create my registered users and roles for the website. I can adjust roles and memberships using the asp.net configuration tool but when I publish to the server the users and roles I created did not get published with the rest of the website. I have researched this problem and have found that most people recommend using a third party tool to do membership updates but I just wanted to check and see if the tech has been updated at all to actually allow updates to the registered users roles without using a third party tool on a deployed/published website?

I have read most of the related posts with this question I am just wondering if anyone knows of any recent changes to the ASP.net configuration tool that would allow me to make the desired changes to the site.

Thanks for your input!

Goldentp
  • 187
  • 1
  • 7
  • 28

2 Answers2

2

I think you are confusing the files of your website with the database that hosts the users / roles. Unless you point your local machine at the live database, just deploying your website will never update the underlying database. See if you can get the database connection string from the live server and using it on your machine...you may be blocked at the firewall or SQL server level if it is an external box.

Josh
  • 10,352
  • 12
  • 58
  • 109
  • Well I thought that since I used the stock membership provider it wasn't using an external DB. I am assuming it is using the mdf DB in the App_Data folder. I hoped it was updating the app_data folder when it published the site but I can see that I was wrong. Is their a way to use the asp.net config tool on a published website or to publish the App_data folder when you publish a website? – Goldentp Jul 23 '12 at 20:19
  • Try looking at this question for uploading the app data folder: http://stackoverflow.com/questions/1570893/asp-net-how-to-deploy-app-data-to-webhost – Josh Jul 23 '12 at 20:21
  • Thanks for your quick response I tried your idea to upload the files to the server and I think it worked but now I think my problem is more modifying the existing roles for the website and since I don't have a .sln file when I deploy I can't open up the VS project to open the asp.net configuration manager. I hope this makes sense. – Goldentp Jul 23 '12 at 20:35
1

The ASP.Net Configuration tool is not really intended for use in production, as it means that the ability to manage Users and Roles is limited to users who have Visual Studio installed.

I'm not too sure that people would really recommend 'third party' tools as such, but I think they would actually mean that you build your own set of add/edit users screens within your MVC site.

If your requirements are such that the only people to ever add/edit users will have Visual Studio installed, you can get away with using the ASP.Net Configuration tool for production use - but you will need to ensure that your solution on your development machine uses the same Membership database as the one on the Production machine.

StanK
  • 4,750
  • 2
  • 22
  • 46