ADO Connection String Error For Mirrored Database

Jul 9, 2007

I am trying to connect to a failover partner using ADO (non .Net) and Visual C++. ADO is throwing the following exception:

Caught: Unspecified error - Invalid connection string attribute(Microsoft OLE DB Provider for SQL Server)

Connection String:
Provider=SQLOLEDB.1;Data Source=EdwardsvilleSQLSERVER;Failover Partner=Mirror2SQLSERVER;Initial Catalog=SomeCatalog;User Id=SomeId;Password=SomePassword

Any ideas?

View 4 Replies


ADVERTISEMENT

Cannot Set Connection Property Of Backup Database Task If Connection String Is Customized In Connection Object

Aug 23, 2006

I added a connection (ADO.NET) object by name testCon in the connection manager - I wanted to programmatically supply the connection string. So I used the "Expressions" property of the connection object and set the connectionstring to one DTS variable. The idea is to supply the connection string value to the variable - so that the connection object uses my connection string.

Then I added a "Backup Database Task" to my package with the name BkpTask. Now whenever I try to set the connection property of BkpTask to the testCon connection object, by typing testCon, it automatically gets cleared. I am not able to set the connection value.

Then after spending several hours I found that this is because I have customized the connection string in testCon. If I don't customize the connection string, I am able to enter the "testCon" value in the connection property of the BkpTask.

Is this an intrinsic issue?

View 2 Replies View Related

Error: 26 - Error Locating Server/Instance Specified - (My Hosting Company Says It's In My Connection String) NOT!

May 24, 2007

Hi All...



I am trying to move my site (incomplete) for testing and I am finding that the Db connection process to be

the most difficult, well back to my problem. I can't seem to get past this error and am frustrated with overall

connectivity problems. Please help!!!



===================================================================================


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:





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.
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.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +735123
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup) +820
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +130
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +84
System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +197
System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +1121
System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +105
System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42
System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +83
System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +160
System.Web.UI.WebControls.Login.AttemptLogin() +105
System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102





Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210





Now you all must admit that, if your somewhat new to this databasing, It's a ***.



The source for my application is Visual Web Designer 2005 Express

It is an ASP.Net driven site with membership roles and all the good stuff.

the latest theory is that I need to change the provider config in the web.config file from AspNetSqlProvider

to something else. Most of my complications and frustrations come from GoDaddy and no access to the

shared server (understandibly).



I hope I gave enough info for help and not too much..



Dave



View 4 Replies View Related

Connection String Error

Aug 15, 2006

Hello I need some help please.
I created a connection string in my web config. I then tried to call it in one of my c# pages but I get a "System.InvalidOperationException: Instance failure" every time I run it.
Please review my code and let me know what I am doing wrong.
Thank you in advance for all the help
Web Config
<appSettings>

<add key="AVConnection" value="Server=Server; Database=DB; User ID=sa; Password=PWD" />
</appSettings>
//////calling connection and running a simple SQL statment///////
protected void Page_Load(object sender, EventArgs e)
{
string ConnApp;
ConnApp = System.Configuration.ConfigurationManager.AppSettings["AVConnection"];
Response.Write(ConnApp);//the string is being passed this far
SqlConnection objConn = new SqlConnection(ConnApp);
SqlCommand sqlCMD = new SqlCommand("Select * FROM Employee", objConn);

objConn.Open();//this is where the error occures
SqlDataReader objRdr = sqlCMD.ExecuteReader();
Repeater1.DataSource = objRdr;
Repeater1.DataBind();
objConn.Close();
objRdr.Close();



}
ERROR PAGE
Line 29:          SqlCommand sqlCMD = new SqlCommand("Select * FROM Employee", objConn);Line 30:          Line 31:              objConn.Open();Line 32:              SqlDataReader objRdr = sqlCMD.ExecuteReader();Line 33:              Repeater1.DataSource = objRdr;
[InvalidOperationException: Instance failure.]   System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup) +683775   System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359   System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28   System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424   System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105   System.Data.SqlClient.SqlConnection.Open() +111   employeelist.Page_Load(Object sender, EventArgs e) in c:InetpubwwwrootFAUAVemployeelist.aspx.cs:31   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34   System.Web.UI.Control.OnLoad(EventArgs e) +99   System.Web.UI.Control.LoadRecursive() +47   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061

View 2 Replies View Related

Connection String Error

Jan 29, 2008

