使用ASP.NET网站管理工具时指定ApplicationName

时间:2021-01-03 03:15:21

This tool is supposed to configure users and roles etc., but when I use it on a new web site, with a new aspnetdb database, it adds a record to the aspnet_Applications table with the ApplicationName and the LoweredApplicationName fields set to /. I think it would make more sense if it actually used the application name, i.e. the web site name. Can I safely just change the application name? Is there a better way of configuring these things?

这个工具应该配置用户和角色等,但当我在一个新的网站上使用它时,使用一个新的aspnetdb数据库,它会在aspnet_Applications表中添加一条记录,其ApplicationName和LoweredApplicationName字段设置为/。我认为如果实际使用应用程序名称(即网站名称)会更有意义。我可以安全地更改应用程序名称吗?有没有更好的方法来配置这些东西?

1 个解决方案

#1


If you do change the app name in the database - you need to update your web.config file also to reflect the change.

如果确实更改了数据库中的应用程序名称,则还需要更新web.config文件以反映更改。

Everywhere you see something like:

到处都可以看到:

<add name="MySqlMembershipProvider" connectionStringName="SiteDB" applicationName="/" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" enablePasswordReset="true" requiresQuestionAndAnswer="true"/>

your need to update the applicationName attribute: applicationName="/" with applicationName="your app name"

您需要更新applicationName属性:applicationName =“/”,其中applicationName =“您的应用名称”

#1


If you do change the app name in the database - you need to update your web.config file also to reflect the change.

如果确实更改了数据库中的应用程序名称,则还需要更新web.config文件以反映更改。

Everywhere you see something like:

到处都可以看到:

<add name="MySqlMembershipProvider" connectionStringName="SiteDB" applicationName="/" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" enablePasswordReset="true" requiresQuestionAndAnswer="true"/>

your need to update the applicationName attribute: applicationName="/" with applicationName="your app name"

您需要更新applicationName属性:applicationName =“/”,其中applicationName =“您的应用名称”