Solved

Deploying ASP.net roles to Production

Posted on 2009-07-08
2
505 Views
Last Modified: 2013-12-12
Hi, I'm having an issue with my .net role provider when I try to move my code to the production server. Everything works fine in my local, but once it is copied over to our production server it just doesn't work anymore. It seems like it does not recognize the location of the roles databases. Membership along copies over and works just fine, as I tried this before enabling the roles.

After googling for a solution I found an article that suggested to overwrite a hidden connection string for my role provider and make sure that it pointed to my database, it also required that I took my aspnetdb.mdf database from my app_data folder and attach it to my sql server.. one problem I'm having with this particular process is that my aspnetdb.mdf seems to be in a 2008 version of sql express, where our production servers runs a 2005 version, therefore when I try to attach it.. it just gives me an error and stops.

Is this the right approach at all? or is there anything else I could try in order to fix this???
0
Comment
Question by:LostInCode
2 Comments
 
LVL 18

Accepted Solution

by:
David Robitaille earned 500 total points
ID: 24813934
Did you see that one ? did you  set an applicationName for the Role provider in the Web.config?
http://weblogs.asp.net/scottgu/archive/2006/04/22/Always-set-the-_2200_applicationName_2200_-property-when-configuring-ASP.NET-2.0-Membership-and-other-Providers.aspx 
also, if you use another databes in your app, you could merge the aspnetdb.mdf with it

http://www.4guysfromrolla.com/articles/040506-1.aspx
you could also use this techinque on a new datebase on your SQL 2005 server and then recreate your roles (or copy your data on the new tables...)
0
 

Author Closing Comment

by:LostInCode
ID: 31601085
Thanks this worked!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Can't see Ubuntu desktop on KVM switch unless I reboot the PC 22 64
imap mails 1 24
Application Crash 2 23
asp.net mvc5 6 17
A list of useful business intelligence software.
Let’s list some of the technologies that enable smooth teleworking. 
The viewer will learn how to create multiple layers to apply various filters and how to delete areas from each layer’s filter.
This video demonstrates how to use each tool, their shortcuts, where and when to use them, and how to use the keyboard to improve workflow.

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question