Hi, I'm very new to SQL server so please excuse. Basically I'm trying to connect 6 text boxes on my web form to my sql database using c#. The following lines of code behind my save button pops up with this error. "NullRefernrenceException was unhandled by user code - Object reference not set to an instance of an object". I think its something small but as I said I'm only new so I dont have much of a clue. protected void btnSave_Click(object sender, EventArgs e)    {        String strConn = ConfigurationManager.ConnectionStrings["conLocalDatabase"].ConnectionString;        SqlConnection dbConnection = new SqlConnection(strConn);        SqlCommand dbCommand = new SqlCommand();        SqlDataReader dbReader  Any help would be much obliged. 

View 10 Replies View Related

Error In Connection String

May 2, 2008

hi, i am facing a problem:"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)"my web config code is   <connectionStrings>  <add name="ConnectionString" connectionString="Data Source=.kindleinfotech.com;AttachDbFilename=|DataDirectory|database.mdf;Integrated Security=True;User Instance=True"   providerName="System.Data.SqlClient" /> </connectionStrings>here kindleinfotech.com is the name of server.how this problem can be solved. 

View 12 Replies View Related

Error With Connection String

Jun 12, 2008

Hello all
First Problem:
 I tried to get the connection string from web.config using Configuration manager
-------------code------------------
ConfigurationManager.AppSettings("MyProBD");
-------------code------------------
the below error was occurred
-------------Error------------------
Error 1 The name 'ConfigurationManager' does not exist in the current context-------------Error------------------
 
Second Problem
 when declare connection string in the code
-------------code------------------string strConnection = "Data Source=(local); Initial Catalog=MyProDB; Integrated Security=SSPI;";
con.ConnectionString = strConnection;
-------------code------------------
the below error was occurred
-------------Error------------------
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)
-------------Error------------------
 
any help Please

View 7 Replies View Related

Error In My Connection String

Jun 5, 2007

<add name="TimeTrackingDB" connectionString="provider=MSSQL$DEV_2000;Integrated Security=SSPI;Data Source=PORT06139DEV_2000;Initial Catalog=TimeTracking;Persist Security Info=True;User ID=user_TTT;Password=user_TTT;pooling=false;"/>

When i'm lauching the web application, i have an error message saying that there is a mistake with the provider...

I'm using Microsoft SQL Server 2000.

Anybody can help me?

Thanks by advance :)

View 2 Replies View Related

Connection String Error

Feb 5, 2007

OK - I have seen lots posted on this, but the behavior is very strange, and I am trying to understand:
I am using Visual Basic 2003 with SQLEXPRESS 2005 to connect to a database and to develop a desktop application. My connection string is:

Conn_Str = "Data Source=.SQLExpress;AttachDbFilename=" & _
Directory.GetCurrentDirectory & "CWW.mdf;" & _
"Trusted_Connection=Yes;"

I get the following error:

"An attempt to attach an auto-named database for file C:Documents and SettingsBrianMy DocumentsCompressor Program DevelopmentinCWW.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."

However, if I copy the database to anywhere else on the "c:" drive, the connection works, as in the following:

Conn_Str = "Data Source=.SQLExpress;AttachDbFilename=" & _
"C: empCWW.mdf;" & _
"Trusted_Connection=Yes;"

What I have found is that ist works everywhere on my computer except in the following location:

"c:documents and settingsBrian", which includes My Documents, Desktop folders.

Why is this??

Any help would be great - I can work around this by moving my development folder to the "c:" drive. Since my ultimate application directory will be the "Program Files" directory I should be fine.

View 5 Replies View Related

Not All Database Failover To Mirrored Database Server When MSSQL Service Stopped

Sep 4, 2007

We have a Prinicipal, a Mirror and a Witness server. We have automatic failover configured between the Prinicipal and Mirrored server. When we stop MMSQL service on Prinicipal, not all the databases failover to the Mirrored instance.
Any suggestions would be welcomed as we have a tight deadline to get this in Production.

View 5 Replies View Related

Error: 25 - Connection String Is Not Valid -- HELP Please!

Jul 25, 2006

I have been having a problem trying to connect to a SQL Server. I have installed the Developer edition on an MS Small Business edition 2003 server
I also installed MS Sql Manager and I was able to create a database and connect to it. The database server is in the same PC. I used the surface configuration to enable remote connections using TCP /IP and pipe lines.
My application runs without a problem on my development machine but when I deployed on this server I get the provider: SQL Network Interfaces, error: 25 - Connection string is not valid Error.
this is my config file setup
 <connectionStrings>  <add name="Diamond_dbConnectionString" connectionString="Data Source=192.168.1.104MSSQLSERVER;Initial Catalog=Diamond_db;Integrated Security=True"   providerName="System.Data.SqlClient" /> </connectionStrings>
