아래 코드는 코딩 할 때 잘 작동합니다. IIS에 코드를 게시 한 다음 연결이 실패했습니다.IIS에서 배포 한 후 SQL 서버 연결에 실패 했습니까?
나는 코딩 할 때 자격 증명으로 내 창 로그인을 취하고 IIS에서 AppPool ID를 사용하고 있습니다. Windows 로그인 자격 증명을 connectionstring에 어떻게 전달할 수 있습니까?
는Public Shared Function DbCollection(connectionString As String) As DatabaseCollection
Dim server As New Microsoft.SqlServer.Management.Smo.Server(connectionString)
Return server.Databases
End Function
오류 : 그것이 오류를 바탕으로
는Login failed for user 'Domain\Computername$'.
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: Login failed for user
'Domain\Computername$'.
왜 하시겠습니까? 이러한 종류의 인증은이 목적에 맞는 서비스 계정을 사용하여 수행해야합니다. Windows 계정을 사용하고자하는 이유가 있습니까? 나는 당신이 정말로 당신의 신임장을 의미하는 것이 아니라, 인증 된 신원의 신임장이라고 가정하고 있습니다. –
이 응용 프로그램은 사용자 한 명을 사용하기 때문에 컴퓨터에만 배포됩니다. – James123
그래도 이럴 이유가 없습니다. 이러한 종류의 액세스에는 서비스 계정을 사용하는 것이 좋습니다. –