View Single Post
Old 07-29-2008   #3 (permalink)
Thomas W. Brown


 
 

Re: XamlParseException -> System.Security exception

Already using .NET 3.5 -- I've installed VS2008. I checked anyway, and the
installer confirmed that I already have it.

The code is so simple it's not worth sending. Create a new WPF application
in VS 2008, drag a button onto the grid, press F5 to run.

On one machine, that I've had for awhile, and it has had VS 2003, VS 2005,
and now VS 2008, this works just fine. On my new laptop, with only VS 2008,
I get the error below. Both machines are running XP SP3.

-- TB

"xYrus" wrote:
Quote:

> Could you try to upgrade to .NET 3.5
> (http://www.microsoft.com/downloads/d...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@xxxxxx> schrieb im
> Newsbeitrag news:3600C6A9-D357-4C83-9912-3381937D6740@xxxxxx
Quote:

> >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
> >
>
My System SpecsSystem Spec