I have google and yahoo this error I found a lot of information I've tried many of them but still having the problem. I will appreciate your help solving this problem. I have a customer waiting since last week to see this site and I'm still stuck.
Tia
Charles
PS. Below I pasted the complete error info I get.
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: 25 - Connection string is not valid) 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: 25 - Connection string is not valid)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. 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: 25 - Connection string is not valid)]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734995
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup) +820
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121
System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) +162
System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +107
DiamondTableAdapters.COUNTRIES_TEMPLATETableAdapter.GetContriesTemplate() +108

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle._InvokeMethodFast(Object 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) +296
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29
System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance) +482
System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +2040
System.Web.UI.WebControls.BaseDataList.GetData() +53
System.Web.UI.WebControls.DataList.CreateControlHierarchy(Boolean useDataSource) +284
System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) +56
System.Web.UI.WebControls.BaseDataList.DataBind() +72
System.Web.UI.WebControls.BaseDataList.EnsureDataBound() +55
System.Web.UI.WebControls.BaseDataList.CreateChildControls() +63
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +41
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

View 6 Replies View Related

Error:25 - Connection String Is Not Valid

Feb 2, 2007

I have installed SQL Server 2005 Developer edition. When I open SQL Server Management Studio, and try to connect to the database engine, I enter these credentials:Server name: LT2000MSSQLSERVERLogin: saPassword: my passwordWhen I try to connect I receive the following error:An error has occured while trying to establish 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:25 - connection string is not valid)(Microsoft SQL Server, Error:87)What can I do?

View 5 Replies View Related

MSDE SQL Connection String Error

Jan 5, 2005

Hi;
Installed MSDE on computer by running:

c:setup INSTANCENAME="VSdotNET" SAPWD="PASSWORD" SECURITYMODE=SQL

REBOOTED AND sql SERVER iCON APPEARS on the lower desktop Icon bar, open it and it says:
Server: JOHN Servises: SQL Server Running \JOHN - MSSQLServer

opened a command prompt at c: and
entered osql -S JOHN -U sa -P password
and got the 1> reply on the next line

I typed EXIT

I had downloaded two scripts that create Pubs and Northwind SQL databases. I put them in the C: folder

I Typed at c:osql -E -i instpubs.sql

It created the pubs SQL database for me

I Typed at c:osql -E -i instnwinds.sql

It created the nwinds SQL database for me

I closed the command prompt and
went to the Administrator Tools in the Control Panel
I selected Data OLEDB Selected ADD entered Pubs and used default values for Pubs to create a connection Tested it OK

Then went and ran Visual Studio Net 2003
Checked to see if the pubs and northwind SQL databases where present in the Server Explorer drop down window.
I seleced the connect to database Icon and in it's Data Link Properties
I entered JOHN for server name
pubs for selected database on the server
with Provider as MS OLEDB for SQL Service
the Icon changed to connected.

I entered this in the code for page_load

Dim MyDS As New DataSet
Dim ConnStr As String
Dim SQL As String
ConnStr = "server=(local)C:Program FilesMicrosoft SQL ServerMSSQLData;database=pubs;Trusted_Connection=yes"

SQL = "SELECT * FROM Titles " & _
"SELECT * FROM Publishers"
Dim MySqlConn As New SqlConnection(ConnStr)
Dim MySqlAdapter As New SqlDataAdapter(SQL, ConnStr)

'The SqlDataAdapter will automatically open and
'close the SqlConnection
MySqlAdapter.Fill(MyDS)

But I can not get this to work it errors out on line:

MySQLAdapter.Fill(myDS)

with: [SqlException (0x80131904): Unknown ProviderError Locating Server/Instance Specified ]
System.Data.ProviderBase.DbConnectionPool.GetConnection(Object owningObject) +317

I change ConnStr to this:

ConnStr = "server=(local)data;database=pubs; uid=sa; Pwd=password" & _
"Trusted_Connection=true"

and get this error:
[SqlException (0x80131904): Shared Memory Provider: The system cannot find the file specified.
]
System.Data.ProviderBase.DbConnectionPool.GetConnection(Object owningObject) +317

I've tried so many combination with and without user and password, I just don't get it, spent three long days stuck here, can someone help me out.

Note:
C:Program FilesMicrosoft SQL ServerMSSQLData
Is the accual location on my machine that pubs database is located.

I can use the pubs SQL database in Web Matrix OK.
Thanks
pdqjohnny@hotmail.com

View 2 Replies View Related

RDA Pull - Connection String Error

Mar 26, 2008

'conn info
Const localConnectionString As String = "Data Source = TestDB.sdf"
Const serverConnectionString As String = "Server=myserver;database=BoxDB;Integrated Security=True;"



Sub CreateUploadOnlyTable()
Dim rda As SqlCeRemoteDataAccess = Nothing
Try

