i create a web application that it's get data from mysql and display in gridview. Different pages for different data. But now i added menu items that will be easy for user to navigate.
For that i added sitemap, Master page.
My default.aspx act as a login page. After adding this master page, when i try to open application it shows below error message.
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
Below is default.aspx page
<%@ 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>
MySql installed a default siteMap provider in the machine config:
<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>
Added following to web.config under the system.web section to exclude it
<siteMap>
<providers> <remove name="MySqlSiteMapProvider" /> </providers>
</siteMap>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With