在asp.net中发布错误 [英] publish error in asp.net

查看:67
本文介绍了在asp.net中发布错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在asp.net中设计了Web应用程序...我已经发布了一个网站..
我已经创建了虚拟目录并复制了发布文件....
并浏览网站...

错误发生

i have designed web application in asp.net...i have publish a website..
i have create virtual directory and copy the publish file....
and browse the website...

The error r occure

An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) 
 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. 

 Exception Details: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Source Error: 
 An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

推荐答案

在sqlserver中,在对象资源管理器中转到数据库的安全性

右键单击用户新用户".

在对话框中输入所需的用户名".

浏览您输入的用户名下方的LoginName.浏览并选择aspnet



创建新用户后,您需要为刚创建的用户提供适当的权限.

在对象资源管理器中的数据库上单击鼠标右键,在对话框中单击权限",选择适当的用户,然后从下面的列表中授予连接,选择,更新,删除等权限.

多数民众赞成在完成....:)
In sqlserver go to security of your database in object explorer

right click in users, "New User".

In the dialog enter the "username" whichever you like.

Browse for LoginName below the username you entered. Browse and select aspnet



After creating a new user, you need to give the proper permissions for the user you just created.

Right Click on the database in object explorer, Click Permission in the dialog, Select proper user and give the permission to connect, select, update, delete etc from the list below.

thats it you are done.... :)


原因不只几个.使用此链接解决问题

SQL Server连接问题 [
There are more than couple of reasons. Troubleshoot your problem with this link

SQL Server Connection Problem[^]


这篇关于在asp.net中发布错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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