如何使用后端删除 Orchard 站点中的 SSL 重定向?

How to remove SSL redirect in Orchard site using backend?

我将我的 Orchard 站点设置为需要 SSL。我显然设置错误并且无法访问页面以更改任何设置,因为它重定向不正确。我从 Firefox 收到的错误消息是

The page isn't redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete."

很抱歉,我无法告诉您我输入的设置是什么,因为我无法访问该页面。 我想问的是是否有一种方法可以更改 web.config,或数据库中的一个字段,让我可以返回站点以放入正确的设置。有什么想法吗?感谢您的帮助!

设置保存在数据库的站点设置数据集中。使用 SQL Server Management Studio 或其他工具连接到您的数据库。找到 table Orchard_Framework_ContentItemRecord 并且第一行 > 列 Data 应该包含您的带有 SSL 条目的站点设置,应该看起来像

<SslSettingsPart>
    <Urls></Urls>
    <SecureEverything>False</SecureEverything>
    <Enabled>True</Enabled>
    <CustomEnabled>False</CustomEnabled>
    <SecureHostName>localhost:44302</SecureHostName>
    <InsecureHostName>localhost:10421</InsecureHostName>
</SslSettingsPart>

根据需要调整或删除整个部分并通过管理重新设置。

确保在对数据库进行更改后保存它并重新启动您的站点,否则它可能不会生效。