Tag Info

Hot answers tagged

5

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


4

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

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 ...


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.


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 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"


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

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.


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

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

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>', ...


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

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 ...


1

That's more a case of LMGTFY - Here's a complete tutorial plus a .wsp to add this function. To get some basic understanding Since you can't download multiple files in one response, you need to package them in a .zip for example. What you have to do is getting the byte[] foreach file and package them together. Then add created .zip to the response to invoke ...


1

SharePoint registers a JavaScript "on submit" handler. In this handler the global variable _spFormOnSubmitCalled is set to true. SharePoint uses this variable to check if a submit was executed and prevents any further submits. Since your "download postback" does not refresh the page this variable remains true. With the effect that that all other buttons stop ...


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

Have you looked at Site Collection Auditing? http://office.microsoft.com/en-us/sharepoint-server-help/configure-audit-settings-for-a-site-collection-HA102031737.aspx You can use the audit feature of Microsoft SharePoint Server 2010 to track which users have taken what actions on the sites, content types, lists, libraries, list items, and library files ...


1

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 ...


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(); ...


1

AFAIK Save File Dialog, Open File Dialog are form controls and not web controls... So they will not work in Web environment! You can use normal File Download code to let the user download the file and select where to save, see below links: Download a file into client with ASP.NET 2.0 File Download in ASP.NET C# Once you have the byte[] of the file, write ...


1

Another approach is possible : $web = get-spweb http://server/yoursite $file = $web.GetFile("$($web.Url)/pages/home.aspx") [System.IO.File]::WriteAllBytes("$(gl)\$($file.Name)", $file.OpenBinary()) This will write in the current directory the content of the file "Pages/home.aspx"


1

Try to grant your site users the "Viewer" permission which will not allow downloading documents from your site. You can apply this permission at the document library level or just for the specified document by stop the inheriting permission button from corresponding permission settings page. here is a detailed explanation: ...


1

Check my step-by-step post: Working with document stored in SharePoint site using Document Connection You will learn about how to: Connect to a SharePoint site using Document Connection Upload document into a document library Check-Out/Check-In/Discard a document



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