1

I recently ran into an issue when using aspnet_regsql in our environment. Locally, I didn't have any problem using the following command line.

"%WinDir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regsql.exe" -S server\instance -E -ssadd -sstype p

However, when I move to our server environments, I get the following failure message.

An error has occurred. Details of the exception: 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: 0 - The wait operation timed out.)

Unable to connect to SQL Server database.

1 Answer 1

1

I had a hunch that aspnet_regsql was using a different port than the default 1433. After using wireshark, I confirmed my suspicion and it was using 1434 which locally had no problem but since in a server environment, we need to explicitly request to open port, it was close by default.

The fix was simple enough which was to explicitly specify the port -S server\instance,1433

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.