Sandboxed Visual webpart in SharePoint 2010 not deploying

Posted on 2011-04-29
Last Modified: 2012-05-11

I am trying to create a sandboxed Visual w.p. in sharepoint 2010.I unable to deploy it.
I followed these steps...
 Created Empty sharepoint Project-->Add New item->Visual w.p.-->write some code->Build (build...ok,successful)->deploy->"Error"->Please help me...

Error 1 The deployment type "TemplateFile" of file "emptySandboxedSoln1UserControl.ascx" in Project Item "emptySandboxedSoln1" is not compatible with a Feature in a Sandboxed Solution. c:\users\administrator\documents\visual studio 2010\Projects\emptySandboxedSoln1\emptySandboxedSoln1\Features\Feature1\Feature1.feature emptySandboxedSoln1

my sharepoint 2010 sandboxed Scervice is already started .
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2nd Case--> with normal sandboxed w.p.:

if i used normal sandboxed w.p. instead of visual sandboxed w.p.->then it is building and getting deployed also.

But on page it showing this error:

Web Part Error: Unhandled exception was thrown by the sandboxed code wrapper's Execute method in the partial trust app domain: An unexpected error has occurred.

Need some help..Thanks in advance

Question by:smskareem
    LVL 14

    Accepted Solution

    from what I know the Visual webparts are user control based ascx file and that can not be sandboxed, because they are file system level and required more access.

    Read more here

    Hope that helps.

    Best of luck.

    Author Closing Comment


    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    We had a requirement to extract data from a SharePoint 2010 Customer List into a CSV file and then place the CSV file into a directory on the network so that the file could be consumed by an AS400 system. I will share in Part 1 how to Extract the Da…
    These days socially coordinated efforts have turned into a critical requirement for enterprises.
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now