Tôi đã thử nghiệm một trang web ở Azure trong khoảng một tháng (Dùng thử miễn phí), và bây giờ tôi đã đăng ký trả tiền khi bạn đi. Khi tôi đang dùng thử miễn phí, tôi hoàn toàn không có vấn đề về kết nối. Bây giờ tôi đã triển khai lại một trang web mới được tạo trên đăng ký trả tiền khi bạn đi với cùng cài đặt (chế độ mở rộng, v.v ...) như trang trước. Tuy nhiên, bây giờ khi tôi điều hướng đến trang web của mình, đôi khi nó không kết nối được với cơ sở dữ liệu của tôi:Trang web Azure đôi khi không thể kết nối với cơ sở dữ liệu SQL Azure
Server Error in '/' Application.
A connection attempt failed because the connected party did not properly respond after
a period of time, or established connection failed because connected host has failed to
respond
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.ComponentModel.Win32Exception: A connection attempt failed
because the connected party did not properly respond after a period of time, or
established connection failed because connected host has failed to respond
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:
[Win32Exception (0x80004005): A connection attempt failed because the connected party
did not properly respond after a period of time, or established connection failed
because connected host has failed to respond]
[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: 0 - A connection attempt
failed because the connected party did not properly respond after a period of time, or
established connection failed because connected host has failed to respond.)
Tôi cố gắng làm mới trang và nó kết nối. Sau một vài phút, khi tôi thử lại, đôi khi tôi lại gặp lỗi tương tự, nhưng đôi khi thì không. Tôi chưa từng gặp vấn đề kết nối nào trong chế độ dùng thử miễn phí. Tại sao nó vui vẻ và làm thế nào tôi có thể ngăn chặn vấn đề này?
Bạn đã sử dụng hoặc thực hiện một số loại thử lại logic? – CSharpRocks
@CSharpRocks Không, tôi nên làm gì? –