asp.net的webconfig配置,用于身份验证或登录所需的Web服务器

本文关键字:登录 Web 服务器 用于 webconfig net 配置 asp 身份验证 | 更新日期: 2023-09-27 17:49:40

我想在两个不同的服务器上运行一个asp.net网站。在第一台服务器上,登录仅由windows登录处理。这很有效。但在另一台服务器上,我需要注册并使用userID和密码登录。也许我使用了错误的连接设置?

 <appSettings>
    <add key="ConnectionString" value="Password=***;Persist Security Info=true;User id=***-Example;Initial Catalog=AN-Example;Data Source=***.**.**.***"/>

上面的配置适用于第一台工作正常的服务器。我只更改了IP地址。有人已经有同样的任务了吗?

编辑

我还使用以下身份验证模式:

<authentication mode="Windows"/>

当试图打开网站时,我得到以下错误:

Server Error in '/MY/Site' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. 
Parser Error Message: System.Web.UI.HtmlControls.HtmlTableCellCollection must have items of type 'System.Web.UI.HtmlControls.HtmlTableCell'. 'asp:TextBox' is of type 'System.Web.UI.WebControls.TextBox'.
Source Error: 

Line 170:                   </td> 
Line 171:                    <td align="left"; class="style19">
Line 172:                        <asp:TextBox ID="tbCustomer" runat="server" 
Line 173:                            Text="" ValidationGroup="Size" Visible = 'false' Width="100%" TabIndex="4" ></asp:TextBox>
Line 174:                   </td>
Source File: /My/Site/default.aspx    Line: 172 

这可能是由不同的国家/地区/unicode设置引起的吗?第一台服务器来自德国,第二台来自美国

编辑

我不确定,但我认为是数据库的问题导致了错误,我会查看它

asp.net的webconfig配置,用于身份验证或登录所需的Web服务器

<td align="left"; class="style19">

包含分号。应为:

<td align="left" class="style19">

错误表明文本框不是HtmlTableCellCollection的有效子项。我的猜测是,它无法理解带有分号的td标记。