rda = New SqlCeRemoteDataAccess()
rda.LocalConnectionString = localConnectionString
rda.InternetUrl = "http://myserver/BoxCE/sqlcesa30.dll"
rda.Pull("temp_Swipes", "SELECT * FROM Swipes WHERE 1 = 0", serverConnectionString, RdaTrackOption.TrackingOnWithIndexes, "Swipe_Errors")

Catch ex As Exception

MsgBox(ex.ToString)
SaveTextToFile(ex.ToString, "CreateUploadOnlyTable.txt", "RDA Error!")

Finally
rda.dispose()
End Try

End Sub




when i try to run it on my CE device i get an error which i have no idea about and can't resolve via google'ing.

"multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. no work was done"

My aim here is just a basic Pull (but containing no data hence the 'WHERE 1=0')


Any answers to this error? is it my conn string? i did have conn string errors earlier and am guessing they are linked.

View 5 Replies View Related

Cannot Find The Database File Specified In The Connection String

Dec 19, 2006

can anyone help me with this error message

Server Error in '/' Application.


The SSE Provider did not find the database file specified in the connection string. At the configured trust level (below High trust level), the SSE provider can not automatically create the database file.
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.Configuration.Provider.ProviderException: The SSE Provider did not find the database file specified in the connection string. At the configured trust level (below High trust level), the SSE provider can not automatically create the database file.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. Stack Trace:



[ProviderException: The SSE Provider did not find the database file specified in the connection string. At the configured trust level (below High trust level), the SSE provider can not automatically create the database file.]
System.Web.DataAccess.SqlConnectionHelper.EnsureSqlExpressDBFile(String connectionString) +2546149
System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +87
System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +1121
System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +105
System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42
System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +83
System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +160
System.Web.UI.WebControls.Login.AttemptLogin() +105
System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102



Version Information: Microsoft .NET Framework Version:2.0.50727.112; ASP.NET Version:2.0.50727.112

View 3 Replies View Related

Is There A Sql Database Function To Check Connection String?

Nov 1, 2005

Im working on a db library and I have everything working, what Im wanting to do is though is add a method that can check a connection string to make sure it is actually working.  Right now, I have it doing a simple select * query to a particular table and returning true or false if an exception is caused.  But I want to make the library as generic as possible, so is there another way  to test teh connection string and tell if its working or not?Thanks,Cedric

View 1 Replies View Related

Login Failed Error When Conneting To Mirrored Db.

Sep 17, 2007



Hi All,

I have been struggling to make my classic ASP to call mirrored db successfully for the last few days. I am using a ODBC SQL Native Client. The front end application works perfectly untill the database is switched from principal to mirror server. I am getting the following error.


Microsoft OLE DB Provider for ODBC Drivers error '80040e4d'

[Microsoft][SQL Native Client][SQL Server]Cannot open database "testDb" requested by the login. The login failed.


I will briefly explain what I have done. I hae created a SQL Login testUser and this login has the dbowner rights to testDb. This is being done in Principal server. Till now the application works fine. Once I switch it to failover, the mirror server acts as a principal - this is what I was expecting. On database level it works. But my ASP application doesnot seem to like it. When I closely looked into the security, I found that testUser does exist in the testDb but the real problem is testUser is not associated with testUser Login. It's not possible to change as well.

Any sort of pointer is appreciated.

Many thanks.

Sincerely,
Milan G

View 4 Replies View Related

Problem When Failing Over To Mirrored Database

Oct 11, 2006

I'm having a problem with SQL2005 Database mirroring.

I have an ASP application that loops for a certain amount of interations and in each iteration I create a SQL Connection object and use the failover partner in the connection string. The object then writes a simple record and then the connection is closed and the process starts again.

About half way through my loop I force a failover to the server mentioned as the failover partner in the connection string. At this point my application encounters a SQL Exception error and the application fails.

I read in this article, http://msdn2.microsoft.com/en-us/library/ms366199.aspx, that this is expected and that you shoud request a new connection using the same connection string but this isn't working for me and unfortunately no examples are given anywhere.

I would appreciate any help. Thanks

Luis Bonilla

Here is a sample of my code:

Dim k As Integer = 1
Dim constring As String = "Server=SVR01.XXX.XXX.comInstanceName;Failover Partner=SVR02.XXX.XXX.comInstanceName;" _
& "Database=test;" _
& "Integrated Security=SSPI;"

Do Until k = 60
Using con As New SqlConnection(constring)

Dim cmd As New SqlCommand()

Try
con.Open() '<--------This is where the exception occurs
Catch ex As SqlException
Dim en As String = ex.ErrorCode
Dim em As String = ex.Message
Dim emm As String = ex.Number
Dim enn As Integer = ex.State
End Try

