[英]Host <wrong host> not allowed to connect to this MySQL server trying to deploy IIS ASP.NET website
I need some help trying to deploy an asp.net 2.0 old website. 我需要一些帮助来尝试部署asp.net 2.0旧网站。
I am running: Window 10 version 1803, IIS version 10.0.17134.1 我正在运行: Window 10版本1803,IIS版本10.0.17134.1
Currently the server is running a wordpress site connected to MySQL (let's call it wrong-wp.com). 目前,该服务器正在运行一个与MySQL连接的wordpress网站(我们称其为错误的wp.com)。 I am trying to deploy an old legacy ASP.NET 2.0 site (let's call it right-aspnet.com), with SQL Server 2014.
我正在尝试使用SQL Server 2014部署旧的旧式ASP.NET 2.0网站(我们称其为right-aspnet.com)。
First I tried to browse right-aspnet.com, but IE edge gave me this error 首先,我尝试浏览right-aspnet.com,但是IE edge给了我这个错误
Error Code: INET_E_DOWNLOAD_FAILURE
. Error Code: INET_E_DOWNLOAD_FAILURE
。
Chrome gave me this Chrome给了我这个
error: empty page return
. error: empty page return
。
I restarted the server, restarted my computer, nothing changed. 我重新启动服务器,重新启动计算机,没有任何更改。 So I added an html page, index.htm.
因此,我添加了一个HTML页面index.htm。 Both browser rendered fine, both return the page.
两种浏览器都可以正常显示,都可以返回页面。 So I figured it is not a problem with DNS.
因此,我认为DNS并不是问题。 Maybe I was wrong.
也许我错了。 When I browse the site, I realized both browsers tried to add www in front of the domain, so I bind the www.right-aspnet.com and added onto the host file.
当我浏览该站点时,我意识到这两种浏览器都试图在域的前面添加www,因此我将www.right-aspnet.com绑定并添加到主机文件中。
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: Host 'wrong-wp.com' is not allowed to connect to this MySQL server
Source Error:
Line 175: <siteMap>
Line 176: <providers>
Line 177: <add name="MySqlSiteMapProvider" type="MySql.Web.SiteMap.MySqlSiteMapProvider, MySql.Web, Version=6.9.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="LocalMySqlServer" applicationName="/"/>
Line 178: </providers>
Line 179: </siteMap>
Source File: C:\Windows\Microsoft.NET\Framework\v2.0.50727 \Config\machine.config Line: 177
Version Information: 版本信息:
Microsoft .NET Framework Version:2.0.50727.8922;
ASP.NET Version:2.0.50727.8922
Any idea why it is looking into the wrong host 'wrong-wp.com' and trying to connect to MySQL? 知道为什么它要寻找错误的主机“ wrong-wp.com”并尝试连接到MySQL吗?
Any help to fix this problem is greatly appreciated!! 任何帮助解决此问题的帮助将不胜感激! Thanks!!
谢谢!!
Create new user with new password and grant privileges: 使用新密码创建新用户并授予特权:
CREATE USER 'name'@'localhost' IDENTIFIED BY 'pass';
GRANT ALL PRIVILEGES ON *.* TO 'name'@'localhost' WITH GRANT OPTION;
CREATE USER 'name'@'%' IDENTIFIED BY 'pass';
GRANT ALL PRIVILEGES ON *.* TO 'name'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
I got it working by deleting line 177 right out from the machine.config file. 我通过直接从machine.config文件中删除第177行来使其工作。
Line 177: <add name="MySqlSiteMapProvider" type="MySql.Web.SiteMap.MySqlSiteMapProvider, MySql.Web, Version=6.9.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="LocalMySqlServer" applicationName="/"/>
Since it is pointing to the .net framework directory 由于它指向.net Framework目录
C:\Windows\Microsoft.NET\Framework\v2.0.50727 \Config\machine.config
I can safely assume no MySQL is going to be used for any asp.net v2.0 sites. 我可以放心地假定,任何asp.net v2.0网站都不会使用MySQL。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.