Solved

Sandboxed solution problem

Posted on 2011-09-10
3
505 Views
Last Modified: 2012-05-12
Hi,

I am building a sandboxed solution in SharePoint and it needs to stream binary data like (docx, pdf etc) to the end user.but it looks like the sandboxed solution has its limitations in the sense that it cannot stream binary data to the end user. How can this be achieved? IS there a way to stream binary data using Sandboxed solution?

Any help is appreciated.

Thanks
0
Comment
Question by:Techsavy
  • 2
3 Comments
 
LVL 18

Expert Comment

by:ivan_vagunin
ID: 36518326
Hi!
I guess there are no restrictions on streaming in sandbox solutions, they do have limitations on file system read and write, but if you work with file in memory, I guess it should not be a problem. So it looks like some other operation causes security access violation. Can you post the code that causes the problems?

Sandbox restrictions:
http://msdn.microsoft.com/en-us/library/gg615454.aspx
0
 

Author Comment

by:Techsavy
ID: 36519746
Hi,

Thank you for the response. Unfortunately, I can't post the code. However, from the above documentation, I realized  that we cannot deploy  nonsharepoint assemblies in  a sandboxed solution and my code uses a couple of non share point libraries, which help in creating the binary data.   Therefore I am not able to stream or create this data. The two non share point libraries Iam using are ibex.dll for PDF document generation and DocumentFormat.Openxml For creating office documents. Is there any way we can store this data temporarily to stream to the user?

Any help is appreciated?

Thanks,
0
 
LVL 18

Accepted Solution

by:
ivan_vagunin earned 500 total points
ID: 36521016
Indeed, sandbox solutions can call external librarires, but these libraries should have AllowPartiallyTrustedCallersAttribute attribute (http://msdn.microsoft.com/EN-US/library/d18a6dca(v=VS.90)). If assembly does not have this attribute, then you cannot call it. So I guess the only solution is to rebuilt your libraries with AllowPartiallyTrustedCallers attribute.
Besides all external libraries should be places in GAC.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When installing SharePoint 2010 RTM I came across a strange error, I was getting timeouts during the installation. I searched the web and found the best solution to be found here (http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010genera…
The vision: A MegaMenu for a SharePoint portal home page The mission: Make it easy to maintain. Allow rich content and sub headers as well as standard links. Factor in frequent changes without involving developers or a lengthy Dev/Test/Prod rel…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

776 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