lblprimary.Text = "Current Primary Database = " & con.DataSource

cmd.Connection = con
cmd.CommandText = "INSERT INTO SystemsTest (FirstName, LastName)VALUES ('SQLWriter" & CStr(k) & "','" & con.DataSource & "')"

Try
cmd.ExecuteNonQuery()
Catch
lblresult.Text = "Results = Error with record number " & CStr(k)
End Try

con.Close()
cont:
End Using
Sleep(1000) 'For testing
k = k + 1 'For testing
Loop

View 3 Replies View Related

Change The Schema Of A Mirrored Database

Aug 8, 2007



Simple question, I hope. I need to add a column to a table of a database that is mirrored. How do I have to do that? Do I need to stop mirroring? Is it sufficient to simply pause mirroring? If I make the change on the principal db, what do I need to do the make the same change on the mirror?

Thanks,

View 6 Replies View Related

Recovering Mirrored Database From Snahshot

Feb 28, 2008



I have a mirred database and have snapshot created from the mirroed database. I can do data selecting from the snapshot. But when the pricipal server is down , I can re-active the mirroed database.( I did succesfully upto this). Then I need to restore the database from snapshot and which failing with following error message.




Code Snippet
Msg 5123, Level 16, State 1, Line 3
CREATE FILE encountered operating system error 3(error not found) while attempting to open or create the physical file 'E:sql_datadevitst_mirrorlog st_mirror_log.ldf'.
Msg 5024, Level 16, State 2, Line 3
No entry found for the primary log file in sysfiles1. Could not rebuild the log.
Msg 5028, Level 16, State 2, Line 3
The system could not activate enough of the database to rebuild the log.
Msg 3013, Level 16, State 1, Line 3
RESTORE DATABASE is terminating abnormally.

View 3 Replies View Related

Need Solution For SQL Network Interfaces, Error: 25 - Connection String Is Not Valid

Apr 9, 2008

hi
i am working with Asp.net2.0,Sqlserver2000.
i uploaded my developed application to the webserver.
all webpages are opening..bt when i try to interact with database it is raising error as following..
  
 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: 25 - Connection string is not valid) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
 
i set Enamble to namedPipes,Tcp/IP
i set Remote connection to enable
 
my web.config looks like this..
<?xml version="1.0"?>
<configuration>  <appSettings>
    <add key="cn"  value="User ID=redot;Password=redot;Data Source=216.185.43.148:1423;Initial Catalog=redot"   />    <!--<remove key="LocalSqlServer"/>    ;ProviderName=System.Data.SqlClient-->
     
  </appSettings>  <connectionStrings>    <!--<remove name="LocalSqlServer"/>-->
        <add name="redotConnectionString" connectionString="Data Source=216.185.43.148:1423;Initial Catalog=redot;User ID=redot;Password=redot"      providerName="System.Data.SqlClient" />    <add name="redotConnectionString1" connectionString="Data Source=216.185.43.148:1423;Initial Catalog=redot;User ID=redot;Password=redot"      providerName="System.Data.SqlClient" />    <add name="redotConnectionString2" connectionString="Data Source=216.185.43.148:1423;Initial Catalog=redot;User ID=redot;Password=redot"      providerName="System.Data.SqlClient" />    <add name="redotConnectionString3" connectionString="Data Source=216.185.43.148:1423;Initial Catalog=redot;User ID=redot;Password=redot"      providerName="System.Data.SqlClient" />    <add name="redotConnectionString4" connectionString="Data Source=216.185.43.148:1423;Initial Catalog=redot;User ID=redot;Password=redot"      providerName="System.Data.SqlClient" />    <add name="redotConnectionString5" connectionString="Data Source=216.185.43.148:1423;Initial Catalog=redot;User ID=redot;Password=redot"      providerName="System.Data.SqlClient" />    <add name="redotConnectionString6" connectionString="Data Source=216.185.43.148:1423;Initial Catalog=redot;User ID=redot;Password=redot"      providerName="System.Data.SqlClient" />    <add name="redotConnectionString7" connectionString="Data Source=216.185.43.148:1423;Initial Catalog=redot;User ID=redot;Password=redot"      providerName="System.Data.SqlClient" />    <add name="redotConnectionString8" connectionString="Data Source=216.185.43.148:1423;Initial Catalog=redot;User ID=redot;Password=redot"      providerName="System.Data.SqlClient" />    <add name="redotConnectionString9" connectionString="Data Source=216.185.43.148:1423;Initial Catalog=redot;User ID=redot;Password=redot"      providerName="System.Data.SqlClient" />    <add name="redotConnectionString10" connectionString="Data Source=216.185.43.148:1423;Initial Catalog=redot;User ID=redot;Password=redot"      providerName="System.Data.SqlClient" />  </connectionStrings>  <system.web>
 
    <sessionState             mode="InProc"            stateConnectionString="tcpip=127.0.0.1:42424"            sqlConnectionString="data source=216.185.43.148:1423;User ID=redot;Password=redot;Trusted_Connection=True"            cookieless="false"             timeout="60"     />
    <compilation debug="true"  />    <!--            The <authentication> section enables configuration             of the security authentication mode used by             ASP.NET to identify an incoming user.         -->
 
        <customErrors  mode="Off">           <error statusCode="404" redirect="filenotfound.htm" />    </customErrors>
  </system.web>  <system.net>
    <mailSettings>
      <smtp>        <network host="216.185.54.55"  port="25" />             </smtp>    </mailSettings>
  </system.net></configuration>
 
