Last post Jun 07, 2013 06:47 PM by asus3000
Jun 07, 2013 03:50 PM|asus3000|LINK
Despite setting the applicationName in the web.config to "demo", it still sets the applicationName in the SQL aspnet_Applications table to "/". I have searched back and forth across the web.
You can see the applicationName set to "demo" on the 5th line of this web.config:
type="System.Web.Security.SqlMembershipProvider, System.Web, Version=126.96.36.199, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
When I check the database table - no results as expected:
select * from aspnet_Applications
0 rows selected.
Okay perfect. Next. I add a role in the ASP.net Web Site Administration Tool:
Take a look back at the database:
Why isn't it writing the proper ApplicationName? Any help would be greatly appreciated!
Jun 07, 2013 05:08 PM|Rion Williams|LINK
The '/' in this case is simply referring to the root directory of the application (as your SQL database is rather ignorant when it comes to your application in general).
The following artciles discuss a similar issue and answers a few questions regarding the "applicationName" property :
Jun 07, 2013 05:52 PM|asus3000|LINK
Thanks. I already read both of those articles in my research.
As far as I could tell, they both say that the ApplicationName should contain the actual applicationName.
Problem is, when I create a user then it creates a second application row:
This second record is good, it's the one I want. I've had this application in dev for 3 years and haven't been able to figure this out. It's going into production soon and I forsee this as a nightmare.
If I create the User first, it creates the "demo" row. But then when I create a role, it creates the "/" row. There are always two application rows if I have roles - this can't be right.
OH Wow, I think I just figured out that I need to beef up the RoleManager.
Jun 07, 2013 06:47 PM|asus3000|LINK
I had a roleManager, but I needed to beef it up a bit. It needs the same applicationName as the membership section.
This is my roleManager now: