I'm new to .NET so I'm getting my feet wet using MS Webmatrix. Publishing the site (not FTP but published from WebMatrix) appeared to be successful. But when running it online I immediately get this error: System.Configuration.Provider.ProviderException: The Role Manager feature has not been enabled. Line 2: WebSecurity.InitializeDatabaseConnection("StarterSite", "UserProfile", "UserId", "Email", true); Any suggestions would be much appreciated!
Yeah this is difficult because webmatrix doesn't really setup the roles for the form authentication. Try this. Download MS Visual Web Developer 2010. This is a free version of VS 2010. Now, open Visual Web Developer and try to navigate to your site that should be on your local computer. A copy should still exist on your computer. Once you have it opened you can go to Tools/Web Site Administration tool and setup the roles and provider for your site. Make sure you have the web.config file pointing to Winhost SQL 2008 server and the database we gave you. It doesn't matter if the website you are accessing is on your computer. What matters is that it is pointing to our SQL server. Once you created the roles and users, then you can pull up your site that is hosted on our web server and input the login and password you just created.
Hello, I have followed the above instructions, however I am getting this error. Any help is greatly appreciated! I have double-checked my credentials. I am using WebMatrix to build my site, and no matter what I do, it just keeps throwing errors at me.
It does not look like the membership/roles schema was created on your database. Try looking at this kb article and try running the aspnet_regsql.exe against your database to created the membership/roles schema. http://support.Winhost.com/KB/a619/how-to-configure-the-aspnet-membershiproles-provider.aspx
Thank you @Ray. I already added the connectionString from that KB article a while ago however what I would <b>love</b> to know is why all these features (Roles/Authentication/etc etc etc) work when Running locally via webmatrix and also when I upload a customers site to applied-i.net? But not Winhost? Correct me if I'm wrong, but to me that suggests that Winhost's configuration is different, or lacks certain configuration?
Everything you experienced shows that you updated the connection string to point to the Winhost SQL server. Webmatrix is a little fun and weird in a way where you can use SQL compact edition but you need to upload all the required files/binaries/assemblies to our web server. Sometimes when the customer updates the connection string to point to a full SQL 2008 version rather than use the SQL CE version the fail to also migrate the objects and data in their SQL CE to our SQL 2008 server.
Issues with Configuration I am using the IIs 7 Remote manager, and I have already configure successfully configured the Database with the Sql Memberships schema. But when I try to create the users and the roles I get the following error. --------------------------- .NET Roles --------------------------- This feature cannot be used because the default provider type could not be determined to check whether it is a trusted provider. You can use this feature only when the default provider is a trusted provider. If you are a server administrator, you can make a provider a trusted provider by adding the provider type to the trusted providers list in the Administration.config file. The provider has to be strongly typed and added to the GAC (Global Assembly Cache). Please advice
We've encountered this issue before. It is indicative to the version of IIS 7 Manager you have installed on your computer versus the version of IIS 7 we have running on our server. The work around is to define the Users/Roles/Providers for your ASP.Net Membership Provider using Visual Studios Website Administration Tool. Try looking at this kb article. http://support.Winhost.com/KB/a619/how-to-configure-the-aspnet-membershiproles-provider.aspx
Did anyone ever get this to work? I elevated this to the asp.net forums and their procedures are the same as the comments/KB in Winhost. Still does not work on Winhost.
What do you mean? I think you maybe talking about MS Razor to setup your web forms. With Razor the process is totally different. If you build your ASP.Net Membership/Roles provider with the traditional ASP.Net templates then the process should work. But if you decide to use Razor, well, lets just say its a little more complicated then that.
Hi. I am not using MVC but Razor C#. My site does not have a bin folder as in MVC. What do I have to do to get Razor to work? This thread explains the process with MVC: http://forum.Winhost.com/showthread.php?t=8458&highlight=asp.net+mvc Thanks.