i will be very thankful ,if  anyone help me to resolve this problem..
pls..its urgent for me
 Thanks& Regards
Shobha
 

View 1 Replies View Related

Integration Services :: Connection String Error - Expression Cannot Be Parsed

Jul 26, 2015

Error: The variable "$Package::LocalConfigDB_ConnectionString" was not found in the Variables collection. The variable might not exist in the correct scope.

Error: Attempt to parse the expression "@[$Package::LocalConfigDB_ConnectionString]" failed and returned error code 0xC00470A6. The expression cannot be parsed. It might contain invalid elements or it might not be well-formed. There may also be an out-of-memory error.

View 3 Replies View Related

Connection String For Remote Database Connectivity(SQL Server2000)

Jun 12, 2007

hai,
I am working on ASP.NET 2003 with SQLServer2000. My application requires to be connected to the Database which is there in my Headoffice.
My SQLServerName is "MyDBServerTestDB"
Database Name is "WebTO", UserID="******" and Password="******"
My Remote Server IP Address is "192.168.1.2" and its Static IP is "58.93.61.235"
I have specified the Connection string for my Remote Server as
"Provider=SQLOLEDB.1;Server=58.93.61.235TestDB;UID=******;PWD=******;Database=WebTO"
                               (or)
"Provider=SQLOLEDB.1;Server=58.93.61.235TestDB,1433;UID=******;PWD=******;Database=WebTO"           (1433 is the Port number of the Remote SQLServer)
but it is giving the error " SQL Server does not exist or access denied".
if i execute the same application at my Headoffice (Remote Server) by changing the Connection string as
"Provider=SQLOLEDB.1;Server=192.168.1.2TestDB;UID=******;PWD=******;Database=WebTO"
then, it is working fine.
Can anyone tell me where i went wrong or what i have to specify in my Connection string so that i can access my Remote Database Server.
Thanks in Advance,
Srinivas.

View 7 Replies View Related

Connection String To SQL Server 2005 Express Database

Apr 10, 2008

Hi, all. I am using VS.NET 2005 and SQL Server 2005 Express. I tried to use the following code to connect to a database named "AMSPROD" that I attached to SQL Server 2005 Express:
 dbConn = new OleDbConnection(Data Source=.SQLEXPRESS;AttachDbFilename="C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataAMSPROD_Data.MDF";Integrated Security=True;Connect Timeout=30;User Instance=True);
dbConn.Open();
I got an error asking for provider with the above connection string, then I changed the conncection string to be like follows:
Data Source=.SQLEXPRESS;AttachDbFilename="C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataAMSPROD_Data.MDF";Provider=SQLNCLI;Integrated Security=True;Connect Timeout=30;User Instance=True
I got error: No error message available, result code: DB_E_ERRORSOCCURRED(0x80040E21)
Then I changed the Provider to be like: Provider=SQLOLEDB, now I am getting the following error:
Message: "Invalid authorization specification
Invalid connection string attribute"
Source: "Microsoft SQL Native Client"
StackTrace: " at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OleDb.OleDbConnection.Open()
at ISESAMSData.DbConnections.MakeConnection() in C:\ISES\ISESCommon\ISESAMSData\DbConnections.cs:line 74"
TargetSite: {Void .ctor(System.Data.OleDb.OleDbConnectionString, System.Data.OleDb.OleDbConnection)}
Strange thing is, when I use the Connect To Database under Tool menu of VS.NET 2005, I could make the connection to this database. Then I copied this connection string to the code, the connection couln't be made. I feel very confused.
I am wondering if I need to add ASP.NET user to SQLExpress. But I don't know how to do it?
Can anyone please help me out! Many thanks!

View 7 Replies View Related

[HELP!] How Do You Make The Database Path Relative In The Connection String?

Oct 10, 2006

Hi everyone,

