菜鸟请教 做project的时候出现一个问题,把我给堵了。请教一下各位。

问题描述

怎么解决啊???头疼...ServerErrorin'/OSWebSites'Application.Anerrorhasoccurredwhileestablishingaconnectiontotheserver.WhenconnectingtoSQLServer2005,thisfailuremaybecausedbythefactthatunderthedefaultsettingsSQLServerdoesnotallowremoteconnections.(provider:SQLNetworkInterfaces,error:26-ErrorLocatingServer/InstanceSpecified)Description:Anunhandledexceptionoccurredduringtheexecutionofthecurrentwebrequest.Pleasereviewthestacktraceformoreinformationabouttheerrorandwhereitoriginatedinthecode.ExceptionDetails:System.Data.SqlClient.SqlException:Anerrorhasoccurredwhileestablishingaconnectiontotheserver.WhenconnectingtoSQLServer2005,thisfailuremaybecausedbythefactthatunderthedefaultsettingsSQLServerdoesnotallowremoteconnections.(provider:SQLNetworkInterfaces,error:26-ErrorLocatingServer/InstanceSpecified)SourceError:Line11:command.CommandType=CommandType.StoredProcedureLine12:'OpentheconnectionLine13:connection.Open()Line14:'ReturnaSqlDataReadertothecallingfunctionLine15:Returncommand.ExecuteReader(CommandBehavior.CloseConnection)SourceFile:C:DocumentsandSettingsMaoMaoMyDocumentsVisualStudio2008OSWebSitesApp_CodeCatalog.vbLine:13StackTrace:[SqlException(0x80131904):Anerrorhasoccurredwhileestablishingaconnectiontotheserver.WhenconnectingtoSQLServer2005,thisfailuremaybecausedbythefactthatunderthedefaultsettingsSQLServerdoesnotallowremoteconnections.(provider:SQLNetworkInterfaces,error:26-ErrorLocatingServer/InstanceSpecified)]System.Data.SqlClient.SqlInternalConnection.OnError(SqlExceptionexception,BooleanbreakConnection)+800131System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObjectstateObj)+186System.Data.SqlClient.TdsParser.Connect(ServerInfoserverInfo,SqlInternalConnectionTdsconnHandler,BooleanignoreSniOpenTimeout,Int64timerExpire,Booleanencrypt,BooleantrustServerCert,BooleanintegratedSecurity,SqlConnectionowningObject)+737554System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfoserverInfo,StringnewPassword,BooleanignoreSniOpenTimeout,Int64timerExpire,SqlConnectionowningObject)+114System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(Stringhost,StringnewPassword,BooleanredirectedUserInstance,SqlConnectionowningObject,SqlConnectionStringconnectionOptions,Int64timerStart)+421System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnectionowningObject,SqlConnectionStringconnectionOptions,StringnewPassword,BooleanredirectedUserInstance)+181System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentityidentity,SqlConnectionStringconnectionOptions,ObjectproviderInfo,StringnewPassword,SqlConnectionowningObject,BooleanredirectedUserInstance)+173System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptionsoptions,ObjectpoolGroupProviderInfo,DbConnectionPoolpool,DbConnectionowningConnection)+357System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionowningConnection,DbConnectionPoolpool,DbConnectionOptionsoptions)+30System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnectionowningObject)+424System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnectionowningObject)+66System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnectionowningObject)+494System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnectionowningConnection)+82System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnectionouterConnection,DbConnectionFactoryconnectionFactory)+105System.Data.SqlClient.SqlConnection.Open()+111Catalog.GetDepartments()inC:DocumentsandSettingsMaoMaoMyDocumentsVisualStudio2008OSWebSitesApp_CodeCatalog.vb:13UserControls_WebUserControl.Page_Load(Objectsender,EventArgse)inC:DocumentsandSettingsMaoMaoMyDocumentsVisualStudio2008OSWebSitesUserControlsDepartmentsList.ascx.vb:20System.Web.UI.Control.OnLoad(EventArgse)+99System.Web.UI.Control.LoadRecursive()+47System.Web.UI.Control.LoadRecursive()+131System.Web.UI.Control.LoadRecursive()+131System.Web.UI.Page.ProcessRequestMain(BooleanincludeStagesBeforeAsyncPoint,BooleanincludeStagesAfterAsyncPoint)+1436VersionInformation:Microsoft.NETFrameworkVersion:2.0.50727.1433;ASP.NETVersion:2.0.50727.1433

解决方案

解决方案二:
你连接的是远程数据库码?
解决方案三:
不是,本地的.
解决方案四:
不是,本地的.
解决方案五:
把相关代码贴上来看看吧
解决方案六:
ImportsMicrosoft.VisualBasicImportsSystem.Data.SqlClientImportsSystem.DataPublicClassCatalogPublicSharedFunctionGetDepartments()AsSqlDataReaderDimconnectionAsNewSqlConnection(connectionString)DimcommandAsNewSqlCommand("GetDepartments",connection)command.CommandType=CommandType.StoredProcedureconnection.Open()Returncommand.ExecuteReader(CommandBehavior.CloseConnection)EndFunctionPrivateSharedReadOnlyPropertyconnectionString()AsStringGetReturnConfigurationSettings.AppSettings("ConnectionString")EndGetEndPropertyEndClass
解决方案七:
GetDepartments这个函数是如何调用的?
解决方案八:
Returncommand.ExecuteReader(CommandBehavior.CloseConnection)这样返回datareader是不对的。我在本机上测试会报错。command.ExecuteReader这种command类型不应该是Procedure
解决方案九:
up
解决方案十:
我这边倒不是其他的问题,就是connection.Open()报错,刚才贴的就是报错的信息
解决方案十一:
connectionString那把这个内容贴上来吧。还有即使你在这里报错,但是到下面还会报错的
解决方案十二:
我在web.config里面addkey<appSettings><addkey="ConnectionString"value="Server=(local)NetSDK;IntegratedSecurity=True;InitialCatalog=Shop"/></appSettings>
解决方案十三:
连接字符串里怎么没有workstationid呢?添加上去看看可以看看这里的连接字符串介绍www.connectionstrings.com
解决方案十四:
好的,谢谢您啊,我现在就去看看

