Solved

Sandboxed solution problem

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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Last week I faced a strange issue recently, i have deployed SharePoint 2003 servers for one project and one of the requirements was to open SharePoint site from same server. when i was trying to open site from the same server i was getting authentic…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

707 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