I am working on a Hospital Information System project with a team of 6.Each one of us builds or modifies a part of the system and shares the project over a common repository. The problem here is that we use the absolute path of the database in our connection string. Although the directory structure of our project is the same for each member, since the main project folder itself is stored in different locations on each person's computer (for example, one may have it stored in c:My Documents and the other in d: My Documents), we are forced to modify the connection string manually each time someone else from the team updates the repository with the database. How do we make the path of the database relative so that we don't have to modify the connection string manually each time after receiving an update from the repository?

Your help is greatly appreciated.

View 1 Replies View Related

Backup Plan For A SQL2005 Mirrored Database.

Sep 7, 2007

Heya all,

Sorry if this has been posted elsewhere, etc., please point me in the right direction if it has 'cos I couldn't find it!

Right, we have a mirrored database with full safety and a witness for automatic fail over, all works fine, very impressed with it. Now I need to backup the database involved and this is where I could do with some help and answers and/or tips.

As the mirror database is off-line/recovering it seems you can't back that one up, but I'd like to have something that tries to back it up for if/when it fails over and becomes the primary. The solution I've used for now is to write a small .Net application that uses the client side fail over connection string (Data Source=Server1;Failover Partner=Server2) so that it connects to whatever system is currently the primary, and then issues the relevant 'BACKUP xxx' statements to backup the database.

This applications is launched from a windows scheduled task job on the hour (or near to it), every hour. At 06:00 it does a full backup, at 12:00, 18:00 and 00:00 it does a differential backup, and all other times it does a transaction log backup.

This all seems to work fine so far, and generates all the relevant backup files to a share on another server.

So, my main question is; does this look like a good plan? Am I missing some really simple wizard or button that would backup the relevant database from whatever server is up?

Secondly, are the backups from each server interchangeable as they're in a mirrored configuration? That is, for example, the backup application (on the hour) connects to Server1 does a full back up, followed later by a log backup. Server1 then dies, so the next time the backup application runs it connects to Server2 and because of the current time does a log backup from Server2. If we had to restore from backups, could we use the full backup and log from Server1, followed by the log from Server2? Otherwise I'll guess I'll need to modify the logic for the backup application to detect it's failed over, and maybe do a full backup on Server2, or something like that.

Anyway, thanks for any help/advice/tips,

Gareth/OhGod

View 5 Replies View Related

Configuring Network Routes To A Mirrored Database

Feb 29, 2008

Hi all,

I am struggling with configuring SSB network routes to a mirror database. What I want to accomplish is to configure a SSB application to work in a database mirroring setup but I am not looking for a load balancing solution.

