저는 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:
- 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.
- 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.
- Sql Server Express must be installed on the machine.
- 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 문서가 있다고 주장하지만, 나는 그 문서를 찾을 수 없었습니다.
거의 2 년 전에 작성되었지만 대답으로 받아 들여야합니다. 난 그냥이 문제를 가로 질러 실행하고 그것은 기본 인터넷 응용 프로그램과 "새 프로젝트"에서 실행하고 그것을 실행하는 유일한 문제가되었습니다. –
이 문제가 해결되었습니다. 아래에 요소를 추가해야합니다! –