| Subject: XamlParseException -> System.Security exception |
| Group: microsoft.public.windows.developer.winfx.avalon |
| Date: 7/28/2008 11:50:00 PM |
| From: =?Utf-8?B?VGhvbWFzIFcuIEJyb3du?= [Email Address Protection] |
I must be missing something obvious... I just installed VS 2008 on a new laptop (running XP SP3) and am trying the most simple WPF application (dropping a button onto the default grid. When I try to run I get an XamlParseException error (Line 1, position 9) but the inner, inner exception is a security exception: {"Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."} The stack trace is coming up through System.Windows.Markup.BamlRecordReader.CreateInstanceFromType Is there some .NET Security configuration I've missed? The weird thing is that on another machine I have no such problems and the .NET security configuration on both appears to be the same. TIA -- TB |
| Back |
| Subject: Re: XamlParseException -> System.Security exception |
| Group: microsoft.public.windows.developer.winfx.avalon |
| Date: 7/29/2008 4:29:40 AM |
| From: "xYrus" [Email Address Protection] |
Could you try to upgrade to .NET 3.5 (http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6&displaylang=en) and try again? Ususally, you don't have to configure security parameters. But note that, when you do some local system action (e.g. deleting a file) in browser applications, you will get a security error. You can also get extended information about XAML parsing errory by executing the project via "F11" key (debug per line) and press F11 until the exception arrives. The highlighted line causes the error. If nothing helps, you could send me the sample code (e-mail in header) and I will check that in a new XPSP3 virtual machine. "Thomas W. Brown" <thomas_w_brown@countrywide.NOSPAM.com> schrieb im Newsbeitrag news:3600C6A9-D357-4C83-9912-3381937D6740@microsoft.com... >I must be missing something obvious... I just installed VS 2008 on a new > laptop (running XP SP3) and am trying the most simple WPF application > (dropping a button onto the default grid. When I try to run I get an > XamlParseException error (Line 1, position 9) but the inner, inner > exception > is a security exception: > > {"Request for the permission of type > 'System.Security.Permissions.SecurityPermission, mscorlib, > Version=2.0.0.0, > Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."} > > The stack trace is coming up through > System.Windows.Markup.BamlRecordReader.CreateInstanceFromType > > Is there some .NET Security configuration I've missed? The weird thing is > that on another machine I have no such problems and the .NET security > configuration on both appears to be the same. > > TIA > -- TB > |
| Back |
| Subject: Re: XamlParseException -> System.Security exception |
| Group: microsoft.public.windows.developer.winfx.avalon |
| Date: 8/2/2008 10:16:56 AM |
| From: Georg Kiehne [Email Address Protection] |
Indeed, it is clean and correct XAML code. I think it is a general problem with your installation of .NET Framework because it runs on my machine. I will write you back if I've found the cause ;-) Best regards, xYrus Thomas W. Brown schrieb: > Here's the XAML, the code-behind is all default generated by VS2008; I > haven't modified a thing: > > <Window x:Class="Test.Window1" > xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" > Title="Window1" Height="300" Width="300"> > <Grid> > <Button Margin="98,115,105,125" Name="button1">Hello, World!</Button> > </Grid> > </Window> > > > > "xYrus" wrote: > >> Could you try to upgrade to .NET 3.5 >> (http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6&displaylang=en) >> and try again? >> >> Ususally, you don't have to configure security parameters. But note that, >> when you do some local system action (e.g. deleting a file) in browser >> applications, you will get a security error. >> >> You can also get extended information about XAML parsing errory by executing >> the project via "F11" key (debug per line) and press F11 until the exception >> arrives. The highlighted line causes the error. >> >> If nothing helps, you could send me the sample code (e-mail in header) and I >> will check that in a new XPSP3 virtual machine. >> >> "Thomas W. Brown" <thomas_w_brown@countrywide.NOSPAM.com> schrieb im >> Newsbeitrag news:3600C6A9-D357-4C83-9912-3381937D6740@microsoft.com... >>> I must be missing something obvious... I just installed VS 2008 on a new >>> laptop (running XP SP3) and am trying the most simple WPF application >>> (dropping a button onto the default grid. When I try to run I get an >>> XamlParseException error (Line 1, position 9) but the inner, inner >>> exception >>> is a security exception: >>> >>> {"Request for the permission of type >>> 'System.Security.Permissions.SecurityPermission, mscorlib, >>> Version=2.0.0.0, >>> Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."} >>> >>> The stack trace is coming up through >>> System.Windows.Markup.BamlRecordReader.CreateInstanceFromType >>> >>> Is there some .NET Security configuration I've missed? The weird thing is >>> that on another machine I have no such problems and the .NET security >>> configuration on both appears to be the same. >>> >>> TIA >>> -- TB >>> |
| Back |