Solved

Sandboxed solution problem

Posted on 2011-09-10
3
508 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

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…
When using a search centre, I'm going to show you how to configure Sharepoint's search to only return results from the current site collection. Very useful when using Office 365 with multiple site collections.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

729 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