, 내가 뭔가ASP.NET에서 텍스트 음성 - 액세스가 거부되었습니다. 어떻게해야합니까? 내 개인 웹 사이트에
내가 here에서와 같이, "개념"문제를 해결하고, 시각적 웹 개발자에서 실행하면 바탕 화면에 원활하게 작동에게는 "발음"하고 싶습니다. 파일을 만들고 페이지에 포함 된 플레이어가 파일을 재생합니다. 완전한.
행 19 : myfile.Open(@"C:\mypath\sapi\gen\hi.wav",SpeechStreamFileMode.SSFMCreateForWrite,false);
이 소스를
소스 오류입니다
Server Error in '/sapi' Application. Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) 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.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via , the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.
(...)
Source Error:
See it below
Source File: c:\mypath\sapi\myfile.aspx.cs Line: 21
Stack Trace:
[UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))]
SpeechLib.SpVoiceClass.Speak(String Text, SpeechVoiceSpeakFlags Flags) +0 prova.Button1_Click(Object sender, EventArgs e) in c:\mypath\sapi\prova.aspx.cs:21 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053
:
그래서, 서버에 업로드 ...이 오류 (500)를 얻을 수 라인 20 : voice.AudioOutputStream = myfile;
라인 21 : 나는 21 행에 오류가 1,238,599,
, 아마도 ASPNET 작업자 사용자가
가 생성 폴더의 모든 권리 권한이 일부 권리 허락되지 않았 음을 의미 Voice.speak
: 빈 파일이 만들어집니다 .
그래서 일부 시스템 dll에 실행 권한을 부여해야합니까?
dll을 알고 계십니까? 그것은이 하나 ASPNET 사용자가 모든 권한을 가지고,
시하지bin\Interop.SpeechLib.dll
입니다 : 내가 (창)에 대한 모든 서버 (나는 호스팅 공유되지 않습니다, RDC 액세스를 의미)
나는이 문제가 _is라는 가능성을 고려해야한다고 생각합니다. _ 파일 액세스. 실제 파일 액세스가 COM 코드 조각에 의해 수행되고 있음을 감안할 때, 나는 그것을 배제하지 않을 것입니다. –
출력 폴더에 대한 쓰기 권한을 거부하면 다른 예외가 발생합니다. System.Runtime.InteropServices.COMException : 찾을 수 없습니다.(HRESULT에서 예외 : 0x80030002 (STG_E_FILENOTFOUND)), 그래서 내가 왜 문제는 aspnet 사용자가 sapi 음성을 실행하는 올바른 persmission되지 않은 것 같아요 ... –
또한, wav가 만들어지고 wav 헤더 : RIFF & _____ WAVEfmt____data 파일 스트림이 아니므로 "채우기"로 설정하는 DLL처럼 보입니다. 차단 되었습니까? –