I developed a WebMatrix site using the StarterSite template. I did add some roles and are using those roles/membership to control access to individual pages. (Trying to deploy has been challenging to say the least; a long list of issues.) I have never successfully been able to "browse" to the website. www.apaicorp.com After, solving many problems, now, I am getting an exception when I go to the website that says roles have not been enabled. This could be related to the database which was one of the challenges to deployment. Anyone got any suggestions other than start-over (this is site 33!)
Are you using SQL CE or a SQL addon for this application? First things first, remove the name LocalSqlServer in your web.config then based on your answer to my question we can look at the next part. <connectionStrings> <remove name="LocalSqlServer" /> </connectionStrings>
I created a WebMatrix site based on the StarterSite and then migrated it to SQL Express before deploying . Using IIS7, I do not see a LocalSqlServer in my connection strings. There certainly is not one in the original web.config I deployed. I added one, (fthoi) and got an error said that I did not have role security enabled. So, I deleted it. BTW, this site 34. I went back and started from scratch, got role/membership running, email, etc. and then deployed the StarterSite. Now you can see that www.apaicorp.com wants to use the connection string LocalSqlServer. Are you saying that I need to add a connection string that says, remove string? OK, I tried to use IIS7 to add a custom string remove string="LocalSqlServer" I actually think this worked. Now I am getting the error that I do not have Role Manager enabled. Actually, that was a typo, I used "remove name" and that did work. Of course role manager now stands in the way. I got a copy of Pro ASP.NET 4 in C# 2010. Chapter 21 is a must have for this subject. I posted a summary (under "SQL Deployment") of what must be done to get a SQL EXPRESS database to run on Winhost. Case CLOSED. Don't bother, following the link. It did not work.