我使用entity Framework4和asp.net server2008创建了一个带有sql的应用程序。在localhost上一切都运行得很好,但是当我移动到iis时,我得到了这个异常:
Cannot open database "Template" requested by the login. The login failed.
Login failed for user 'IIS APPPOOL\DefaultAppPool'.
这是我的密码:
public ActionResult PostFile(HttpPostedFileBase file, int NoteId)
{
FileInfo f = new FileInfo(file.FileName);
string fullname = f.FullName; //fullname changes depending on if I am using IE or Chrome
}
这是我的观点(PostFile.cshtml):
@model RiPSShare