DotNetNuke 网站迁移到 Azure 失败,出现 nx 域 DNS 错误

DotNetNuke website migration to Azure fails with nx domain DNS error

我目前正在 DotNetNuke 网站 (07.03.02) 上工作,我正在尝试 将其迁移到 Azure。网站 正在我的本地计算机上使用 IIS

我按照这个教程迁移了网站:http://www.dnnsoftware.com/community-blog/cid/154975/moving-a-dnn-install-to-microsoft-azure-websites

所以我在 Azure 上创建了一个新的 Web 应用程序来托管网站文件。我还在 Azure 上创建了一个新数据库,并导入了我的 DNN 备份数据库。

我更改了 web.config 中的连接字符串以使用我的 Azure 数据库,我在 Azure 上上传了网站文件夹。

现在,如果我尝试使用 link [站点名称].azurewebsites.net 浏览我的 Web 应用程序,我会收到以下错误:

DNN Error Domain Name Does Not Exist In The Database

DotNetNuke supports multiple websites from a single database/codebase. It accomplishes this by converting the URL of the client browser Request to a valid PortalID in the Portals database table. The following steps describe the process:

Web Server Processing When a web server receives a Request from a client browser, it compares the file name extension on the target URL resource to its Application Extension Mappings defined in IIS. Based on the corresponding match, IIS then sends the Request to the defined Executable Path ( aspnet_asapi.dll in the case of ASP.NET Requests ). The aspnet_isapi.dll engine processes the Request in an ordered series of events beginning with Application_BeginRequest. HttpModule.URLRewrite OnBeginRequest ( UrlRewriteModule.vb ) The Request URL is parsed based on the "/" character A Domain Name is constructed using each of the relevant parsed URL segments.

Examples:

URL: http://www.exemple.com/default.aspx = Domain Name: www.exemple.com URL: http://209.75.24.131/default.aspx = Domain Name: 209.75.24.131

URL: http://localhost/DotNetNuke/default.aspx = Domain Name: localhost/DotNetNuke URL: http://www.exemple.com/virtualdirectory/default.aspx = Domain Name: www.exemple.com/virtualdirectory URL: http://www.exemple.com/directory/default.aspx = Domain Name: www.exemple.com/directory

应用程序使用域名查询数据库(Portals table - PortalAlias 字段 ) 以定位匹配记录。

注意:如果有多个URL对应同一个网站 那么网站别名字段必须包含每个有效的域名 逗号分隔列表。

示例:

URL: http://localhost/DotNetNuke/default.aspx URL: http://MACHINENAME/DotNetNuke/default.aspx URL: http://209.32.134.65/DotNetNuke/default.aspx 门户别名: localhost/DotNetNuke,MACHINENAME/DotNetNuke,209.32.134.65/DotNetNuke

注意:如果您要将应用程序安装到远程服务器,您 必须修改默认记录中的 PortalAlias 字段值 门户 table 根据上面定义的规则。

所以我将站点别名 ([sitename].azurewebsites.net) 记录插入到 PortalAlias table 中,如教程中所述。

现在,当我尝试访问网站 [sitename].azurewebsites.net 时,我没有之前的 DNN 错误,但它加载了很长时间,然后出现以下错误:

www.[sitename].azurewebsites.net’s server DNS address could not be found. DNS_PROBE_FINISHED_NXDOMAIN

加载结束后,URL奇怪地变成https://www.[sitename].azurewebsites.net,出现DNS错误。

Azure 或我的 web.config 文件中是否需要更改某些内容?也许在 DotNetNuke 或 ASP 版本中需要配置一些东西?

我不明白为什么我的浏览器会更改 url 以及为什么会出现此 dns 错误(我的本地 IIS 服务器没有问题)。

(我也尝试使用教程中提到的 自动门户别名传输 但我得到了相同的结果:别名已插入数据库但我仍然有NX 域错误)

感谢您的帮助!

艾蒂安。

您收到来自 DNN 的错误这一事实是个好消息,这意味着您(可能)已正确完成主要工作。

现在,您需要进入数据库并修改 PortalAlias table,以便 sitename.azurewebsites.net 有一个别名。 (我假设站点名称周围的括号不正确,并且“[站点名称]”需要替换为您站点的实际域名。)

在你原来的 post 你有:

www.[sitename].azurewebsites.net’s server DNS address could not be found. DNS_PROBE_FINISHED_NXDOMAIN

尝试手动将 . (完整的、带冒号的 http 等)有时 Web 浏览器会自动添加 WWW,以为您想要它(我讨厌他们这样做)。 Azure 不知道 www 子域,所以这就是您可能会收到该错误的原因。

编辑:哦,加载时间长也不错 - 这意味着 azure 编译了您的站点并且您没有遇到编译错误。