Answered by:
Microsoft Visual Web Developer 2010 Express with MSSQL Database

Question
-
User1467268874 posted
Hi guys!
First of all I´m a newby when it comes to ASP.NET but I would appreciate some assistant in order to make this work.
I have created a website using Microsoft Visual Web Developer 2010 Express and letting it create an Express database and all that worked.
But know I have a webhotel (Crystone) which gives me the possibillity to use MSSQL database instead.
I have created a database that are blank for the moment.I am able to add a connection to the database through Microsoft Visual Web Developer 2010 Express and testing the connection works.
But I would like to use the MSSQL database and remove the Express one totally.
In other words I would like the website to use the MSSQL database for the loginprocess and so on.
I added this in web.config under <configuration>.<connectionStrings> <remove name="LocalSqlServer"/> <add name="LocalSqlServer" connectionString="Server=83.563.158.12;Database=db10077000_name;User Id=u1100057_name;Password=Pa55W0rd00;" /> </connectionStrings>
I then tried to use C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regsql.exe to set up the database correctly (I am using the same credentials, ipadress and database name as I did in MVWD 2010 Express which worked) but it gives me following error (I translated it to english because my errormsg was in Swedish):
Exception:
An error ocured while trying to run the SQL-file InstallMembership.sql. SQL-errorcode is -2 and SqlException-message is: Timeout occured before the task was finnished or the server does not respond.----------------------------------------
Information om felet
----------------------------------------SQL Server:
Databas: [db1167757_MIGS]
REad SQL-file:
InstallMembership.sqlFailed commando:
EXEC sp_addrolemember N'aspnet_Membership_BasicAccess', N'aspnet_Membership_FullAccess'
EXEC sp_addrolemember N'aspnet_Membership_ReportingAccess', N'aspnet_Membership_FullAccess'
SQL-exception:
System.Data.SqlClient.SqlException (0x80131904): Timeout uppstod innan åtgärden slutfördes eller servern svarar inte. ---> System.ComponentModel.Win32Exception (0x80004005): Tidsgränsen för vänteåtgärden överskreds
vid System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
vid System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
vid System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
vid System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync()
vid System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket()
vid System.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer()
vid System.Data.SqlClient.TdsParserStateObject.TryReadByte(Byte& value)
vid System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
vid System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout)
vid System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
vid System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
vid System.Web.Management.SqlServices.ExecuteFile(String file, String server, String database, String dbFileName, SqlConnection connection, Boolean sessionState, Boolean isInstall, SessionStateType sessionStatetype)
ClientConnectionId:da00709f-3838-4cb5-838f-79b399130ad4How should I TS this?
Saturday, April 27, 2013 6:50 AM
Answers
-
User1467268874 posted
I copy the connection string created by MVWD 2010 Express, found under modify connection (added Password=mypassword and then it worked.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, May 3, 2013 7:27 AM
All replies
-
User1467268874 posted
I copy the connection string created by MVWD 2010 Express, found under modify connection (added Password=mypassword and then it worked.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, May 3, 2013 7:27 AM -
User-166373564 posted
Hi MIGS.Sacramento
I copy the connection string created by MVWD 2010 Express, found under modify connection (added Password=mypassword and then it worked.Thanks for your kind feedback, and I come here to confirm and close this issue. If you have anything urgent, please feedback by creating another issue.
With regards
Sunday, May 5, 2013 9:41 PM