![]() |
Модераторы: gambit, Kefir, Partizan |
![]() ![]() ![]() |
|
saneea |
|
|||
![]() Бывалый ![]() Профиль Группа: Участник Сообщений: 205 Регистрация: 13.7.2005 Репутация: нет Всего: 0 |
Привет. Только начал читать WPF. В книге Крисса Андерсена один из первых примеров такой:
Ну и по идее его можно выполнить в браузере. Но я получаю вот такие ругательства от браузера (см. ниже). Где ж я мог ошибиться в таком простом примере? URI запуска: D:\saneeadocs\!\кодинх\C#/wpf/first/first.xaml Идентификация приложения: System.Security.SecurityException: Сбой при запросе разрешения типа "System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". в System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) в System.Security.CodeAccessPermission.Demand() в MS.Internal.PresentationFramework.SecurityHelper.DemandUnmanagedCode() в System.Windows.Window..ctor() в System.Windows.Markup.KnownTypes.CreateKnownElement(KnownElements knownElement) в System.Windows.Markup.BamlRecordReader.CreateInstanceFromType(Type type, Int16 typeId, Boolean throwOnFail) в System.Windows.Markup.BamlRecordReader.GetElementAndFlags(BamlElementStartRecord bamlElementStartRecord, Object& element, ReaderFlags& flags, Type& delayCreatedType, Int16& delayCreatedTypeId) в System.Windows.Markup.BamlRecordReader.BaseReadElementStartRecord(BamlElementStartRecord bamlElementRecord) в System.Windows.Markup.BamlRecordReader.ReadElementStartRecord(BamlElementStartRecord bamlElementRecord) в System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord) в System.Windows.Markup.BamlRecordReader.Read(BamlRecord bamlRecord, Int32 lineNumber, Int32 linePosition) в System.Windows.Markup.XamlTreeBuilder.BamlRecordWriterSyncUpdate(BamlRecord bamlRecord, Int32 lineNumber, Int32 linePosition) в System.Windows.Markup.XamlTreeBuilderBamlRecordWriter.WriteBamlRecord(BamlRecord bamlRecord, Int32 lineNumber, Int32 linePosition) в System.Windows.Markup.BamlRecordWriter.WriteElementStart(XamlElementStartNode xamlElementNode) в System.Windows.Markup.TreeBuilderXamlTranslator.WriteElementStart(XamlElementStartNode xamlElementStartNode) в System.Windows.Markup.XamlParser.ProcessXamlNode(XamlNode xamlNode, Boolean& cleanup, Boolean& done) в System.Windows.Markup.XamlParser.ReadXaml(Boolean singleRecordMode) в System.Windows.Markup.XamlParser.GetParseMode() в System.Windows.Markup.XamlTreeBuilder.ParseFragment() в System.Windows.Markup.TreeBuilder.Parse() в System.Windows.Markup.XamlReader.LoadAsync(Stream stream, ParserContext parserContext) в MS.Internal.AppModel.AppModelKnownContentFactory.XamlConverter(Stream stream, Uri baseUri, Boolean canUseTopLevelBrowser, Boolean sandboxExternalContent, Boolean allowAsync, Boolean isJournalNavigation, XamlReader& asyncObjectConverter) в MS.Internal.AppModel.MimeObjectFactory.GetObjectAndCloseStream(Stream s, ContentType contentType, Uri baseUri, Boolean canUseTopLevelBrowser, Boolean sandboxExternalContent, Boolean allowAsync, Boolean isJournalNavigation, XamlReader& asyncObjectConverter) в System.Windows.Navigation.NavigationService.GetObjectFromResponse(WebRequest request, WebResponse response, Uri destinationUri, Object navState) в System.Windows.Navigation.NavigationService.HandleWebResponse(IAsyncResult ar) в System.Windows.Navigation.NavigationService.<>c__DisplayClassc.<HandleWebResponseOnRightDispatcher>b__8(Object unused) в System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter) в System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) в System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) в System.Windows.Threading.DispatcherOperation.InvokeImpl() в System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state) в System.Threading.ExecutionContext.runTryCode(Object userData) в System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) в System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) в System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) в System.Windows.Threading.DispatcherOperation.Invoke() в System.Windows.Threading.Dispatcher.ProcessQueue() в System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) в MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) в MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) в System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter) в System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) в System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) в System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter) в System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg) в MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) в MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) в System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) в System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame) в System.Windows.Threading.Dispatcher.Run() в System.Windows.Application.RunDispatcher(Object ignore) в System.Windows.Application.StartDispatcherInBrowser(Object unused) в System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter) в System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) в System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) в System.Windows.Threading.DispatcherOperation.InvokeImpl() в System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state) в System.Threading.ExecutionContext.runTryCode(Object userData) в System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) в System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) в System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) в System.Windows.Threading.DispatcherOperation.Invoke() в System.Windows.Threading.Dispatcher.ProcessQueue() в System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) в MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) в MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) в System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter) в System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) в System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) в System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter) в System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg) в MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) Ошибкой завершилось следующее действие: Demand Ошибкой завершилось первое разрешение следующего типа: System.Security.Permissions.SecurityPermission Ошибкой завершилось первым следующее разрешение: <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode"/> Было предъявлено следующее требование: <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode"/> Для сбойной сборки был предоставлен следующий набор: <PermissionSet class="System.Security.PermissionSet" version="1"> <IPermission class="System.Security.Permissions.FileDialogPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Access="Open"/> <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="D:\saneeadocs\!\кодинх\C#\wpf\first\" PathDiscovery="D:\saneeadocs\!\кодинх\C#\wpf\first\"/> <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Execution"/> <IPermission class="System.Security.Permissions.UIPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Window="SafeTopLevelWindows" Clipboard="OwnClipboard"/> <IPermission class="System.Drawing.Printing.PrintingPermission, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" version="1" Level="SafePrinting"/> <IPermission class="System.Security.Permissions.MediaPermission, WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" version="1" Audio="SafeAudio" Video="SafeVideo" Image="SafeImage"/> <IPermission class="System.Security.Permissions.WebBrowserPermission, WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" version="1" Level="Safe"/> </PermissionSet> ----------------------- PresentationHost.exe v3.0.6920.4902 built by: NetFXw7 - C:\Windows\system32\PresentationHost.exe ntdll.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\SYSTEM32\ntdll.dll kernel32.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\kernel32.dll KERNELBASE.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\KERNELBASE.dll snxhk.dll v6.0.1203.0 - C:\Program Files\AVAST Software\Avast\snxhk.dll ADVAPI32.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\ADVAPI32.dll msvcrt.dll v7.0.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\msvcrt.dll sechost.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\SYSTEM32\sechost.dll RPCRT4.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\RPCRT4.dll USER32.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\USER32.dll GDI32.dll v6.1.7600.16400 (win7_gdr.090723-1830) - C:\Windows\system32\GDI32.dll LPK.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\LPK.dll USP10.dll v1.0626.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\USP10.dll ole32.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\ole32.dll OLEAUT32.dll v6.1.7600.20520 - C:\Windows\system32\OLEAUT32.dll mscoree.dll v4.0.20428.1 (Beta1.020428-0100) - C:\Windows\system32\mscoree.dll SHLWAPI.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\SHLWAPI.dll WININET.dll v8.00.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\WININET.dll Normaliz.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\Normaliz.dll urlmon.dll v8.00.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\urlmon.dll CRYPT32.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\CRYPT32.dll MSASN1.dll v6.1.7600.16415 (win7_gdr.090828-1615) - C:\Windows\system32\MSASN1.dll iertutil.dll v8.00.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\iertutil.dll SHELL32.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\SHELL32.dll IMM32.DLL v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\IMM32.DLL MSCTF.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\MSCTF.dll CRYPTBASE.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\CRYPTBASE.dll uxtheme.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\uxtheme.dll UnlockerHook.dll v(null) - C:\Program Files\Unlocker\UnlockerHook.dll CLBCatQ.DLL v2001.12.8530.16385 (win7_rtm.090713-1255) - C:\Windows\system32\CLBCatQ.DLL CRYPTSP.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\CRYPTSP.dll rsaenh.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\rsaenh.dll RpcRtRemote.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\RpcRtRemote.dll PROPSYS.dll v7.00.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\PROPSYS.dll PresentationHostDLL.dll v3.0.6920.4902 built by: NetFXw7 - C:\Windows\Microsoft.NET\Framework\v3.0\WPF\PresentationHostDLL.dll MSVCR80.dll v8.00.50727.4927 - C:\Windows\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4927_none_d08a205e442db5b5\MSVCR80.dll VERSION.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\VERSION.dll PSAPI.DLL v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\PSAPI.DLL ieproxy.dll v8.00.7600.16385 (win7_rtm.090713-1255) - C:\Program Files\Internet Explorer\ieproxy.dll SXS.DLL v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\SXS.DLL PresentationHostProxy.dll v4.0.20428.1 built by: Beta1 - C:\Windows\System32\PresentationHostProxy.dll actxprxy.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\actxprxy.dll dwmapi.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\dwmapi.dll SspiCli.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\SspiCli.dll mscorwks.dll v2.0.50727.4927 (NetFXspW7.050727-4900) - C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll profapi.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\profapi.dll mscorlib.ni.dll v2.0.50727.4927 (NetFXspW7.050727-4900) - C:\Windows\assembly\NativeImages_v2.0.50727_32\mscorlib\8c1770d45c63cf5c462eeb945ef9aa5d\mscorlib.ni.dll System.ni.dll v2.0.50727.4928 (NetFXW7QFE.050727-4900) - C:\Windows\assembly\NativeImages_v2.0.50727_32\System\3ac96c7fb6c5aca51a20c4f06b28dd46\System.ni.dll WindowsBase.ni.dll v3.0.6920.4902 built by: NetFXw7 - C:\Windows\assembly\NativeImages_v2.0.50727_32\WindowsBase\df9af971018d005ff1b1346802747e70\WindowsBase.ni.dll PresentationCore.ni.dll v3.0.6920.4902 built by: NetFXw7 - C:\Windows\assembly\NativeImages_v2.0.50727_32\PresentationCore\4b6fee8eae3d6983147d9d50b60fa681\PresentationCore.ni.dll PresentationFramework.ni.dll v3.0.6920.4902 built by: NetFXw7 - C:\Windows\assembly\NativeImages_v2.0.50727_32\PresentationFramewo#\04af0008f8f84f0696cf47fbad45513d\PresentationFramework.ni.dll wpfgfx_v0300.dll v3.0.6920.4902 built by: NetFXw7 - C:\Windows\Microsoft.NET\Framework\v3.0\WPF\wpfgfx_v0300.dll System.Xml.ni.dll v2.0.50727.4927 (NetFXspW7.050727-4900) - C:\Windows\assembly\NativeImages_v2.0.50727_32\System.Xml\20ede60d7fbe98f002ba4a8811406f27\System.Xml.ni.dll mscorlib.resources.dll v2.0.50727.4927 (NetFXspW7.050727-4900) - C:\Windows\assembly\GAC_MSIL\mscorlib.resources\2.0.0.0_ru_b77a5c561934e089\mscorlib.resources.dll System.Drawing.ni.dll v2.0.50727.4927 (NetFXspW7.050727-4900) - C:\Windows\assembly\NativeImages_v2.0.50727_32\System.Drawing\f9dd13d7b1cb77643d19e3c2e357783f\System.Drawing.ni.dll PresentationUI.ni.dll v3.0.6920.4902 built by: NetFXw7 - C:\Windows\assembly\NativeImages_v2.0.50727_32\PresentationUI\461d8929bcfe86c0419dea6e5359c086\PresentationUI.ni.dll PresentationFramework.Classic.ni.dll v3.0.6920.4902 built by: NetFXw7 - C:\Windows\assembly\NativeImages_v2.0.50727_32\PresentationFramewo#\e7d0fbd94d04407622a2de0ddb2ad908\PresentationFramework.Classic.ni.dll System.Configuration.ni.dll v2.0.50727.4927 (NetFXspW7.050727-4900) - C:\Windows\assembly\NativeImages_v2.0.50727_32\System.Configuration\51ab34648a05241c96fa383290b88d53\System.Configuration.ni.dll d3d9.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\d3d9.dll d3d8thk.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\d3d8thk.dll nvd3dum.dll v8.15.11.8593 - C:\Windows\system32\nvd3dum.dll WINMM.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\WINMM.dll powrprof.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\powrprof.dll SETUPAPI.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\SETUPAPI.dll CFGMGR32.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\CFGMGR32.dll DEVOBJ.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\DEVOBJ.dll msctfui.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\msctfui.dll diasymreader.dll v8.0.50727.4927 (NetFXspW7.050727-4900) - C:\Windows\Microsoft.NET\Framework\v2.0.50727\diasymreader.dll |
|||
|
||||
vinograd2008 |
|
|||
Бывалый ![]() Профиль Группа: Участник Сообщений: 197 Регистрация: 7.12.2008 Репутация: нет Всего: нет |
Попробуй Page вместо Window
|
|||
|
||||
saneea |
|
|||
![]() Бывалый ![]() Профиль Группа: Участник Сообщений: 205 Регистрация: 13.7.2005 Репутация: нет Всего: 0 |
vinograd2008, спасибо, помогло
![]() |
|||
|
||||
![]() ![]() ![]() |
1 Пользователей читают эту тему (1 Гостей и 0 Скрытых Пользователей) | |
0 Пользователей: | |
« Предыдущая тема | WPF и Silverlight | Следующая тема » |
|
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности Powered by Invision Power Board(R) 1.3 © 2003 IPS, Inc. |