public-folders interview questions
Top public-folders frequently asked interview questions
Is there a way to retrieve a list of the contents of a public Dropbox folder (preferably in PHP)? This is what a URL to a public file in Dropbox looks like:
http://dl.dropbox.com/u/1234567/publikPholder/textytext.txt
One would think that jumping up one level to the directory in the URL...
http://dl.dropbox.com/u/1234567/publikPholder/
...would show all the public files. Nope. Nothing but a 404.
Source: (StackOverflow)
I have to create a project management application in VB.Net Framework 4 which should create a client folder in a public folder in Exchange server.
I think the only way to create a public folder is through the management console. Is there a way to connect to the Exchange server and execute the creation command file from the code but I do not know how.
Is there another way?
Source: (StackOverflow)
Hi here I was openshift novice users, where before I used the cpanel for my hosting, and I want to switch to openshift, that I ask is how do I change the document root?, if previously on cpanel is Home/public_html/thelifestylelist.com to Home/public_html/thelifestylelist.com/public on openshift? (my index php is on public directory)
Hopefully the picture below can clarify my question.
Thank you.
Sorry i used external link for my image, need at least 15 reputation to attach image. .
Source: (StackOverflow)
In managed Exchange Web Services there is a class PostItem, which can be instantiate with ExchangeService object.
But after assigning all properties including with InReplyId and From, and calling Save(folderId) method:
PostItem newPost = new PostItem(mService);
newPost.InReplyTo = originalPost.Id.UniqueId;
newPost.From = new EmailAddress( "Max Gontar", "mgontar@server.com" );
newPost.Subject = msg.Subj;
newPost.Body = msg.TextBody;
newPost.Save(mCurrentFolderId);
It still creates a separate Post, not a Reply Post:
Other way I have tried:
PostReply reply = originalPost.CreatePostReply();
reply.Subject = msg.Subj;
reply.Body = msg.TextBody;
reply.Save( currentFolder.Id )
There is no way to set From property, so it should create Post Reply with current credentials Contact email address. But it gives null there!

