By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,069 Members | 1,716 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,069 IT Pros & Developers. It's quick & easy.

Help. Getting a An error has occurred while establishing a connectionto the server. When connecting to SQL Server 2005, this failure may be causedby the fact that under the default settings SQL Server does not allow remote

P: n/a
Hi,

I need some help. I am getting this error after I complete the asp.net
register control and click on the continue button. It crashed when it
tries to get
it calls this Profile property

((string)(this.GetPropertyValue("Address1")));
When I look at the stack, it is coming from my ProfileWrapper class
which adds user address, city, etc.. from a class which inherits from
System.Web.Profile.ProfileBase. From the stack, it is calling the
System.Web.Profile and crashed when it tries to open a connection at
System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection
owningObject). I already migrated all aspnet_user, aspnet_roles, etc..
and don't get any connection errors. It is only when I try to get the
profile data. This works on my pc, but throws an error on my
lunarpage website.

Any help is greatly appreciated.

Thanks,

AJ
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: 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.

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: SQL Network Interfaces, error: 26 - Error
Locating Server/Instance Specified)

Source Error:

Line 100: public virtual string Address2 {
Line 101: get {
Line 102: return ((string)
(this.GetPropertyValue("Address2")));
Line 103: }
Line 104: set {
Source File: c:\windows\Microsoft.NET\Framework\v2.0.50727\Temp orary
ASP.NET Files\root\0021d506\39a6858c\App_Code.54nvluyo.1.c s Line:
102

Stack Trace:

[SqlException (0x80131904): 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: SQL Network
Interfaces, error: 26 - Error Locating Server/Instance Specified)]

System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection
owningObject) +435

System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
owningConnection) +82

System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Web.DataAccess.SqlConnectionHolder.Open(Htt pContext context,
Boolean revertImpersonate) +84
System.Web.DataAccess.SqlConnectionHelper.GetConne ction(String
connectionString, Boolean revertImpersonation) +197

System.Web.Profile.SqlProfileProvider.GetPropertyV aluesFromDatabase(String
userName, SettingsPropertyValueCollection svc) +782

System.Web.Profile.SqlProfileProvider.GetPropertyV alues(SettingsContext
sc, SettingsPropertyCollection properties) +428

System.Configuration.SettingsBase.GetPropertiesFro mProvider(SettingsProvider
provider) +404
System.Configuration.SettingsBase.GetPropertyValue ByName(String
propertyName) +117
System.Configuration.SettingsBase.get_Item(String propertyName) +89
System.Web.Profile.ProfileBase.GetInternal(String propertyName) +36
System.Web.Profile.ProfileBase.get_Item(String propertyName) +68
System.Web.Profile.ProfileBase.GetPropertyValue(St ring
propertyName) +4
ProfileCommon.get_Address2() in c:\windows\Microsoft.NET\Framework
\v2.0.50727\Temporary ASP.NET Files\root\0021d506\39a6858c\App_Code.
54nvluyo.1.cs:102
ProfileWrapper..ctor() in d:\inetpub\vhosts\javcentral.com\httpdocs
\App_Code\ProfileWrapper.cs:242
ProfileDataSource.GetData() in d:\inetpub\vhosts\javcentral.com
\httpdocs\App_Code\ProfileDataSource.cs:17

[TargetInvocationException: Exception has been thrown by the target of
an invocation.]
System.RuntimeMethodHandle._InvokeMethodFast(Objec t target,
Object[] arguments, SignatureStruct& sig, MethodAttributes
methodAttributes, RuntimeTypeHandle typeOwner) +0
System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[]
arguments, Signature sig, MethodAttributes methodAttributes,
RuntimeTypeHandle typeOwner) +72
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture,
Boolean skipVisibilityChecks) +308
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
+29

System.Web.UI.WebControls.ObjectDataSourceView.Inv okeMethod(ObjectDataSourceMethod
method, Boolean disposeInstance, Object& instance) +480

System.Web.UI.WebControls.ObjectDataSourceView.Exe cuteSelect(DataSourceSelectArguments
arguments) +1960
System.Web.UI.DataSourceView.Select(DataSourceSele ctArguments
arguments, DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.Perform Select() +149
System.Web.UI.WebControls.BaseDataBoundControl.Dat aBind() +70
System.Web.UI.WebControls.FormView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.Ens ureDataBound()
+82
System.Web.UI.WebControls.FormView.EnsureDataBound () +163

System.Web.UI.WebControls.CompositeDataBoundContro l.CreateChildControls()
+69
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +21
System.Web.UI.Control.FindControl(String id) +9
CustomerDetailsEdit.OnPreRender(EventArgs e) in d:\inetpub\vhosts
\javcentral.com\httpdocs\UserControls\CustomerDeta ilsEdit.ascx.cs:60
System.Web.UI.Control.PreRenderRecursiveInternal() +86
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+2041

Jun 27 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.