0
프로젝트에서 이미지를 업로드하려고합니다. 내 프로젝트는 C# 및 코드입니다. 제출 버튼 컴파일러 오류 : 형식 또는 네임 스페이스 이름 'Core'이 '시스템'네임 스페이스에 없습니다 (어셈블리 참조가 누락 되었습니까?)
FileUpload1.SaveAs(
Server.MapPath("Photos\\" +
System.Core.WebSecurity.GetUserName(Request) + ".jpg"));
Response.Write(
"<html> <script> alert ('you have successfully uploaded'); </script></html>");
Response.Redirect("studentcreated.aspx");
다음에 컴파일되지만 그
The type or namespace name 'Core' does not exist in the namespace 'System' (are you missing an assembly reference?) .
그때 레퍼런스 system.core를 추가하여이 문제를 해결하려고
같은 오류를 나타낸다. 그러나 여전히 동일한 오류를 보여줍니다. 나는 vs2008 asp3.5를 사용하고 있습니다.
나는'WebSecurity' 클래스에 찾을 수있는 유일한 기준은'WebMatrix.WebData' 네임 스페이스에 있습니다. 나는'System.Core' 네임 스페이스에 대해 들어 본 적이 없다. –
@ user793987, 당신은'System.Core.WebSecurity.GetUserName (Request)'를 사용하고 있습니까? –