Tag Info

Hot answers tagged

10

The link can be reproduced using the following link, where "Documents" is the name of the library: http://spsite/_layouts/download.aspx?SourceUrl=http://spsite/Documents/sample.docx Effectively the download.aspx will read the content of the file you send as the SourceUrl, and render it back to you on the HTTP response. Hope that helps


5

You can't push the file to the client from the server. The server side has no knowledge of the client side. You have to write a client application, that will pull the file. First, you'll have to know the url of the file. Then, a simple var wc = new WebClient(); wc.UseDefaultCredentials = true; wc.DownloadFile(targetFile, @"c:\temp\myfile.txt"); would ...


4

Try adding: _WebClient.Credentials = CredentialCache.DefaultCredentials;


4

You only see the last error because Set-Content overwrites the existing content, use Add-Content instead. If you want to have a more encompassing approach, like Robert suggested, there's a more PowerShell'y (?) way of doing this with Start/Stop-Transcript which takes all console output between the Start & Stop cmdlet calls and outputs it to a file.


4

There were some SharePoint 2010 evaluation VM's available from Microsoft at one point but I don't think you can get them anymore. Even if you could, they can only be used for a limited time - generally between 30 and 90 days. You can create your own VM for SharePoint 2010 quite easily. If you use SharePoint Foundation instead of SharePoint Server you can ...


3

As previously stated, you should have at least 6GB of RAM to run an SP2010 VM, but you'd be better off with 8 or more. The pre-built VM's for 2010 by Microsoft are getting harder to find, IMHO. I always use this guide as my go-to because it gets you up and running with a good, stable, all-in environment with links to all of the evaluation software. ...


3

