Solved

Sandboxed solution problem

Posted on 2011-09-10
3
506 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Work Over Net is a new and very powerful collaboration product. With its new easy interface it is becoming very competitive to other similar products like webex and office interactive. WON 2010 have the standard business tools needed for multi-offic…
Summary In SharePoint 2010 it is easy to create custom color themes to jazz up a site. Theme colors can also be created in PowerPoint 2010 with a few clicks. But how do the chosen colors actually look in the SharePoint site? The attached PowerPoint…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

856 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