3

저는 ASP.Net MVC를 실험 해왔고 특히 MVC와 관련이없는 문제를 발견했습니다. 그러나 기본 MVC 응용 프로그램 (새 MVC 프로젝트를 만들 때 마법사가 만든 응용 프로그램)에서 Windows 7의 IIS 7에서 제대로 작동하도록 인증을 얻을 수 없습니다.IIS 7에서 ASP.Net MVC 응용 프로그램의 익명 사용자에 대한 로컬 사용자 프로필을 만들려면 어떻게해야합니까?

Visual Studio 환경에서 실행하면 나는 웹 사이트가 Visual Studio에서 내 자신의 계정으로 실행되기 때문에이라고 생각

Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.

: 내가 대신 IIS에서 실행되도록 설정을 전환하면 작동은하지만, 나는 다음과 같은 예외가 로그인 또는 등록을 제출하려고 얻을 IIS의 IUSR 계정 아래에 있습니다. 지금까지는 예외 메시지에 대한 Google 검색이 도움이되지 않았습니다.

그래서 IUSR 계정에 대한 로컬 사용자 프로필을 만들 수 있습니까? 그렇다면 어떻게? SQLExpress 엔진이 IIS 7의 익명 계정에서 작동하도록하기 위해해야 ​​할 일이 있습니까?

또한 IIS 웹 사이트에서 내 계정을 사용하도록 구성했지만 내 개인 컴퓨터이기 때문에 내 계정에 암호가 없으므로 IIS에서 웹 사이트를 사용하도록 구성하지 못하는 것 같습니다 비밀 번호없이. 또는 IIS 7을 처음 사용 한 경험이 있고 구성이 IIS 5/6과 매우 다르다고 느껴지기 때문에 익명 액세스에 사용할 계정을 구성 할 수있는 올바른 설정이 누락되었습니다.

EDIT : 몇 가지 추가 정보가 있습니다. App_Data 폴더를 비우고 IIS에서 다시 시도하면 SQLExpress는 데이터베이스를 만들려고 시도하지만 실패하지만 예외 메시지에는 다음 제안 사항에 대한 추가 정보가 있습니다.

SQLExpress database file auto-creation error:

The connection string specifies a local Sql Server Express instance using a database location within the applications App_Data directory. The provider attempted to automatically create the application services database because the provider determined that the database does not exist. The following configuration requirements are necessary to successfully check for existence of the application services database and automatically create the application services database:

  1. If the applications App_Data directory does not already exist, the web server account must have read and write access to the applications directory. This is necessary because the web server account will automatically create the App_Data directory if it does not already exist.
  2. If the applications App_Data directory already exists, the web server account only requires read and write access to the applications App_Data directory. This is necessary because the web server account will attempt to verify that the Sql Server Express database already exists within the applications App_Data directory. Revoking read access on the App_Data directory from the web server account will prevent the provider from correctly determining if the Sql Server Express database already exists. This will cause an error when the provider attempts to create a duplicate of an already existing database. Write access is required because the web server accounts credentials are used when creating the new database.
  3. Sql Server Express must be installed on the machine.
  4. The process identity for the web server account must have a local user profile. See the readme document for details on how to create a local user profile for both machine and domain accounts.

저는 처음 세 가지 제안 사항이 만족 스럽다는 사실을 널리 확인했습니다. 네 번째 문제가 내 문제의 원인 인 것 같지만 어떻게해야하는지 알 수 없습니다. 그리고 제안은 그것을 설명하는 readme 문서가 있다고 주장하지만, 나는 그 문서를 찾을 수 없었습니다.

답변

4

중간 신뢰 하에서도이 문제가 발생합니다. 데이터베이스를 만드는 프로세스에는 최소한 높은 신뢰가 필요합니다. 당신의 Web.config에 지정된 신뢰를 추가하는 시도하고 전체 또는 높은 중 하나에 설정이없는 경우 당신은

<trust level="TrustLevel" /> 

에 대한 귀하의 Web.config에서 보면이를 확인할 수 있습니다. 그래도 작동하지 않으면 수정해야 할 IIS에 machine.config가 있습니다.

즉,이 문제를 해결하기 위해 가장 좋은 방법은 aspnet_regsql.exe를 사용하여 필요한 테이블을 만든 다음 Web.Config에서 연결 문자열을 변경하여 직접 살펴 보는 것입니다.

+0

거의 2 년 전에 작성되었지만 대답으로 받아 들여야합니다. 난 그냥이 문제를 가로 질러 실행하고 그것은 기본 인터넷 응용 프로그램과 "새 프로젝트"에서 실행하고 그것을 실행하는 유일한 문제가되었습니다. –

+0

이 문제가 해결되었습니다. 아래에 요소를 추가해야합니다! –

1

해결 된 "디렉터리 'LocalApplicationData'존재하지 않습니다." SQL SSIS 서비스 및 SQL Server 에이전트 서비스가 swql 작업이 사용하도록 설정된 동일한 계정에서 실행 중인지 확인하여 SQL 작업을 통해 SSIS 패키지를 실행할 때의 오류!

내 경우에는 도메인 계정이었습니다.

0

해결책 : 문제가 발생하기 전에 업데이트를 제거하십시오. 나는 수많은 시간을 보냈다. 나는 내 인생에서 결코 돌아 가지 않을 낭비없는 시간을 보냈다. 성공하지 않고 모든 가능한 해결책을 읽고 따라야했다. 나는 모든 SQL Server 업데이 트를 제거하고 지금은 모든게 잘 작동합니다.

+1

Egads, No! * 어떤 상황에서도 이것을하지 * 않습니다. –

+1

예, 보안 업데이트없이 SQL Server를 실행하는 것이 좋습니다 ... – LittleBobbyTables