G
Guest
i have a sql server and asp .net application on the same box. The sql server instance name is cdcrs204\NETSDK. tThe following connect string works fine in the application on the server
Me.SqlConnection1.ConnectionString = "data source=52.99.20.25\NetSDK;initial catalog=sac;persist secu" &
"rity info=True;user id=sa;packet size=4096;Network Library =dbmssocn
But this gives following exception when I run application locally from my machine. I can see the instance 52.99.20.25\NetSDK from Enterprise manager
Server Error in '/SAC' Application
-------------------------------------------------------------------------------
SQL Server does not exist or access denied.
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: SQL Server does not exist or access denied
Source Error:
Line 214: cmdIOC.Connection.ConnectionString = SqlConnection1.ConnectionStrin
Line 215
Line 216: cmdIOC.Connection.Open(
Line 217
Line 218: cmdIOC.CommandType = CommandType.Tex
Source File: C:\Inetpub\wwwroot\SAC\WhatIf.aspx.vb Line: 216
Stack Trace:
[SqlException: SQL Server does not exist or access denied.
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +47
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +37
System.Data.SqlClient.SqlConnection.Open() +38
[TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess) +
System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean verifyAccess) +42
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +2
Microsoft.VisualBasic.CompilerServices.LateBinding.FastCall(Object o, MethodBase method, ParameterInfo[] Parameters, Object[] args, Type objType, IReflect objIReflect) +24
Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn) +42
Microsoft.VisualBasic.CompilerServices.LateBinding.LateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack) +2
sac.WhatIf.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\SAC\WhatIf.aspx.vb:21
System.Web.UI.Control.OnLoad(EventArgs e) +6
System.Web.UI.Control.LoadRecursive() +3
System.Web.UI.Page.ProcessRequestMain() +73
-------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
Any help is appreciated
thanks
Me.SqlConnection1.ConnectionString = "data source=52.99.20.25\NetSDK;initial catalog=sac;persist secu" &
"rity info=True;user id=sa;packet size=4096;Network Library =dbmssocn
But this gives following exception when I run application locally from my machine. I can see the instance 52.99.20.25\NetSDK from Enterprise manager
Server Error in '/SAC' Application
-------------------------------------------------------------------------------
SQL Server does not exist or access denied.
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: SQL Server does not exist or access denied
Source Error:
Line 214: cmdIOC.Connection.ConnectionString = SqlConnection1.ConnectionStrin
Line 215
Line 216: cmdIOC.Connection.Open(
Line 217
Line 218: cmdIOC.CommandType = CommandType.Tex
Source File: C:\Inetpub\wwwroot\SAC\WhatIf.aspx.vb Line: 216
Stack Trace:
[SqlException: SQL Server does not exist or access denied.
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +47
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +37
System.Data.SqlClient.SqlConnection.Open() +38
[TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess) +
System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean verifyAccess) +42
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +2
Microsoft.VisualBasic.CompilerServices.LateBinding.FastCall(Object o, MethodBase method, ParameterInfo[] Parameters, Object[] args, Type objType, IReflect objIReflect) +24
Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn) +42
Microsoft.VisualBasic.CompilerServices.LateBinding.LateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack) +2
sac.WhatIf.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\SAC\WhatIf.aspx.vb:21
System.Web.UI.Control.OnLoad(EventArgs e) +6
System.Web.UI.Control.LoadRecursive() +3
System.Web.UI.Page.ProcessRequestMain() +73
-------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
Any help is appreciated
thanks