在托管服务器上部署时在app_data中创建角色时出错 [英] Error in creating role in app_data when deloyed on hosting server

查看:101
本文介绍了在托管服务器上部署时在app_data中创建角色时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



当网站部署在托管服务器上时发生错误另一方面其工作在本地服务器上运行良好





建立与SQL Server的连接时发生网络相关或特定于实例的错误。服务器未找到或无法访问。验证实例名称是否正确,以及SQL Server是否配置为允许远程连接。 (提供程序:SQL网络接口,错误:26 - 查找指定的服务器/实例时出错)



描述:执行当前Web请求期间发生了未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。



SQLExpress数据库文件自动创建错误:



连接字符串指定本地Sql Server Express实例使用应用程序App_Data目录中的数据库位置。提供程序尝试自动创建应用程序服务数据库,因为提供程序确定数据库不存在。要成功检查应用程序服务数据库是否存在并自动创建应用程序服务数据库,需要满足以下配置要求:



如果应用程序App_Data目录尚不存在, Web服务器帐户必须具有对应用程序目录的读写权限。这是必要的,因为如果Web服务器帐户尚不存在,它将自动创建App_Data目录。

如果应用程序App_Data目录已存在,则Web服务器帐户只需要对应用程序的读写访问权限App_Data目录。这是必要的,因为Web服务器帐户将尝试验证应用程序App_Data目录中是否已存在Sql Server Express数据库。从Web服务器帐户撤消对App_Data目录的读取访问将阻止提供程序正确确定Sql Server Express数据库是否已存在。当提供程序尝试创建现有数据库的副本时,这将导致错误。写入权限是必需的,因为在创建新数据库时会使用Web服务器帐户凭据。

必须在计算机上安装Sql Server Express。

Web的进程标识服务器帐户必须具有本地用户配置文件。有关如何为计算机和域帐户创建本地用户配置文件的详细信息,请参阅自述文档。

Hello,

Error occured when the website deployed on hosting server on the other Hand its working fine on local server


A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

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.

SQLExpress database file auto-creation error:

The connection string specifies a local Sql Server Express instance using a database location within the applications App_Data directory. The provider attempted to automatically create the application services database because the provider determined that the database does not exist. The following configuration requirements are necessary to successfully check for existence of the application services database and automatically create the application services database:

If the applications App_Data directory does not already exist, the web server account must have read and write access to the applications directory. This is necessary because the web server account will automatically create the App_Data directory if it does not already exist.
If the applications App_Data directory already exists, the web server account only requires read and write access to the applications App_Data directory. This is necessary because the web server account will attempt to verify that the Sql Server Express database already exists within the applications App_Data directory. Revoking read access on the App_Data directory from the web server account will prevent the provider from correctly determining if the Sql Server Express database already exists. This will cause an error when the provider attempts to create a duplicate of an already existing database. Write access is required because the web server accounts credentials are used when creating the new database.
Sql Server Express must be installed on the machine.
The process identity for the web server account must have a local user profile. See the readme document for details on how to create a local user profile for both machine and domain accounts.

推荐答案

检查此

FIX: SQL网络接口,错误:26 - 找到指定的服务器/实例时出错 [ ^ ]


这篇关于在托管服务器上部署时在app_data中创建角色时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