Ajay
Ajay

Reputation: 6590

Windows 8 exception "System.Security.SecurityException"

I am starting to develop windows 8 app. I am new in windows 8 app development. I have one page i.e. MainPage.xaml. I am not able to see the design view. It gives an error.

System.Security.SecurityException

Designer could not be started because of a permissions issue on the drive to which it is installed. Please check the permissions of the folder before trying to start the designer. at Microsoft.Expression.HostUtility.Platform.AppContainerProcessDomainFactory.CreateDesignerProcess(String applicationPath, String clientPort, Uri hostUri, IDictionary environmentVariables, Int32& processId, Object& processData) at Microsoft.Expression.DesignHost.Isolation.Primitives.ProcessDomainFactory.ProcessIsolationDomain..ctor(ProcessDomainFactory factory, IIsolationBoundary boundary, AppDomainSetup appDomainInfo, FrameworkName targetFramework, String identifier, String baseDirectory) at Microsoft.Expression.DesignHost.Isolation.Primitives.ProcessDomainFactory.CreateIsolationDomain(IIsolationBoundary boundary) at Microsoft.Expression.HostUtility.Platform.AppContainerProcessDomainFactory.CreateIsolationDomain(IIsolationBoundary boundary) at Microsoft.Expression.DesignHost.Isolation.Primitives.IsolationBoundary.Initialize() at Microsoft.Expression.DesignHost.Isolation.Primitives.IsolationBoundary.CreateInstance[T](Type type) at Microsoft.Expression.DesignHost.Isolation.IsolatedExportProvider.Initialize() at Microsoft.VisualStudio.ExpressionHost.Services.VSIsolationService.CreateExportProvider(IIsolationTarget isolationTarget, ICatalogFactory catalogFactory, IExportFilter filter) at Microsoft.Expression.DesignHost.Isolation.IsolationService.CreateLease(IIsolationTarget isolationTarget) at Microsoft.Expression.DesignHost.IsolatedDesignerService.CreateLease(IIsolationTarget isolationTarget, CancellationToken cancelToken, DesignerServiceEntry& entry) at Microsoft.Expression.DesignHost.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken) at Microsoft.Expression.DesignHost.Isolation.IsolatedTaskScheduler.InvokeWithCulture[T](CultureInfo culture, Func2 func, CancellationToken cancelToken) at Microsoft.Expression.DesignHost.Isolation.IsolatedTaskScheduler.<>c__DisplayClassa1.b__6() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute()

I have given administrative rights to the folders. But I am not getting why this error is getting?

Can someone please help me to solve this ?

Upvotes: 1

Views: 3445

Answers (5)

I have just upgraded from Windows 7 to Windows 10

And the first problem i had with Windows 10 is this(besides the one where you need to enable "Developer mode" this is probably only in windows 10), and the trick for me that made this work was running Visual Studio 2013 as Admin

Hope this helps

Upvotes: 1

Anobik
Anobik

Reputation: 4899

I will just try to help with some steps and links as it is not reproduce able on my sid e:)

Steps:

THIS MUST BE DONE AS ADMINISTRATOR

  • Select the folder in Windows Explorer, right-click and select 'Properties'
  • Click the 'Security' tab then click the 'Advanced...' button
  • At the top of the new window there should 'Name' and 'Owner'. Next to owner click the 'Change' link.
  • In the new window make sure you have your local computer selected under 'From this location:'. If not click 'Locations...' and select your local computer then click 'OK'.
  • In the textbox under 'Enter the object name to select, type 'Users' and click 'Check Names...'
  • Click 'OK'
  • At the top of the page check the option 'Replace owner on subcontainers and objects'. Click 'Apply'. You may be prompted to shut the properties dialog to apply the ownership changes, if so close all dialogs then repeat steps 1 and 2.
  • On the 'Permissions' tab select 'Users' and click 'Edit'.
  • Select 'Full Control' then click 'OK'.
  • When you start VS2012 after this and open a designer it will prompt you that it needs to change permissions, do this and this time it will succeed!

Now support links if the steps don't work

Xaml designer issue

this is not only in windows 8 it happened with me in windows 7 when I was in silverlight but I managed to fix some how .. But now in metro apps I still don't get this error :) Please try and let me know

Upvotes: 0

rolles
rolles

Reputation: 1

Just run Visual Studio as Administrator. When it asks for permission to run the designer click ok and wait.

Upvotes: 0

Moshe Rubin
Moshe Rubin

Reputation: 1982

I encountered the identical problem recently while developing a Windows Phone 8.1 ARM application, and was stumped until I amalgamated several posts from the Web.

(1) I ran "devenv.exe /resetsettings". This removed the "System.Security.SecurityException" error, but left me with the message "Design view is unavailable for x64 and ARM target platforms".

(2) At this point it seems the Visual Studio Designer does not work when the Solution Platform (the drop-down combo box in the middle of the tool bar) is set to "ARM". The workaround is to temporarily set the Solution Platform to "WIN32", do what you need to, set the Solution Platform back to "ARM", and compile.

Although a slight pain, it now works for me.

Upvotes: 0

A.D.
A.D.

Reputation: 1452

I upgraded from Win 7 to Win 8.1 and faced with the same issue.

I solved it like this:

  1. open the installation folder of Visual Studio with the explorer
  2. go to Common7 => IDE
  3. look for "VSWinExpress"-File
  4. right-click "execute as admin"

that's it!

Upvotes: 0

Related Questions