22 Replies
You need to provide $details to have a chance of anyone helping
When you ask a question, make sure you include as much detail as possible. Such as code, the issue you are facing, and what you expect the result to be. Upload code here https://paste.mod.gg/ (see $code for more information on how to paste your code)
$details
When you ask a question, make sure you include as much detail as possible. Such as code, the issue you are facing, and what you expect the result to be. Upload code here https://paste.mod.gg/ (see $code for more information on how to paste your code)
$details I am not able to connect to sql server
When you ask a question, make sure you include as much detail as possible. Such as code, the issue you are facing, and what you expect the result to be. Upload code here https://paste.mod.gg/ (see $code for more information on how to paste your code)
he means actually type out what your problem is
with enough detail that someone can give you meaningful advice
its a small problem in connection string ..
don't need explanation
sounds like you don't need help then
Yeah, not sure how you expect any one to assist...
i need help
$detail I am not able to connect with workbench in mac. but i am able to connect workbench through terminal but not from visual studio..Anyone can help please?
what database? what is your connection string? is your server local or hosted somewhere else? what is the actual error message?
these are the kind of details you need to provide
I am not using any database. I applied migration and just want to update database
but when i am updating the database i am getting the error
at Microsoft.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource1 retry, SqlConnectionOverrides overrides)
at Microsoft.Data.SqlClient.SqlConnection.Open(SqlConnectionOverrides overrides)
at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerConnection.OpenDbConnection(Boolean errorsExpected)
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternal(Boolean errorsExpected)
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open(Boolean errorsExpected)
at
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 40 - Could not open a connection to SQL Server: Could not open a connection to SQL Server)
In short the error is this Microsoft.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 40 - Could not open a connection to SQL Server: Could not open a connection to SQL Server)
But i am able to connect through terminal and azure data studio with same user id and password and server is local host with all privileges granted
you aren't using a database?
but you're trying to connect to one?
did you check the things the error is telling you to check?
i am checking from 3 days
took help from chatgpt
google
actually i am using database first approach in this i am doing migration first then when i am updating it in db
its not working
its saying not able to open conection
can we connect in meet please?
@Jimmacle can you help please
you still haven't shown how you're trying to connect
can we connect through meet
{
"ConnectionStrings": {
"BloggieDbConnectionString": "Server=localhost;Database=BloggieDb;User=temp;Password=hide"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}
see i am doing this
and the error is above
can you show the code where you call
.AddDbContext
?builder.Services.AddDbContext<BloggyDbContext>(options =>
options.UseSqlServer(builder.Configuration.GetConnectionString("BloggieDbConnectionString")));
One thing is that also in MAC my server instance automatically getting on and off
can you please help>
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.