Anu*_*Anu 4 asp.net master-pages
我创建一个Web应用程序,它从mysql获取数据并在gridview中显示.不同页面的不同数据.但现在我添加了易于用户导航的菜单项.
为此我添加了站点地图,主页面.
我的default.aspx充当登录页面.添加此母版页后,当我尝试打开应用程序时,它会显示以下错误消息.
Server Error in '/' 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: Unable to connect to any of the specified MySQL hosts.
Source Error:
Line 178: <siteMap>
Line 179: <providers>
Line 180: <add name="MySqlSiteMapProvider" type="MySql.Web.SiteMap.MySqlSiteMapProvider, MySql.Web, Version=6.9.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="LocalMySqlServer" applicationName="/" />
Line 181: </providers>
Line 182: </siteMap>
Source File: C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\machine.config Line: 180
Run Code Online (Sandbox Code Playgroud)
下面是default.aspx页面
<%@ Page Language="C#" MasterPageFile="~/Main.master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="SimERP._Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<title>Untitled Page</title>
<style type="text/css">
.style1
{
width: 55px;
}
.style2
{
width: 55px;
height: 32px;
}
.style3
{
height: 32px;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<body>
<link href="CSS/styles.css" rel="stylesheet" type="text/css" />
<form id="form1" runat="server">
<tr>
<td width="20px" class="style2"></td>
<td class="style3">User Name</td>
<td class="style3">Password</td>
</tr>
<tr>
<td align=center class="style1">
</td>
<td align=left>
<asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>
</td>
<td align=l>
<asp:TextBox ID="txtPassword" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td height="60px" align="center">
<asp:ImageButton ID="imgBtnSignIn" runat="server"
ImageUrl="~/images/SignIn.jpg" onclick="imgBtnSignIn_Click" />
</td>
</tr>
</table>
</form>
</body>
</asp:Content>
Run Code Online (Sandbox Code Playgroud)
son*_*rma 15
MySql在机器配置中安装了默认的siteMap提供程序:
<siteMap>
<providers>
<add name="MySqlSiteMapProvider" type="MySql.Web.SiteMap.MySqlSiteMapProvider, MySql.Web, Version=6.9.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="LocalMySqlServer" applicationName="/" />
</providers>
</siteMap>
Run Code Online (Sandbox Code Playgroud)
在system.web部分下面的web.config中添加了以下内容以将其排除
<siteMap>
<providers> <remove name="MySqlSiteMapProvider" /> </providers>
</siteMap>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2538 次 |
| 最近记录: |