我已经从使用 sql server 的 ASP.NET 配置中创建了一个用户,但我还没有为成员资格创建任何数据库。
我确实将其添加到配置文件中:
<authentication mode="Forms">
<forms loginUrl="Login.aspx"></forms>
</authentication>
<authorization>
<allow users="admin" />
<deny users="?" />
</authorization>
其中 admin 是我创建的用户。它在本地运行得很好。
在我上传我的网站后,我收到一个错误,我必须创建一个具有写入权限的 App_Data 文件夹并将其添加到我的应用程序文件夹中,现在我得到了这个:
建立与 SQL Server 的连接时发生与网络相关或特定于实例的错误。服务器未找到或无法访问。验证实例名称是否正确以及 SQL Server 是否配置为允许远程连接。(提供者:SQL 网络接口,错误:26 - 错误定位服务器/指定的实例)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.