According to SQL Server 2005 Books Online (http://msdn2.microsoft.com/en-us/library/ms166090.aspx) the typical routing configuration for a service hosted by a mirrored database is set by specifying the 'mirror_address' field but leaving the 'broker_instance' field empty (i.e. NULL) in the sys.routes table (see Example 3 in link above). I haven't seen how this is possible because if you specify the MIRROR_ADDRESS parameter in the CREATE/ALTER ROUTE command then you must also specify the BROKER_INSTANCE parameter.

I haven't found a way to set the mirror_address field to a valid value and the broker_instance field as NULL, is this possible? If not I must set the broker_instance as the guid of my broker instance but my understanding is that it should primarily be used for load balancing configuration. My preference would be to not set the BROKER_INSTANCE parameter, is this possible?

Best regards,
Oli

View 1 Replies View Related

SQL 2012 :: Increase File Size For A Mirrored Database?

Apr 14, 2015

I need to increase the file size for a mirrored database. I am new to using mirroring for replication. Will increasing the file size break the mirror?

View 2 Replies View Related

Getting E-mail Notification After Mirrored Database Automatic Failover

Jul 12, 2007

Hello,

I am a C++/C# developer my SQL skills are very limited.
I have a database set up for mirroring and I would like to get an e-mail notification whenever an Automatic Failover occurs. Can anyone show me how to do this using SQLServer 2005? Please provide T-SQL script sample if possible!



Thanks,



-Agustin

View 7 Replies View Related

How To Change Initial Log File Size On Mirrored Database

Oct 23, 2015

I have a database I need to copy from a Prod server to a Dev server. There is not enough space on the Dev server. In looking at the size of the files on the Prod server, the Initial Size property for the transaction log on the Prod server is set to 100,000 MB though the log is using nowhere near that.

This is a mirrored database so the recovery model is "full". I know that to change the initial log size, I have to put the database in 'simple" recovery model. Is this possible? Can I just:

1. Pause the mirror
2. Switch recovery model to simple
3. Change the initial size property to something smaller.
4. Shrink the transaction log
5. Change the recovery model back to full and resume the mirror?

I honestly don't know if the transaction log is needed on the Dev server. Meaning I may just be able to restore the transaction log to a different location on the server and delete it so that  new one is created.

View 2 Replies View Related

Something Wrong With Table Structure Change On Mirrored Database

Mar 6, 2008

I have set up mirroring in high availability mode (principal, mirror, and witness).

After setting up mirroring, I needed to adjust the size of a column in one of my tables. I did so with the following command

ALTER TABLE OrderOptimizer.dbo.rCodes ALTER COLUMN CodeDescription VARCHAR(8000).

The column was initially VARCHAR(128)

When I look at the table structure it shows that the column is now VARCHAR(8000), however I can only enter 128 characters into the field.

I forced a failover to look at the table on the mirrored version. It too showed that the column was VARCHAR(8000).

If I open the table I can enter more than 128 characters into the field, however when I refresh, it is truncated to 128 characters,

Any help would be appreciated

View 4 Replies View Related

SQL 2012 :: Restoring Mirrored Database To Different Server Occasionally Fail?

Oct 19, 2015

Every once in a while a scheduled restore of a production database backup to a development server will fail with the following error.

RESTORE cannot operate on database 'XXX' because it is configured for database mirroring or has joined an availability group

While it is true the production database is involved in database mirroring, the development server does not have database mirroring enabled. This error tells me something within the backup is telling the development server the database is configured for database mirroring.

However the perplexing part for me is that we only receive this error maybe 5% of the time, if that, and only on a couple of our databases. We have numerous other restores of mirrored production databases to development servers that have never produced this error. So my question is what is causing this error to occur, and why is it not happening all of the time? We get around this error by deleting the DEV database and re-running the restore job.

View 0 Replies View Related

The Connection Name 'LocalSqlServer' Was Not Found In The Applications Configuration Or The Connection String Is Empty.

Sep 27, 2007

Hi,
I'm having a BIG problem, this is my 3rd day looking for answer !I'm trying to create a custom membership provider with MS SQL database 2005 but not the default ASPNETDB. I've changed the web.config to be as following:<connectionStrings><add name="sqlConn" connectionString="Data Source=.;Integrated Security=True;Initial Catalog=ASPNETDB;"providerName="System.Data.SqlClient" /></connectionStrings> <system.web><trace enabled="true" /><roleManager enabled="true" /><authentication mode="Forms" />
<membership defaultProvider="MySqlProvider"><providers><remove name="AspNetSqlProvider"/><add name="MySqlProvider" connectionStringName="SqlConn" type="System.Web.Security.SqlMembershipProvider" applicationName="/" /></providers></membership>
But when I try to login to the site using the login control the following error occurs:
Server Error in '/etest' Application.


Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty.Source Error:



Line 149: <roleManager>
Line 150: <providers>
Line 151: <add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Line 152: <add name="AspNetWindowsTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Line 153: </providers>Source File: C:WINDOWSMicrosoft.NETFrameworkv2.0.50727Configmachine.config    Line: 151


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.213
 It is clear that this is a prblem with my Machine.Config file - since I've "worked!" on this file for a while. But when I've checked the Machine.config file I've found the LocalSqlServer connection it is talking about! .
I'm lost and I dunno what to do, can anyone help?
Here is the mahine.config in case if you need it:<connectionStrings>
<add name="LocalSqlServer" connectionString="data source=.;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" /></connectionStrings>
<system.data><DbProviderFactories>
<add name="Odbc Data Provider" invariant="System.Data.Odbc" description=".Net Framework Data Provider for Odbc" type="System.Data.Odbc.OdbcFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /><add name="OleDb Data Provider" invariant="System.Data.OleDb" description=".Net Framework Data Provider for OleDb" type="System.Data.OleDb.OleDbFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add name="OracleClient Data Provider" invariant="System.Data.OracleClient" description=".Net Framework Data Provider for Oracle" type="System.Data.OracleClient.OracleClientFactory, System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /><add name="SqlClient Data Provider" invariant="System.Data.SqlClient" description=".Net Framework Data Provider for SqlServer" type="System.Data.SqlClient.SqlClientFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add name="SQL Server CE Data Provider" invariant="Microsoft.SqlServerCe.Client" description=".NET Framework Data Provider for Microsoft SQL Server 2005 Mobile Edition" type="Microsoft.SqlServerCe.Client.SqlCeClientFactory, Microsoft.SqlServerCe.Client, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /></DbProviderFactories>
</system.data><system.web>
<processModel autoConfig="true" /><httpHandlers />
<membership><providers>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression="" /></providers>
</membership><profile>
<providers><add name="AspNetSqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers></profile>
<roleManager><providers>
<add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /><add name="AspNetWindowsTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers></roleManager>
</system.web>

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved