【问题标题】:Web.config affecting the other domains in shared hosting accountWeb.config 影响共享主机帐户中的其他域
【发布时间】:2012-09-09 11:52:35
【问题描述】:

我可以选择在一个共享主机帐户上托管多个域。 我必须将我的主域托管在根文件夹中,而其他域可以托管在该根文件夹中,并且每个域都托管在单独的文件夹中。 主域 domain1.com 运行良好。 但是,当我为我的 domain2.com 创建一个新文件夹时,它的配置文件夹名称为“domain2”,并上传了一个静态welcome.html 页面,它显示以下错误:

Server Error in '/domain2' Application.

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 

Parser Error Message: Could not load file or assembly 'MySql.Web' or one of its dependencies. The system cannot find the file specified.

Source Error: 


Line 37:            <providers>
Line 38:                <clear/>
Line 39:                <add connectionStringName="domain1MembershipDB" applicationName="/" autogenerateschema="true" name="MySqlRoleProvider" type="MySql.Web.Security.MySQLRoleProvider, MySql.Web"/>
Line 40:            </providers>
Line 41:        </roleManager>

Source File: D:\Hosting\4343434\html\web.config    Line: 39 

Assembly Load Trace: The following information can be helpful to determine why the assembly 'MySql.Web' could not be loaded.


WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

但这是与我的主域 domain1.com 的 web.config 文件相对应的行,并且 domain1.com 仍然可以正常工作。

我是否遗漏了任何一点信息?

【问题讨论】:

    标签: asp.net mysql web-config shared-hosting


    【解决方案1】:

    这是因为您的辅助域继承了 web.config 定义,但没有引用必要的 dll MySql.Web.dll

    在二级域中添加可以清除上一级的连接字符串:

    <roleManager>
       <providers>
         <clear/>
       </providers>
    </roleManager>
    

    【讨论】:

    • 感谢提供线索。
    猜你喜欢
    • 1970-01-01
    • 2013-07-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-11-23
    • 2011-12-05
    • 2017-08-18
    • 1970-01-01
    相关资源
    最近更新 更多