Does a custom visual webpart have to operate within a sandbox solution in Sharepoint office 365 - sharepoint-2010

Does a custom (i.e. one I've developed for SharePoint 2010) visual webpart have to operate within a sandbox solution in SharePoint office 365, or can it be a farm solution?
Thanks, Confused

Web parts have to be sandboxed for SharePoint 365. Visual web parts can't be sandboxed since the ascx control that comes with the web part is copied to the file system. if you need to create a visual web part in SharePoint 365 you can use the SharePoint Power Tools extension.
http://visualstudiogallery.msdn.microsoft.com/8e602a8c-6714-4549-9e95-f3700344b0d9
There you have the option to create a visual web part that can be deployed as a sandboxed solution.

Independent from the type of SP-I (SharePoint Item) you're creating, Office 365 only supports sandboxed solutions.
Microsoft is going to migrate Office 365 to SharePoint 2013 within the next weeks/months. When migration is done, you can also create Apps using the new SharePoint 2013 App model.
But for now, it's only possible to deploy Sandboxed solutions, because it's not allowed to do any changes to the filesystem or elements, that are available across the boundaries of your SiteCollection.
When it comes to WebPart development, you've to remember that it's not possible to impersonate using SPSecurity. (There are more limitations for Sandboxed Solutions, you should revisit the MSDN in order to get a common understanding of what you can do within the Sandbox)

Related

Javascript in Office

I am trying to understand how to develop add-ins/macros in JS for Office, do I need VSTO for it or does it run from Office somewhere?
I did understood that Microsoft is making the first steps toward replacing VBa with JS and impemented an API to develop macros in Office.Js simmilar to the one Google has for it's Docs. But where can I find a development enviroment for Office.js?
The new web-based add-ins are basically a web application executed in the context of the Office application, either on the Desktop (by embedding a browser, IE11 at the moment) or in the browser (Office Online) where everything is web-based already.
The add-in can be hosted on any web resource you like. You just need to specify a source location URI.
Settings and metadata of the add-in are defined in a manifest file. The article Office Add-ins platform overview describes it very well.
Development can be done in any editor or IDE suitable for coding web apps. There is no Alt+F11 VBA IDE anymore, but you may try the Script Lab add-in, a Microsoft Garage project that allows you to try out some code directly in Office and share code snippets. It includes a great collection of sample code too.
The new WebApplications are hosted on a Webserver. You can develop Office Apps with Visual Studio.
Here is a good course for developing Office Apps including an overview of the Javascript Office API:
https://mva.microsoft.com/en-us/training-courses/introduction-to-office-365-development-8329

Can't find Microsoft Internet Transfer Control in Visual Studio 2013

New project in Visual Basic using Visual Studio 2013.
Want to add the "Microsoft Internet Controls" component but I can't find it.
What am I missing?
This is the second link on Google:
http://answers.microsoft.com/en-us/office/forum/office_2010-customize/cant-find-reference-to-microsoft-internet-controls/e138ff0c-8046-47b1-9c0c-ac28cebe3c7a
Apparently it may have been renamed "Microsoft Browser Helpers" and you may need to add a reference to "ieframe.dll".
If you need FTP, it is fully supported in the .NET framework. You could start with the examples on MSDN: https://msdn.microsoft.com/en-us/library/ms229718%28v=vs.110%29.aspx
The inet1 Internet Transfer Control is installed with MS Office. Install it and you should have no problem having it become available to use in Visual Studio etc.
It's old but still completely useful in apps. It did all the FTP and HTTP calls for a web crawler I wrote years ago and was fast and completely error-free when crawling 100s of 1000s of web pages at a time while I slept. I'd use inet1 today if I was writing an app that did huge amounts of internet calls as quickly as possible.

Creating custom controls for TFS 2012 through a SharePoint 2010 portal

I'm trying to get a SharePoint 2010 web portal working for a TFS 2012 team project. Most of the functionality is working, but I'm having a difficult time getting the custom work item controls we've built working in the SharePoint Project Portal site. (They're working fine within Visual Studio, we haven't tried getting them working in the default TFS Web Access portal.)
My questions are:
Since the TFS Web Access method for creating custom properties have been updated, is that method appropriate for the SharePoint site? (I doubt it, since jQuery is necessary and isn't included by default in SP 2010, but I thought I'd ask.)
Whenever I try to test this, all I get is "Error: Unable to create 'FieldName'" with nothing in the ULS logs. Is there any way I can debug this?
Are there any examples available online that I may have missed in my searches?
After a lot of digging and frustration, I have finally gotten a simple control working. Indeed, SharePoint 2010 expects the custom controls to be formatted similarly to Web Access 2010, not Web Access 2012. Here is an example that helped:
http://code.msdn.microsoft.com/windowsdesktop/CSTFSWebAccessWorkItemMulti-ace1b01e
Also, if you install the 2008 Team System Web Access (yes, 2008), you'll get a Word document with some helpful documentation.
Here are some caveats:
The Word documentation states that the control needs to inherit from both IWorkItemControl and IWorkItemWebControl. Since IWorkItemWebControl contains all of the fields that IWorkItemControl does, and IWorkItemControl is declared in a DLL that references .NET 4.5 (not good for SharePoint 2010), I referenced only IWorkItemWebControl and it seems to work.
The documentation states that your control needs to inherit from System.Web.UI.Control to work, but the UserControl doesn't work. I had to inherit from one of the WebControls to get it to work.
The custom controls need references to TFS 2012 versions of several DLLs (which are listed in the sample download), but the only place I found them were in the GAC on the SharePoint server. So I copied them from the GAC onto my local machine for development.
Deploying is easy - all you need to do is place the .wicc file and the DLL into "Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\Tswa\CustomControls".
If I find anything else, I'll post it here.

Development in Visual Studio 2010 for remote Sharepoint 2010 server

I understand that you can't develop in Visual Studio 2010 for a remote Sharepoint 2010 server because you need a local copy running on your box. (I know there is a hack)
In my situation I have Sharepoint Foundation installed locally for development purposes but I'm not sure how to get the custom lists, etc from the remote server to my local box so I can develop against the same objects.
I've tried exporting the site on the remote box and then creating a new Visual Studio 2010 project from it. This resulted in exceptions when deploying to my local box - more problems which I'm sure given time I could work out...but more problems. (It was types not being installed properly on my local box that the custom object was using)
So I've been thinking there must be an easier way to pull down data structures.
I've spent a while looking for this and while there is quite a lot of information out there I'm finding it hard to find basic information like this.
Any help is greatly appreciated.
What objects do you need from the remote server?
If it is lists, you can export the lists from the remote server as templates then use the resulting stp files to create the lists locally. If it is dlls you can get them form GAC and add the required entries in SharePoint site web.config.
You can also try to export the entire site and create a site locally based on the site template.

sandboxed web parts inside SharePoint 2010

Is it possible to develop a web-part in ASP.NET (framework > 2.0), to have a sandbox architecture, and deploy those web parts inside Share Point 2010 and/or MOSS 2007
we donot want to use any SharePoint dll reference with web parts we develop.
we refer to the url, section at http://msdn.microsoft.com/en-us/library/ee539417.aspx (section Web Parts in Sandboxed Solutions)
i referred the following How Tos, hope it helps some one ..
http://blah.winsmarts.com/2009-12-SharePoint_2010_Sandboxed_Solutions__The_basics.aspx
_http://www.sharepointdevwiki.com/display/sp2010/SharePoint+Sandboxed+Solutions
_http://www.endusersharepoint.com/EUSP2010/2010/04/05/introduction-to-sharepoint-2010-sandbox-solutions-for-site-collection-owners
I've just hit this problem - looks like it's not meant to be possible which is really annoying.
See: http://msdn.microsoft.com/en-us/library/gg615454.aspx
Specifically:
Application pages, mobile pages, and user controls (.ascx files) cannot be deployed in a sandboxed solution.
However, there is a workaround (hackaround!) here:
http://stefan-stanev-sharepoint-blog.blogspot.com/2010/02/visual-sandbox-web-parts-possible-after.html
I'd love to have a better way!