Can you help me?
Thank you!
Source: (StackOverflow)
I can retrieve public folders stored in specific Public folder mailbox using this powershell command:
Get-PublicFolder –GetChildren | Where { $ _.ContentMailboxName –eq “PFMailbox1” }
(But I don't want to use remote PowerShell)
I'm not able to do this using EWS.
My first idea was to get all public folders and then sort them according Public folder mailboxes.
But there is probably no Extended MAPI property which contains public folder mailbox name (similar to ContentMailboxName powershell property).
So I tried this:
EWS with delegate access
var mailbox = new Mailbox("PFMailbox1@MyDomain.local");
// PFMailbox1 is Public Folder mailbox with Pubclic folders
FolderId folderId = new FolderId(WellKnownFolderName.MsgFolderRoot, mailbox);
Folder rootfolder = Folder.Bind(service, folderId);
(WellKnownFolderName property was tested with .Root and PublicFolderRoot too)
but I always get error:
"The request failed. The remote server returned an error: (503) Server
Unavailable." or "An unhandled exception of type
'Microsoft.Exchange.WebServices.Data.ServiceResponseException'
occurred in Microsoft.Exchange.WebServices.dll"
When I tried impersonation
service.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, impUser);
// impUser=PFMailbox1@MyDomain.local
Folder rootfolder = Folder.Bind(service, WellKnownFolderName.MsgFolderRoot );
I get error:
"The account does not have permission to impersonate the requested
user."
All mailbox permission for user Administrator and PFMailbox1 are set to full access.
I'm using latest Exchange2013 dll's.
EDIT1:
Second issue is how to create root public folder and save it to desired public folder mailbox?
EWS method Folder.Save(FolderId) has only one parameter and if I use FolderId = PublicFolderRoot -> all folders will be saved into MasterHierarchy Public Folder Mailbox (mailbox which was first created).
The only solution I know is to create first level (root) folders using Remote Power Shell for every Public Folder Mailbox.
New-PublicFolder "Folder1" -Mailbox "PFMailbox1"
New-PublicFolder "Folder2" -Mailbox "PFMailbox2"
and then on second (third,..) folder level I can use Folder.Save(FolderID).
But how to do it using EWS ?
Source: (StackOverflow)
I am writing a script to allow students to upload their files to a shared folder on teacher's computer in a computer lab (same network). I have a working script that, when executed, will duplicate all files in the folder UPLOAD on the student machine to the folder SUBMISSIONS on the teacher's machine. However, if a file already exists on the teacher machine, the script hangs.
I need to be able to test for the presence of individual files on the teacher machine and either (a) pop a message that says "this file already exists, rename it and upload again" or (b) append something to the file name to differentiate it...a random number or "copy 1" etc.
Ideally I want it to run as a folder action. When a file is added to the "UPLOAD" folder it will automatically be sent to the teacher. But I don't want files to copy over files of the same name...or for the script to hang.
Any thoughts or alterative approaches would be welcome.
Here's my code:
set home_path to path to home folder as string
set work_folder to alias (home_path & "Desktop:" & "Upload")
try
mount volume "afp://[LOGIN INFO].local/Submissions"
set this_folder to result as alias
tell application "Finder"
tell application "Finder"
duplicate every file of work_folder to this_folder
end tell
eject this_folder
end tell
end try
Source: (StackOverflow)
So I currently have a very simple Sinatra server. I have a public
folder that has css, js, and images as folders within it. In my view when I try to do something like <img src="/images/blah.png">
, I get a 404 response. I thought the default of the public folder is public
. I feel like I'm not including something or doing something stupid. I am using bootstrap and the css & js files are served fine. It isn't clear to me why I'm getting this 404 with the images?
This is how I'm running my application
#!/usr/bin/env ruby
$: << File.dirname(__FILE__)
require 'load_test_ui.rb'
unless ARGV[0].nil?
class LoadTestUI < Sinatra::Base
set :port, ARGV[0]
end
end
LoadTestUI.run!
Source: (StackOverflow)
We have a public contacts folder called Global Contacts on our Exchange 2003 server.
We are currently building an SQL Server-based system that will replace this. There is a WinForms front end written in C# for this that is mostly written already.
Somehow we need to ship all the contacts from Global Contacts over to our new SQL Server tables. My current plan is to just export the folder to an Excel file and import that into SQLS (I have a load of code written in C# to talk to Excel already so I can deal with the mapping pretty easily).
The problem comes with files that are 'embedded' in the comments section of the contacts - obviously these will not be exported when I rip Global Contacts out to an Excel file. Often people have dragged and dropped e.g. excel price lists, emails etc into there. I need a way of bulk exporting them, yet somehow retaining info on which contact they came from.
Can anyone point me in the right direction as to how to get those 'embedded' files via C# (or any other [easier] way for that matter, it would be nice if I didn't have to spend time reinventing the wheel)?
Source: (StackOverflow)
i wonder if there is a way to get the file extension from a public folder attachment?
Backgroud:
We are using a software (AttachmentsProcessor) which extracts all attachments from the e-mails in the public folder structure and save it to the filesystem. The software puts a .lnk in the e-mail, which points to the location in the filesystem. So we can open the attachment by double-click.
Lately we moved our public folder structure from internal Exchange to Office365 / Exchange Online. During this process we tried to put all extracted attachments back into the e-mails. After we done some tests, we noticed the this didn't work for some of the e-mails. We have still the .lnk as an attachment.
So what am I looking for?
I would like to write a script in powershell which shows me a list of all e-mails and the corresponding folders (Identites), which have a .lnk file attached.
On my search I just found something that works for mailboxes but nothing for public folders.
-> Get-Mailbox | Export-Mailbox -AttachmentFilenames "*.PDF"
-> Get-Mailbox | New-MailboxExportRequest -ContentFilter {Attachment -like "*.PDF"}
Any help would be very nice. ;-)
Thanks for your attention
Peter
Source: (StackOverflow)
I'm trying to connect to a Public Folder in Outlook 2010 with C# (Visual Studio 2010).
I copied following code from a Microsoft Website:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Outlook = Microsoft.Office.Interop.Outlook;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
// TODO: Add code here to start the application.
Outlook._Application olApp = new Outlook.ApplicationClass();
Outlook._NameSpace olNS = olApp.GetNamespace("MAPI"); Outlook._Folders oFolders;
oFolders = olNS.Folders;
Outlook.MAPIFolder oPublicFolder = oFolders["Public Folders"];
oFolders = oPublicFolder.Folders;
Outlook.MAPIFolder oAllPFolder = oFolders["All Public Folders"];
oFolders = oAllPFolder.Folders;
Outlook.MAPIFolder oMyFolder = oFolders["My Public Folder"];
Console.Write(oMyFolder.Name);
}
}
}
My problem is that "ApplicationClass" is redlined and I don't know what I've forgotten or done wrong.
Here's a screenshot with the error message.
Source: (StackOverflow)
I'm trying to design my NodeJS application, but there is something I am confused about.
In my application, I plan to put all of the frontend material in the folder /public
and then put the line
app.use(express.static(__dirname + '/public'));
in my app.js
file.
So with this in place, the user will be able to go to thesite.com/gallery/stuff
and it will work because the gallery
folder is in /public
.
But what if I don't want the user to be able to visit this area? How can I intercept his request and make sure he is logged in, for example? Is there a way to make some parts of the public folder not so public?
Source: (StackOverflow)
[prolog]
I have a Exchange 2013 server running. Within a public folder (called: "events") there are a few subfolders. These folders are called "winter 2015", "summer 2015" and so on. After an event, the participants can send a eMail to take part in a contest.
[question]
I need to export all sender-addresses to an CSV-file, to send a invertation for the next event. I want to use the exchange management shell (or Powershell shell) to do this. I stuck with finding the right command.
...so far - when I use:
Get-PublicFolderItemStatistics “\events\winter 2015” | fl
I get this for every eMail:
RunspaceId : 4171018f-57d4-4ba6-90ca-7002097d3e98
Subject : bike contest winter 2015
PublicFolderName : \events\winter 2015
LastModificationTime : 31.07.2015 07:14:52
CreationTime : 31.07.2015 07:14:52
HasAttachments : False
ItemType : IPM.Note
MessageSize : 11.51 KB (11,790 bytes)
Identity : corp.domain.com/DE/PF-A100\RgAAAAC33A2/VFsDS7P7bMLtt06fBwDaAlX8hPjaQq/VvypRTeGhAAAAu8plAADaAlX8hPjaQq/VvypRTeGhAAAq8bWeAAAJ
MailboxOwnerId : corp.domain.com/DE/PF-A100
IsValid : True
ObjectState : New
Do I have to use the Identity to access the details of each eMail? Or is there a better way? What is the right command? Would it be possible to create a PS-Script with paramters to automitic run it two times a year?
Source: (StackOverflow)
We have a system where we file emails to public folders in Outllok 2013. I've created an add-in that checks if the email has already been filed, as when there are more than one recipient person A may have filed the email but person B is unaware of this and may try and file the email again.
Initially I looped through the emails in the folder comparing MailItem.ConversationId but this has proven to be to slow as there are over 1000 emails in the public folder. I've Googled and found a reported solution (Open Specific MailItem in Outlook from C#) but this isn't working in my case:
MailItem email; //taken from the currently selected email in the users inbox
MAPIFolder jobFolder = _EmailHelper.Application.ActiveExplorer().Session.Folders["Public Folders - " + usersEmailAddress]
.Folders["All Public Folders"].Folders["All Job Emails"].Folders[jobRangeFolder].Folders[jobNo.ToString()];
NameSpace mapiNameSpace = _EmailHelper.Application.GetNamespace("MAPI");
MailItem item = (MailItem)mapiNameSpace.GetItemFromID(email.EntryID, jobFolder.StoreID);
The idea is if the item var is null the email has not already been filed. I'm open to any other suggestions on how to achieve this but performance is key here.
Source: (StackOverflow)
With the following Code-Block you select the public folder which is set in Outlook:
const
olPublicContactsFolder = $00000012; //constant for the public folder
begin
Outlook := CreateOleObject('Outlook.Application');
// Get name space
NameSpace := Outlook.GetNameSpace('MAPI');
// Get root public folder
ContactsRoot := NameSpace.GetDefaultFolder(olPublicContactsFolder); //<-- Error
Contacts:= Contactsroot;
An error occurs on the marked line if there is no public folder in Outlook (no public folder set in Outlook, no Exchange Server).
The question is how to avoid that error by previously detecting if there is a public folder set or not.
Catching the error with a try...finally/except block didn't work as the exception is caused externally by the Microsoft API (EOleException).
I can't think of another way to detect if the folder exists as the line causing the error is essential in selecting the public folder and therefore getting properties of it.
greetings
Source: (StackOverflow)