Web.config影响共享主机帐户中的其他域

时间:2012-09-09 11:52:35

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

我可以选择在共享主机帐户上托管多个域。 我必须在根文件夹中托管我的主域,而其他域可以托管在该根文件夹中,并为其托管的每个域提供单独的文件夹。 主域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仍然正常。

我错过了任何一小部分信息吗?

1 个答案:

答案 0 :(得分:1)

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

如果您在辅助域中添加,则可以清除上一级的连接字符串:

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