[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Sandboxed solution problem

Posted on 2011-09-10
3
Medium Priority
?
511 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
SharePoint Designer 2010 has tools and commands to do everything that can be done with web parts in the browser, and then some – except uploading a web part straight into a page that is edited in SPD. So, can it be done? Scenario For a recent pr…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

656 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