$RootFolder.SubFolders will give you the collection of folders. Loop through the collection and use StartsWith with each folder: $folders = $RootFolder.SubFolders; foreach ($folder in $folders) { if ($folder.Name.StartsWith("a")) { // Call $folder.Subfolders again to get folders present in this folder // Then use foreach to loop ...


3

i have no idea what you mean by: From where I can download SP 2010 VM in my system where to install in your vm or where to download a vm to install on your local machine? it will run on your setup but will not be smooth, i think you should be looking at atleast 6gb ram.... your going to be running sql server on the same vm if its a tests vm amoungst ...


3

Best case scenario is to get your Mac users comfortable with the Office Document Connection application. It allows for checking in and out of the files and working off the server documents.


3

If your client code is running on server which means that request is being sent from server and your file will eventually downloaded on server. I would recommend you to write a code which runs on your computer and download the file from Server. You can Lists.asmx or OOTB Web Service to download the file from the Server.


3

As I understood you need source of the file from content DB to check it into Source Control. Please, try the following code: Add-PSSnapin Microsoft.Sharepoint.Powershell $web = Get-SPWeb <path to web> $file = $web.GetFile('<relative path to file>'); $bytes = $file.OpenBinary(); [System.IO.File]::WriteAllBytes('<path to file on your disk>', ...


3

I believe this is what you are looking for. You can export a specific file or object from the Export-SPWeb context, not the whole kitten kaboodle. Export-SPWeb -identity "http://sharepoint" -ItemUrl "/default.aspx" -Path "c:\default.aspx" Import-SPWeb -identity "http://sharepoint" -Path "C:\default.aspx"


2

While Auditing is not available from the UI in Foundation, you can access the Audit functionality and turn it on via the object model: http://social.msdn.microsoft.com/Forums/en/sharepoint2010general/thread/53e79142-88c9-48f1-b5a5-a6259c9f6f97 If you notice in this post, Auditing is advertised as a feature of Foundation, but it takes a little extra work to ...


2

you should use WebRequest $web = Get-SPWeb $webUrl $path = "C:\file.aspx" $request = [System.Net.WebRequest]::Create($url) $request.UseDefaultCredentials = $true #do web request - if exception -> item does not exist try { $response = [System.Net.WebResponse]$request.GetResponse(); if ($response.StatusCode -ne "OK") { write-host "Error: ...


2

Using Google I have found a page where Sharepoint 2013 seems to be available for download: http://technet.microsoft.com/en-us/evalcenter/hh973397.aspx


2

Palani, Get-SPWebApplication "http://server-name:8080"|Get-SPSite -limit ALL|Get-SPWeb -limit ALL|Select-Object Title,Url,AssociatedOwnerGroup This will give you Title, Url and the Associated Owner Group for the site... You can than reference the powershell script: PowerShell Script for SP2010 to pull Farm and Site Collections Administrators Try merging ...


2

In general you should't be storing documents of big size in SharePoint. A better approach would be to store it on a file share or FTP and simply link to the file from SharePoint. You technically cannot store a file larger than 2 GB (2047 MB) to SharePoint. This is the maximum size. If you want to allow files up to 2 GB you'll need to increase the connection ...


2

You can get the document link using following line: var url = _spPageContextInfo.webAbsoluteUrl + oListItem.get_item('FileRef');


2

Here is a generic idea Using stsadm -o enumsolutions get all installed solutions on the farm Then for each solution you need to download it using following technique [Enable Powershell] (http://support.microsoft.com/kb/968930) [System.Reflection.Assembly]::Load("Microsoft.SharePoint, Version=12.0.0.0, Cult ure=neutral, PublicKeyToken=71e9bce111e9429c") ...


2

If you get an error adding SharePoint DLL which states Could not load file or assembly 'microsoft.sharepoint, Version=12.0.0.0 you can try using this script instead [Void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") and you can continue exporting the WSP from your 2007 environment $farm = ...


2

You can deploy apps locally if you have the app package. You upload them into the site catalog and they will be made available to your site collections. You won't be able to utilize apps deployed to the MS store. You would need to contact the vendor directly to see about obtaining an .app package or code your own and deploy them.


2

If I understand you correctly there are 5 metedata,columns that automatically created when the word document is created. In your word template on the insert tab, go to the "Quick Parts" and select document properties. If those fields are attached to your content type you should see them there. Add them to your Word Document template wherever you want then to ...


2

Below code will create and update a document: public void UpdateAndCreateFile(SPWeb web) { try { SPSecurity.RunWithElevatedPrivileges(delegate() { string TemplateUrl = string.Empty; try { TemplateUrl = "Your ...


1

Sorry. I corrected My Try catch Block and its seems To be Working Fine if((Get-PSSnapin "Microsoft.SharePoint.PowerShell") -eq $null) { Add-PSSnapin Microsoft.SharePoint.PowerShell } $destination = "C:\\Test\\" $web = Get-SPWeb -Identity "http://xyz:4444/" $list = $web.GetList("http://xyx:4444/Shared Documents/") function ProcessFolder { ...


1

You could use Write-Output "Logging text" in your catches and then when you run the script you can run it as MyFancyScriptName.ps1 > C:\file.log


1

You could use the REST service, but since you are downloading this amount of data you could as well use the CSOM. Try this: Install the Microsoft.SharePoint.Client package from NuGet: Install-Package Microsoft.SharePoint.Client (This package is for 2010, but it will work for 2013 as well). Then use this code: const string host = "http://2013-sp"; const ...


1

SharePoint Apps don't have access to the file system directly. You could download a file and save it to a SharePoint library, but you wouldn't be able to save it directly to the local file system. See http://msdn.microsoft.com/en-us/library/dn268593.aspx for some considerations between a SharePoint App and a SharePoint Farm Solution.


1

If you are looking to track content within SharePoint itself, then SharePoint's own Audit logs should solve that request. They can track whenever any content in SharePoint is viewed, when and by whom. The reports are also available directly from the web UI though they are not as user-friendly as they could be. For tracking all clicks. you might want to ...


1

This is normal behavior as SharePoint does not support a "bulk" style download of multiple files. If you need to do that it would be better to just open Explorer View and copy the files that way.


1

somthing like this: byte[] bytes = memoryStream.GetBuffer(); Response.Buffer = true; Response.Clear(); Response.ContentType = "application/pdf"; Response.AddHeader("content-disposition", "attachment; filename=report.pdf"); Response.BinaryWrite(bytes); Response.Flush(); ...



Only top voted, non community-wiki answers of a minimum length are eligible