SQL Server的Asp.Net - "登录失败" [英] SQL Server Asp.Net - "Login failed"

查看:147
本文介绍了SQL Server的Asp.Net - "登录失败"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不能让我的Asp.Net的应用程序,我部署到服务器上运行。服务器运行的是Server 2008 R2中,和我正在运行SQL Server上最重要的是2008 R2前preSS。当我浏览到该网站,我得到错误

I can't get my Asp.Net application to work on a server I'm deploying to. The server is running Server 2008 R2, and I am running SQL Server 2008 R2 Express on top of that. When I browse to the site I get error

用户登录失败WIN-6VLI5UDJ5RN \\ Lappearn

Login failed for user 'WIN-6VLI5UDJ5RN\Lappearn'

我曾尝试无论是在SQL Server和在服务器上创建帐户本身,而是没有什么区别。这是我的连接字符串

I have tried creating the account both in SQL Server and on the server itself but made no difference. Here is my connection string

Data Source=localhost\SQLExpress;Initial Catalog=Lappearn;User ID=WIN-6VLI5UDJ5RN\Lappearn;Password=password;

在SQL Server现在同时运行Windows和SQL Server验证模式。

The SQL Server is now running both Windows and SQL Server auth mode.

推荐答案

要启用一个用户,你必须设置它们的数据库并授予他们的数据库和/或它的表和存储过程上。

To enable a user, you have to set them up on the database AND grant permissions to them on the database and/or its tables and stored procedures.

这听起来像你已经创建的用户帐户或登录。你必须还授予该数据库上的用户权限。这通常是通过分配用户使用权限,如的db_datareader db_datawriter权限现有组完成的。

It sounds like you have created the user account or login. You have to also grant that user permissions on the database. This is often done by assigning the user to an existing group with permissions, such as db_datareader and db_datawriter.

下面是一组一步一步的指示,如何设置广告数据库权限和这里的一个用于SQL 2008和IIS7

Here is one set of step-by-step instructions on how to set up your database permissions, and here's one for SQL 2008 and IIS7.

这篇关于SQL Server的Asp.Net - "登录失败"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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