时间: 2024-08-28 00:53:28

菜鸟请教 做project的时候出现一个问题,把我给堵了。请教一下各位。的相关文章

networkcomms-最近在做网络编程这块.遇到一个问题想请教

问题描述 最近在做网络编程这块.遇到一个问题想请教 我用的Networkcomms这个通讯框架,主要是用的TCp通信.遇到一个这样的问题.当有100个客户端 向服务器发起请求的时候,服务器应该采用什么方式来让客户端保持连接等待连通呢?或者怎么让服务器在最节能的情况下,同时处理这些请求呢?有没有什么好的办法? 解决方案 服务器用一个LIst等来维护连接的客户端链表. 解决方案二: 当有100个客户发起请求,可以看看请求的频率和客户端要求处理数据的速度. 1)如果速度要求高,那恐怕要每个客户开启一个

请教下用servlet实现对一个学生系统的登录查询删除添加等功能如何实现,急!!!!在线等待

问题描述 请教下用servlet实现对一个学生系统的登录查询删除添加等功能如何实现,要求不要牵涉数据库,如果是数据库我都会做. 解决方案 解决方案二:那就把数据放在一个静态变量中吧,简单点可用map<Integer,Po>,Po为映射数据库表字段的vo类.解决方案三:道理不是一样的吗,莫非用数据库的时候你是直接在页面上写的?解决方案四:查询我是做出来了.但在注册页面中的值如何添加到这个列表中去呢解决方案五:根据表单的字段,做一个vo(值对象)类,把这个类存进一个静态变量的list.set或ma

青鸟小弟,请问用AJAX技术做的聊天室,一个页面发送 信息(Message),而另一个页面无法达到及时更新数据,当另一个页面发送数据的时候,才能更新数据!急求?

问题描述 青鸟小弟,请问用AJAX技术做的聊天室,一个页面发送信息(Message),而另一个页面无法达到及时更新数据,当另一个页面发送数据的时候,才能更新数据!急求解决问题的方案用到的技术JSP,Struts2,Hibernate,Spring,用到的内置对象:application:这个关键--是存放发送的信息的,Session:这个主要是区别不同登录用户???请问如何达到要求,一个页面发送信息,另一个页面也更新数据,大前提:不要刷新页面,我用的就是AJAX技术,我急求高手指点一下菜鸟小弟,

asp.net-新手请教个html页面里的一个参数的意思

问题描述 新手请教个html页面里的一个参数的意思 var host = document.location.protocol + '//' + document.location.host; 这段是什么意思? '//'这个呢? 解决方案 document.location.protocol; //获取协议,是http还是https document.location.host; //获取域名 解决方案二: 就是拼接成http://www.xxx.com //就是这个里面的// 解决方案三: 相

请教大神,随意输入一个身份证号码,生成一个唯一7位ID

问题描述 请教大神,随意输入一个身份证号码,生成一个唯一7位ID,再次输入该身份证号码ID不变.输入另一个身份证号码时,生成一个唯一与它对应的ID?请大神们给代码.... 解决方案 解决方案二:中国有13亿人,生成7位的唯一id,这个不可能啊.肯定有重复的,位数太短了,不够用,其实每个身份证号就是一个唯一的id.不知道楼主的业务是什么样的,具体想做什么?解决方案三:引用1楼magi1201的回复: 中国有13亿人,生成7位的唯一id,这个不可能啊.肯定有重复的,位数太短了,不够用,其实每个身份证

我做淘宝客的一个月

中介交易 http://www.aliyun.com/zixun/aggregation/6858.html">SEO诊断 淘宝客 云主机 技术大厅 大家好,我是一个新手, 确切的说应该是一个做淘宝客的新手,相对于那些每月过万的站来说,我是真的没什么经验可谈,但是对于刚起步的朋友来说,我也许可以谈下我做的经验,我是一个电脑重装都不会的电脑文盲,但是我真的对淘宝客有一种浓厚的兴趣,所以请教了很多朋友,让他们帮助我一起做网站.一开始我没有网站而是采取了一些人工的方法去推广,比如在开心网里做,Q

网易新闻选择列表里面的cell移动怎么做,自己找了一个方法,但是不怎么会用, 求各位大神帮忙。

问题描述 网易新闻选择列表里面的cell移动怎么做,自己找了一个方法,但是不怎么会用, 求各位大神帮忙. -collectionView:(UICollectionView *)collectionView moveItemAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath *)destinationIndexPath{} 解决方案 看下帮助文档,有函数参数的

dynamic-新建了一个Dynamic Web Project 里面写了一个extjs文件

问题描述 新建了一个Dynamic Web Project 里面写了一个extjs文件 为什么会这样呢 解决方案 web.xml里面配置的首页是什么 解决方案二: 检查encoding的编码,以及家产extjs的配置,一个extjs开发包,一个是用于.符提示的资源包

请教C#,Form窗口的一个Button,调用Excel导出表格时出错

问题描述 请教C#,Form窗口的一个Button,调用Excel导出表格时出错 一个调用Excel导出表的操作,出错.请熟悉excel调用的高手指教. 相关代码: private void button1_Click(object sender, EventArgs e) { saveFileDialog1.AddExtension = true;//对话框自动在文件名中添加扩展名 saveFileDialog1.FileName = name+"与"+name1+"担保信