Volume Manager API

Do they provide these for developers?

Try a download for Solaris Volume Manager guide in the pdf format from docs.sun.com .
Sridhar

Similar Messages

  • Solaris Volume Manager API

    Do they provide an API for commands like growfs, metaxxxx?

    Try a download for Solaris Volume Manager guide in the pdf format from docs.sun.com .
    Sridhar

  • C Program APIs or "ioctls" to access volume information created using Solaris Volume Manager

    Hi,
    Does "SUNWlvm" provide any C language program APIs or "ioctls" to know
    about volumes created using "Sun Volume Manager" like volume
    components, size, type and rest. I did not find any API manual page.
    Thanks,
    Jai

    Hi,
    Does "SUNWlvm" provide any C language program APIs or "ioctls" to know
    about volumes created using "Sun Volume Manager" like volume
    components, size, type and rest. I did not find any API manual page.
    Thanks,
    Jai

  • Use oes management api get "No privilege" error

    Hi all,
    i try to use oes management api to manage my application's entitlements.
    but while i coding get a “No privilege” error , any suggest ?
    regards
    java code:
    RBAC_Manager mgr = null;
    RBAC_Context rbacCtx = null;
    mgr = new RBAC_Manager(new URL("https://10.1.18.4:7011/servlet/AxisServlet/blm"),"admin","password");
    rbacCtx = mgr.createContext();
    System.out.println("user -> " + rbacCtx.getLoginUser());
    ScopeManager scopeMgr = rbacCtx.getScopeManager();
    Organization o = scopeMgr.getRoot();
    rbacCtx.setScope(o);
    Scope s = rbacCtx.getScope();
    s = scopeMgr.getScope("ejianlong");
    rbacCtx.setScope(s);
    scopeMgr = rbacCtx.getScopeManager();
    scopeMgr.createApplication("jlerp_a");output:
    user -> //user/RootOrg!AdminDir/admin/
    com.bea.ales.management.exception.ManagementException: No privilege to create Application jlerp_a under RootOrg!ejianlong
         at com.bea.ales.management.ScopeManager.createApplication(ScopeManager.java:156)
         at com.jl.test.model.Class1.main(Class1.java:36)Edited by: Lighting Cui on 2011-9-12 下午5:34

    Have worked it out...
    In case anyone else has the same thing happening, the issue was with the external hard drive. I had read-only privileges while it was connected to my new MacBook. It's a Seagate GoFlex. Had to download the NTFS for Mac driver from their website
    http://www.seagate.com/au/en/support/external-hard-drives/desktop-hard-drives/ba ckup-plus-desk/ntfs-driver-for-mac-os-master-dl/
    and installed it on the laptop. Then I selected the GoFlex volume, Command I and changed the access to read and write. Problem solved.

  • Volume Manager in Solaris 10

    Hi All -
    I loaded Solaris 10 OS on two separate disks to be managed by RAID. The idea was that if one disk OS crashes, then RAID will switch me to the other disk and I should be able to boot from that without major loss in operational time of the node. For such a scenario, do I need to have Veritas Volume Manager or does Solaris 10 come with an default volume manager which will do this for me.
    Your help is greatly appreciated.
    Regards

    RTFM :-)
    http://docs.sun.com/app/docs/doc/816-4520
    alan

  • Deleted Item not actually getting deleted or **delay** deleted thus getting refetched (EWS Managed API)

    I am polling Exchange Server to fetch all the mails left in the Inbox and then fetching them, processing them and finally moving them to the deleted folder. My procedure takes following form of EWS Managed API calls:
    1 itemResults = service.FindItems(WellKnownFolderName.Inbox, itemView);
    2 //some code...
    3 service.LoadPropertiesForItems(itemResults.Items, itItemPropSet);
    4 //some code...
    5 foreach(Item item in itemResults)
    6 {
    7 //process item
    8 item.Delete(DeleteMode.MoveToDeletedItems);
    9 }
    To test this code I flooded the inbox with 5000 mails, 5 threads flooding 1000 mails each at the interval of 4ms.
    After test run, I realized some mails are getting processed multiple times.
    When I read the soap traces logged using TraceListener, I realized that when there are more than 100 mails in the inbox, there are more SOAP packets were dispatched in burst of 100s.
    Logically below set of SOAP Packets (let us call it "Set 1") should occur only once:
    <m:FindItem>...</m:FindItem> //generated by line 1
    <m:FindItemResponse>...</m:FindItemResponse> //generated by line 1
    <m:GetItem>...</m:GetItem> //generated by line 3
    <m:GetItemResponse>...</m:GetItemResponse> //generated by line 3
    followed x number of Delete SOAP packets for x number of mails in the Inbox
    <m:DeleteItem>...</m:DeleteItem> //generated by line 8
    <m:DeleteItemRepsonse>...</m:DeleteItemRepsonse> //generated by line 8
    However if there are say 325 mails in the inbox, then there first occurs 4 occurences of Set 1 followed by Delete SOAP packest as follows:
    //1st occurence
    <m:FindItem>100 items</m:FindItem>
    <m:FindItemResponse>100 items</m:FindItemResponse>
    <m:GetItem>100 items</m:GetItem>
    <m:GetItemResponse>35 items</m:GetItemResponse>
    //2nd occurence
    <m:FindItem>100 items</m:FindItem>
    <m:FindItemResponse>100 items</m:FindItemResponse>
    <m:GetItem>100 items</m:GetItem>
    <m:GetItemResponse>35 items</m:GetItemResponse>
    //3rd occurence
    <m:FindItem>100 items</m:FindItem>
    <m:FindItemResponse>100 items</m:FindItemResponse>
    <m:GetItem>100 items</m:GetItem>
    <m:GetItemResponse>100 items</m:GetItemResponse>
    //4th occurence
    <m:FindItem>35 items</m:FindItem>
    <m:FindItemResponse>35 items</m:FindItemResponse>
    <m:GetItem>35 items</m:GetItem>
    <m:GetItemResponse>35 items</m:GetItemResponse> //****followed by 335 occurences of the Delete SOAP packets****<m:DeleteItem>...</m:DeleteItem>  
    <m:DeleteItemRepsonse>...</m:DeleteItemRepsonse> 
    //334 more of above
    So there are 100 + 100 + 100 + 35 = 335 items actually getting handled, which is 10 more than what are actually present in the inbox. 
    Also notice that Delete SOAP packets are queued till end. They are not dispatched in burst.
    First thing I realize dispatching SOAP packets in burst of 100s is EWS Managed API behavior. I guess there must be traffic reason behind it and there must be some configuration setting to tweak it.
    Q1. How can we change this count of 100?
    I inferred that there are some overlaps in fetching of mails.
    So I copy pasted SOAP Traces for first two of
    <m:GetItem>100 items</m:GetItem>
    in two different files, and compared them in text comparer. I realised that some mails that are at the end of the first 100s were reappearing at the beginning of 2nd 100: 
    This is the pattern in many test runs.
    Due to this these overlapping mails, these mails are getting processed twice. Also the attempt to second time delete them was throwing exception : The specified object was not found in the store.
    So I guess there is time delay in delete mail API call and mails actually getting deleted, between which they are getting refetched.
    Q2. How can I handle this to avoid redundant processing of mails and unnecessary exceptions.

    I am polling Exchange Server to fetch all the mails left in the Inbox and then fetching them, processing them and finally moving them to the deleted folder. My procedure takes following form of EWS Managed API calls:
    1 itemResults = service.FindItems(WellKnownFolderName.Inbox, itemView);
    2 //some code...
    3 service.LoadPropertiesForItems(itemResults.Items, itItemPropSet);
    4 //some code...
    5 foreach(Item item in itemResults)
    6 {
    7 //process item
    8 item.Delete(DeleteMode.MoveToDeletedItems);
    9 }
    To test this code I flooded the inbox with 5000 mails, 5 threads flooding 1000 mails each at the interval of 4ms.
    After test run, I realized some mails are getting processed multiple times.
    When I read the soap traces logged using TraceListener, I realized that when there are more than 100 mails in the inbox, there are more SOAP packets were dispatched in burst of 100s.
    Logically below set of SOAP Packets (let us call it "Set 1") should occur only once:
    <m:FindItem>...</m:FindItem> //generated by line 1
    <m:FindItemResponse>...</m:FindItemResponse> //generated by line 1
    <m:GetItem>...</m:GetItem> //generated by line 3
    <m:GetItemResponse>...</m:GetItemResponse> //generated by line 3
    followed x number of Delete SOAP packets for x number of mails in the Inbox
    <m:DeleteItem>...</m:DeleteItem> //generated by line 8
    <m:DeleteItemRepsonse>...</m:DeleteItemRepsonse> //generated by line 8
    However if there are say 325 mails in the inbox, then there first occurs 4 occurences of Set 1 followed by Delete SOAP packest as follows:
    //1st occurence
    <m:FindItem>100 items</m:FindItem>
    <m:FindItemResponse>100 items</m:FindItemResponse>
    <m:GetItem>100 items</m:GetItem>
    <m:GetItemResponse>35 items</m:GetItemResponse>
    //2nd occurence
    <m:FindItem>100 items</m:FindItem>
    <m:FindItemResponse>100 items</m:FindItemResponse>
    <m:GetItem>100 items</m:GetItem>
    <m:GetItemResponse>35 items</m:GetItemResponse>
    //3rd occurence
    <m:FindItem>100 items</m:FindItem>
    <m:FindItemResponse>100 items</m:FindItemResponse>
    <m:GetItem>100 items</m:GetItem>
    <m:GetItemResponse>100 items</m:GetItemResponse>
    //4th occurence
    <m:FindItem>35 items</m:FindItem>
    <m:FindItemResponse>35 items</m:FindItemResponse>
    <m:GetItem>35 items</m:GetItem>
    <m:GetItemResponse>35 items</m:GetItemResponse> //****followed by 335 occurences of the Delete SOAP packets****<m:DeleteItem>...</m:DeleteItem>  
    <m:DeleteItemRepsonse>...</m:DeleteItemRepsonse> 
    //334 more of above
    So there are 100 + 100 + 100 + 35 = 335 items actually getting handled, which is 10 more than what are actually present in the inbox. 
    Also notice that Delete SOAP packets are queued till end. They are not dispatched in burst.
    First thing I realize dispatching SOAP packets in burst of 100s is EWS Managed API behavior. I guess there must be traffic reason behind it and there must be some configuration setting to tweak it.
    Q1. How can we change this count of 100?
    I inferred that there are some overlaps in fetching of mails.
    So I copy pasted SOAP Traces for first two of
    <m:GetItem>100 items</m:GetItem>
    in two different files, and compared them in text comparer. I realised that some mails that are at the end of the first 100s were reappearing at the beginning of 2nd 100: 
    This is the pattern in many test runs.
    Due to this these overlapping mails, these mails are getting processed twice. Also the attempt to second time delete them was throwing exception : The specified object was not found in the store.
    So I guess there is time delay in delete mail API call and mails actually getting deleted, between which they are getting refetched.
    Q2. How can I handle this to avoid redundant processing of mails and unnecessary exceptions.

  • Getting the message "The sharing message is not supported." while sharing the calendar using ews managed api.

      public void ShareCalendar(Calendar calendar)
                ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013);
                  service.Credentials = new NetworkCredential("user1", "password", "domain");
                service.Url = new Uri("https://sampleUrl/ews/exchange.asmx");
                try
                    // Bind to the folder
                    //Folder folderStoreInfo;
                    //folderStoreInfo = Folder.Bind(service, calendar.ExchangeId);
                    //string EwsID = folderStoreInfo.Id.UniqueId;
                    string EwsID = calendar.FolderExchangeId;
                    // The value of folderidHex will be what we need to use for the FolderId in the xml file
                    AutodiscoverService autoDiscover = new AutodiscoverService(ExchangeVersion.Exchange2013);
                    autoDiscover.Credentials =  new NetworkCredential("user1", "password", "domain");
                    autoDiscover.RedirectionUrlValidationCallback = RedirectionUrlValidationCallback;
                    Dictionary<string, string> userSettings = GetUserSettings(autoDiscover);
                    string folderidHex = GetConvertedEWSIDinHex(service, EwsID, "[email protected]");
                    string domainName = string.Empty;
                    string mailBoxServer = string.Empty;
                    string userName = string.Empty;
                    foreach (var item in userSettings)
                        switch (item.Key)
                            case "UserDN":
                                domainName = item.Value.ToString();
                                break;
                            case "InternalMailboxServer":
                                mailBoxServer = item.Value.ToString();
                                break;
                            case "UserDisplayName":
                                userName = item.Value.ToString();
                                break;
                    string entryId = GetIntiatorEntryID(domainName);
                    string mailboxId = GetInvitationMailboxId(mailBoxServer, domainName);
                    string sharedFilePath = CreateSharingMessageAttachment(folderidHex, userName, entryId, mailboxId, "[email protected]", "calendar", calendar.FolderName);
                    // Create a new message
                    EmailMessage invitationRequest = new EmailMessage(service);
                    invitationRequest.Subject = "I'd like to share my calendar with you";
                    invitationRequest.Body = "Sent by Exchange Administrator on behalf of user";                
                    //invitationRequest.Culture = "en-US";
                    invitationRequest.Sensitivity = Sensitivity.Normal;
                    // Set a sharing specific property on the message
                    invitationRequest.ItemClass = "IPM.Sharing"; /* Constant Required Value [MS-ProtocolSpec] */
                    byte[] byteEntryId = HexStringToByteArray(entryId);
                    // This is the Guid of the Sharing Provider in Exchange, and it's value does not change
                    Guid binSharingProviderGuid = new Guid("{AEF00600-0000-0000-C000-000000000046}");
                    // Even though I don't think setting this property is mandatory, 
                    // it just seemed like the right thing to do and it works so I \
                    // ain't messin with it!                                        
                    byte[] byteSharingProviderGuid = binSharingProviderGuid.ToByteArray();
                    string strPRBODYHTML = "<html dir=\"ltr\">\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\r\n<meta name=\"GENERATOR\"
    content=\"MSHTML 8.00.7601.17514\">\r\n<style id=\"owaParaStyle\">P {\r\n   MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px \r\n}\r\n</style>\r\n</head>\r\n<body fPStyle=\"1\" ocsi=\"0\">\r\n<tt>\r\n<pre>SharedByUserDisplayName
    (SharedByUserSmtpAddress) has invited you to view his or her Microsoft Exchange Calendar.\r\n\r\nFor instructions on how to view shared folders on Exchange, see the following article:\r\n\r\nhttp://go.microsoft.com/fwlink/?LinkId=57561\r\n\r\n*~*~*~*~*~*~*~*~*~*\r\n\r\n</pre>\r\n</tt>\r\n<div>\r\n<div
    style=\"direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;\">this is a test message</div>\r\n</div>\r\n</body>\r\n</html>\r\n";
                    string strBODY = @"
    SharedByUserDisplayName (SharedByUserSmtpAddress) has invited you to view his or
    her Microsoft Exchange Calendar.
    For instructions on how to view shared folders on Exchange, see the
    following article:
    http://go.microsoft.com/fwlink/?LinkId=57561
    *~*~*~*~*~*~*~*~*~*
    test body
                    // Convert these to hex and binary equivelants to assign to their relevant
                    // extended properties
                    string hexPRBODYHTML = ConvertStringToHex(strPRBODYHTML);
                    byte[] binPRBODYHTML = HexStringToByteArray(hexPRBODYHTML);
                    Guid PropertySetSharing = Guid.Parse("00062040-0000-0000-C000-000000000046");//constant 
                    Guid PropertySetInternetHeaders = Guid.Parse("00020386-0000-0000-C000-000000000046");//constant
                    ExtendedPropertyDefinition PidLidSharingProviderGuidProperty = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A01, MapiPropertyType.CLSID);
                    ExtendedPropertyDefinition ConversationIdProperty = new ExtendedPropertyDefinition(0x3013, MapiPropertyType.Binary);
                    // Sharing Properties (in order of reference according to protocol examples in: [MS-OXSHARE])
                    // Additional Property Constraints
                    // [MS-OXSHARE] 2.2.5.2
                    ExtendedPropertyDefinition PidTagMessageClass = new ExtendedPropertyDefinition(0x001A, MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.5.1
                    //ExtendedPropertyDefinition PidNameContentClass = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.InternetHeaders, "Content-Class", MapiPropertyType.String);
                    ExtendedPropertyDefinition PidNameContentClass = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "Content-class", MapiPropertyType.String);
                    // Common Message Object Properties               
                    // [MS-OXSHARE] 2.2.1
                    ExtendedPropertyDefinition PidTagNormalizedSubject = new ExtendedPropertyDefinition(0x0E1D, MapiPropertyType.String);
                    // The PidTagSubjectPrefix is a zero-length string, so I do not set it
                    // ExtendedPropertyDefinition PidTagSubjectPrefix = new ExtendedPropertyDefinition(0x003D, MapiPropertyType.String);
                    // Sharing Object Message Properties
                    // [MS-OXSHARE] 2.2.2.12
                    ExtendedPropertyDefinition PidLidSharingProviderGuid = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A01, MapiPropertyType.Binary);
                    // [MS-OXSHARE] 2.2.2.13
                    ExtendedPropertyDefinition PidNameXSharingProviderGuid = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Provider-GUID", MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.2.14
                    ExtendedPropertyDefinition PidLidSharingProviderName = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A02, MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.2.15           
                    ExtendedPropertyDefinition PidNameXSharingProviderName = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Provider-Name", MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.2.16
                    ExtendedPropertyDefinition PidLidSharingProviderUrl = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A03, MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.2.17
                    ExtendedPropertyDefinition PidNameXSharingProviderUrl = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Provider-URL", MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.2.5
                    ExtendedPropertyDefinition PidLidSharingFlavor = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A18, MapiPropertyType.Integer);
                    // [MS-OXSHARE] 2.2.2.6
                    ExtendedPropertyDefinition PidNameXSharingFlavor = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Flavor", MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.2.1
                    ExtendedPropertyDefinition PidLidSharingCapabilities = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A17, MapiPropertyType.Integer);
                    // [MS-OXSHARE] 2.2.2.2
                    ExtendedPropertyDefinition PidNameXSharingCapabilities = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Capabilities", MapiPropertyType.String);
                    // Sections 2.3 and 2.4 are also zero-length strings, so I won't set those either
                    // [MS-OXSHARE] 2.2.2.3
                    // ExtendedPropertyDefinition PidLidSharingConfigurationUrl = new   //ExtendedPropertyDefinition(PropertySetSharing, 0x8A24, MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.2.4
                    //ExtendedPropertyDefinition PidNameXSharingConfigUrl = new //ExtendedPropertyDefinition(DefaultExtendedPropertySet.InternetHeaders, "X-Sharing-Config-Url", MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.2.10
                    ExtendedPropertyDefinition PidLidSharingLocalType = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A14, MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.2.11
                    ExtendedPropertyDefinition PidNameXSharingLocalType = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Local-Type", MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.2.7
                    ExtendedPropertyDefinition PidLidSharingInitiatorEntryId = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A09, MapiPropertyType.Binary);
                    // [MS-OXSHARE] 2.2.2.8
                    ExtendedPropertyDefinition PidLidSharingInitiatorName = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A07, MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.2.9
                    ExtendedPropertyDefinition PidLidSharingInitiatorSMTP = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A08, MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.3.1
                    ExtendedPropertyDefinition PidLidSharingRemoteName = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A05, MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.3.2 
                    ExtendedPropertyDefinition PidNameXSharingRemoteName = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Remote-Name", MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.3.5 
                    ExtendedPropertyDefinition PidLidSharingRemoteType = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A1D, MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.3.6 
                    ExtendedPropertyDefinition PidNameXSharingRemoteType = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Remote-Type", MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.3.7 
                    ExtendedPropertyDefinition PidLidSharingRemoteUid = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A06, MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.3.8 
                    ExtendedPropertyDefinition PidNameXSharingRemoteUid = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Remote-Uid", MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.3.3
                    ExtendedPropertyDefinition PidLidSharingRemoteStoreUid = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A48, MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.3.4
                    ExtendedPropertyDefinition PidNameXSharingRemoteStoreUid = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Remote-Store-Uid", MapiPropertyType.String);
                    //From troubleshooting I noticed I was missing
                    ExtendedPropertyDefinition PidTagPriority = new ExtendedPropertyDefinition(0x0026, MapiPropertyType.Integer);
                    ExtendedPropertyDefinition PidTagSensitivity = new ExtendedPropertyDefinition(0x0036, MapiPropertyType.Integer);
                    ExtendedPropertyDefinition PR_BODY_HTML = new ExtendedPropertyDefinition(0x1013, MapiPropertyType.Binary); //PR_BOD
                    ExtendedPropertyDefinition PR_BODY = new ExtendedPropertyDefinition(0x1000, MapiPropertyType.String);
                    ExtendedPropertyDefinition RecipientReassignmentProhibited = new ExtendedPropertyDefinition(0x002b, MapiPropertyType.Boolean);
                    // Section 2.2.1
                    invitationRequest.SetExtendedProperty(PidTagNormalizedSubject, "I'd like to share my calendar with you"); /* Constant Required Value [MS-OXSHARE] 2.2.1 */
                    //invitationRequest.SetExtendedProperty(PidTagSubjectPrefix, String.Empty); /* Constant Required Value [MS-OXSHARE] 2.2.1 */
                    // Section 2.2.2
                    invitationRequest.SetExtendedProperty(PidLidSharingCapabilities, 0x40220); /* value for Special Folders */
                    invitationRequest.SetExtendedProperty(PidNameXSharingCapabilities, "40220"); /* Test representation of SharingCapabilities value */
                    //invitationRequest.SetExtendedProperty(PidLidSharingConfigurationUrl, String.Empty); /* Zero-Length String [MS-OXSHARE] 2.2.2.3 */
                    //invitationRequest.SetExtendedProperty(PidNameXSharingConfigUrl, String.Empty); /* Zero-Length String [MS-OXSHARE] 2.2.2.4 */
                    invitationRequest.SetExtendedProperty(PidLidSharingFlavor, 0x20310); /* Indicates Invitation for a special folder [MS-OXSHARE] 2.2.2.5 */
                    invitationRequest.SetExtendedProperty(PidNameXSharingFlavor, "20310"); /* Text representation of SharingFlavor value [MS-OXSHARE] 2.2.2.6 */
                    invitationRequest.SetExtendedProperty(PidLidSharingInitiatorEntryId, byteEntryId); /* Value from the Initiator/EntryId value in the Sharing Message attachment .xml document */
                    invitationRequest.SetExtendedProperty(PidLidSharingInitiatorSMTP, "[email protected]"); /* Value from Initiator/Smtp Address in the Sharing message attachment .xml document */
                    invitationRequest.SetExtendedProperty(PidLidSharingInitiatorName, "User1"); /* Value from Initiator/Name Address in the Sharing message attachment .xml document */
                    invitationRequest.SetExtendedProperty(PidLidSharingLocalType, "IPF.Appointment"); /* MUST be set to PidTagContainerClass of folder to be shared */
                    invitationRequest.SetExtendedProperty(PidNameXSharingLocalType, "IPF.Appointment"); /* MUST be set to same value as PidLidSharingLocalType */
                    invitationRequest.SetExtendedProperty(PidLidSharingProviderGuid, byteSharingProviderGuid); /* Constant Required Value [MS-OXSHARE] 2.2.2.12 */
                    invitationRequest.SetExtendedProperty(PidNameXSharingProviderGuid, "AEF0060000000000C000000000000046"); /* Constant Required Value [MS-OXSHARE] 2.2.2.13 */
                    invitationRequest.SetExtendedProperty(PidLidSharingProviderName, "Microsoft Exchange"); /* Constant Required Value [MS-OXSHARE] 2.2.2.14 */
                    invitationRequest.SetExtendedProperty(PidNameXSharingProviderName, "Microsoft Exchange"); /* Constant Required Value [MS-OXSHARE] 2.2.2.15] */
                    invitationRequest.SetExtendedProperty(PidLidSharingProviderUrl, "http://www.microsoft.com/exchange"); /* Constant Required Value [MS-OXSHARE] 2.2.2.16 */
                    invitationRequest.SetExtendedProperty(PidNameXSharingProviderUrl, "http://www.microsoft.com/exchange"); /* Constant Required Value [MS-OXSHARE] 2.2.2.17 */
                    // Section 2.2.3
                    invitationRequest.SetExtendedProperty(PidLidSharingRemoteName, calendar.FolderName); /* MUST be set to PidTagDisplayName of the folder being shared */
                    invitationRequest.SetExtendedProperty(PidNameXSharingRemoteName, calendar.FolderName); /* MUST be set to same value as PidLidSharingRemoteName */
                    invitationRequest.SetExtendedProperty(PidLidSharingRemoteStoreUid, mailboxId); /* Must be set to PidTagStoreEntryId of the folder being shared */
                    invitationRequest.SetExtendedProperty(PidNameXSharingRemoteStoreUid, mailboxId); /* MUST be set to same value as PidLidSharingRemoteStoreUid */
                    invitationRequest.SetExtendedProperty(PidLidSharingRemoteType, "IPF.Appointment"); /* Constant Required Value [MS-OXSHARE] 2.2.3.5 */
                    invitationRequest.SetExtendedProperty(PidNameXSharingRemoteType, "IPF.Appointment"); /* Constant Required Value [MS-OXSHARE] 2.2.3.6 */
                    invitationRequest.SetExtendedProperty(PidLidSharingRemoteUid, folderidHex); /* MUST be set to PidTagEntryId of folder being shared */
                    invitationRequest.SetExtendedProperty(PidNameXSharingRemoteUid, folderidHex); /* Must be set to same value as PidLidSharingRemoteUid */
                    // Section 2.2.5
                    invitationRequest.SetExtendedProperty(PidNameContentClass, "Sharing"); /* Constant Required Value [MS-ProtocolSpec] */
                    invitationRequest.SetExtendedProperty(PidTagMessageClass, "IPM.Sharing"); /* Constant Required Value [MS-ProtocolSpec] */
                    // ********* ADDITIONAL MAPPED PROPERTIES IM FINDING AS I TROUBLESHOOT ********************** //
                    invitationRequest.SetExtendedProperty(PidTagPriority, 0); /* From troubleshooting I'm just trying to match up values that were missing */
                    invitationRequest.SetExtendedProperty(PidTagSensitivity, 0); /* From troubleshooting as well */
                    invitationRequest.SetExtendedProperty(PR_BODY_HTML, binPRBODYHTML); /* From troubleshooting OWA error pointing to serializing HTML failing */
                    invitationRequest.SetExtendedProperty(PR_BODY, strBODY);
                    invitationRequest.SetExtendedProperty(RecipientReassignmentProhibited, true); /* Because it seemed like a good idea */
                    // Add a file attachment by using a stream
                    // We need to do the following in order to prevent 3 extra bytes from being prepended to the attachment
                    string sharMetadata = File.ReadAllText(sharedFilePath, Encoding.ASCII);
                    byte[] fileContents;
                    UTF8Encoding encoding = new System.Text.UTF8Encoding();
                    fileContents = encoding.GetBytes(sharMetadata);
                    //fileContents = File.ReadAllBytes(sharedFilePath);
                    //// fileContents is a Stream object that represents the content of the file to attach.
                    invitationRequest.Attachments.AddFileAttachment("sharing_metadata.xml", fileContents);
                    ////invitationRequest.Attachments.AddFileAttachment(sharedFilePath);
                    //// This is where we set those "special" headers and other pertinent
                    //// information I noted in Part 1 of this series...
                    //Attachment thisAttachment = invitationRequest.Attachments[0];
                    //thisAttachment.ContentType = "application/x-sharing-metadata-xml";
                    //thisAttachment.Name = "sharing_metadata.xml";
                    //thisAttachment.IsInline = false;
                    // Add recipient info and send message
                    invitationRequest.ToRecipients.Add(new EmailAddress() { Address = "[email protected]" });
                    invitationRequest.SendAndSaveCopy();
                    // I always end my methods by returning the EWS 
                    // impersonated user to null to clean up
                    service.ImpersonatedUserId = null;
                catch (Exception ex)
            public String GetConvertedEWSIDinHex(ExchangeService esb, String sID, String strSMTPAdd)
                // Create a request to convert identifiers.
                AlternateId objAltID = new AlternateId();
                objAltID.Format = IdFormat.EwsId;
                objAltID.Mailbox = strSMTPAdd;
                objAltID.UniqueId = sID;
                //Convert  PR_ENTRYID identifier format to an EWS identifier.
                AlternateIdBase objAltIDBase = esb.ConvertId(objAltID, IdFormat.HexEntryId);
                AlternateId objAltIDResp = (AlternateId)objAltIDBase;
                return objAltIDResp.UniqueId.ToString();
            public String GetInvitationMailboxId(string mailBoxServer, string domainName)
                ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013);
                service.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, "[email protected]");
                // Generate The Store Entry Id for the impersonated user
                StringBuilder MailboxIDPointer = new StringBuilder();          
                string fqdn = mailBoxServer;
                string legacyDN = domainName;
                MailboxIDPointer.Append("00000000"); /* Flags */
                MailboxIDPointer.Append("38A1BB1005E5101AA1BB08002B2A56C2"); /* ProviderUID */
                MailboxIDPointer.Append("00"); /* Version */
                MailboxIDPointer.Append("00"); /* Flag */
                MailboxIDPointer.Append("454D534D44422E444C4C00000000"); /* DLLFileName */
                MailboxIDPointer.Append("00000000"); /* Wrapped Flags */
                MailboxIDPointer.Append("1B55FA20AA6611CD9BC800AA002FC45A"); /* WrappedProvider UID (Mailbox Store Object) */
                MailboxIDPointer.Append("0C000000"); /* Wrapped Type (Mailbox Store) */
                MailboxIDPointer.Append(ConvertStringToHex(fqdn)); /* ServerShortname (FQDN) */
                MailboxIDPointer.Append("00"); /* termination bit */
                MailboxIDPointer.Append(ConvertStringToHex(legacyDN)); /* Returns the userDN of the impersonated user */
                MailboxIDPointer.Append("00"); /* terminator bit */
                service.ImpersonatedUserId = null;
                return MailboxIDPointer.ToString();
            static bool RedirectionUrlValidationCallback(String redirectionUrl)
                bool redirectionValidated = false;
                if (redirectionUrl.Equals("https://SampleUrl/autodiscover/autodiscover.xml"))          
                    redirectionValidated = true;
                return redirectionValidated;
            public String GetIntiatorEntryID(string domainName)
                String result = String.Empty;
                //// Bind to EWS
                //ExchangeService service = ExchangeConnection.ExchangeService();
                //service.ImpersonatedUserId =
                //new ImpersonatedUserId(ConnectingIdType.SmtpAddress, "[email protected]");
                //// Get LegacyDN Using the function above this one 
                string sharedByLegacyDN = domainName;
                // A conversion function from earlier
                string legacyDNinHex = ConvertStringToHex(sharedByLegacyDN);
                StringBuilder addBookEntryId = new StringBuilder();
                addBookEntryId.Append("00000000"); /* Flags */
                addBookEntryId.Append("DCA740C8C042101AB4B908002B2FE182"); /* ProviderUID */
                addBookEntryId.Append("01000000"); /* Version */
                addBookEntryId.Append("00000000"); /* Type - 00 00 00 00  = Local Mail User */
                addBookEntryId.Append(legacyDNinHex); /* Returns the userDN of the impersonated user */
                addBookEntryId.Append("00"); /* terminator bit */
                result = addBookEntryId.ToString();
                //service.ImpersonatedUserId = null;
                return result;
            public string ConvertStringToHex(string input)
                // Take our input and break it into an array
                char[] arrInput = input.ToCharArray();
                String result = String.Empty;
                // For each set of characters
                foreach (char element in arrInput)
                    if (String.IsNullOrEmpty(result))
                        result = String.Format("{0:X2}", Convert.ToUInt16(element)).ToString();
                    else
                        result += String.Format("{0:X2}", Convert.ToUInt16(element)).ToString();
                return result.ToString();
     public string CreateSharingMessageAttachment(string folderid, string userSharing, string userSharingEntryID, string invitationMailboxID, string userSharedTo, string dataType, string calendarName)
                XmlDocument sharedMetadataXML = new XmlDocument();
                string sharedMetaDataFilePath = string.Empty;
                try
                    // Create a String that contains our new sharing_metadata.xml file
                    StringBuilder metadataString = new StringBuilder("<?xml version=\"1.0\"?>");              
                    metadataString.Append("<SharingMessage xmlns=\"http://schemas.microsoft.com/sharing/2008\">");
                    metadataString.Append("<DataType>" + dataType + "</DataType>");
                    metadataString.Append("<Initiator>");
                    metadataString.Append("<Name>" + userSharing + "</Name>");
                    metadataString.Append("<SmtpAddress>" + "[email protected]" + "</SmtpAddress><EntryId>" + userSharingEntryID.Trim());
                    metadataString.Append("</EntryId>");
                    metadataString.Append("</Initiator>");
                    metadataString.Append("<Invitation>");
                    metadataString.Append("<Title>" + calendarName + "</Title>");
                    metadataString.Append("<Providers>");
                    metadataString.Append("<Provider Type=\"ms-exchange-internal\" TargetRecipients=\"" + userSharedTo + "\">");
                    metadataString.Append("<FolderId xmlns=\"http://schemas.microsoft.com/exchange/sharing/2008\">");
                    metadataString.Append(folderid);
                    metadataString.Append("</FolderId>");
                    metadataString.Append("<MailboxId xmlns=\"http://schemas.microsoft.com/exchange/sharing/2008\">");
                    metadataString.Append(invitationMailboxID);
                    metadataString.Append("</MailboxId>");
                    metadataString.Append("</Provider>");
                    metadataString.Append("</Providers>");
                    metadataString.Append("</Invitation>");
                    metadataString.Append("</SharingMessage>");
                    sharedMetadataXML.LoadXml(metadataString.ToString());
                    string tempPath = System.IO.Path.GetTempPath();
                    sharedMetaDataFilePath = tempPath + "sharing_metadata.xml";
                    sharedMetadataXML.Save(sharedMetaDataFilePath);
                catch (Exception eg)
                    throw eg;               
                return sharedMetaDataFilePath;
            public Dictionary<string, string> GetUserSettings(AutodiscoverService autodiscoverService)
                GetUserSettingsResponse userresponse = autodiscoverService.GetUserSettings(
                    "[email protected]",
                    UserSettingName.UserDisplayName,
                    UserSettingName.InternalMailboxServerDN,
                    UserSettingName.UserDN
                Dictionary<string, string> myUserSettings = new Dictionary<string, string>();
                foreach (KeyValuePair<UserSettingName, Object> usersetting in userresponse.Settings)
                    if (usersetting.Key.ToString() == "InternalMailboxServerDN")
                        int lastIndexOfEqual = usersetting.Value.ToString().LastIndexOf("=");
                        string subString = usersetting.Value.ToString().Substring(lastIndexOfEqual + 1);
                        string value = subString;
                        myUserSettings.Add("InternalMailboxServer", value.ToString());
                    if (usersetting.Key.ToString() == "UserDisplayName")
                        string[] arrResult = usersetting.Value.ToString().Split('.');
                        myUserSettings.Add("UserDisplayName", arrResult[0].ToString());
                    if (usersetting.Key.ToString() == "UserDN")
                        string[] arrResult = usersetting.Value.ToString().Split('.');
                        myUserSettings.Add("UserDN", arrResult[0].ToString());
                return myUserSettings;
            private static byte[] HexStringToByteArray(string input)
                byte[] Bytes;
                int ByteLength;
                string HexValue = "\x0\x1\x2\x3\x4\x5\x6\x7\x8\x9|||||||\xA\xB\xC\xD\xE\xF";
                ByteLength = input.Length / 2;
                Bytes = new byte[ByteLength];
                for (int x = 0, i = 0; i < input.Length; i += 2, x += 1)
                    Bytes[x] = (byte)(HexValue[Char.ToUpper(input[i + 0]) - '0'] << 4);
                    Bytes[x] |= (byte)(HexValue[Char.ToUpper(input[i + 1]) - '0']);
                return Bytes;

    Hi,
    I'm trying to share a calendar through ews managed api v.2 and using exchange 2013 version.
    i'm preparing a shared calendar and providing values to extended properties .
    Here comes the problem when i'm trying to send the sharing request(email message) 
    The following is code snippet.
      public void ShareCalendar(Calendar calendar)
                ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013);
                  service.Credentials = new NetworkCredential("user1", "password", "domain");
                service.Url = new Uri("https://sampleUrl/ews/exchange.asmx");
                try
                    // Bind to the folder
                    //Folder folderStoreInfo;
                    //folderStoreInfo = Folder.Bind(service, calendar.ExchangeId);
                    //string EwsID = folderStoreInfo.Id.UniqueId;
                    string EwsID = calendar.FolderExchangeId;
                    // The value of folderidHex will be what we need to use for the FolderId in the xml file
                    AutodiscoverService autoDiscover = new AutodiscoverService(ExchangeVersion.Exchange2013);
                    autoDiscover.Credentials =  new NetworkCredential("user1", "password", "domain");
                    autoDiscover.RedirectionUrlValidationCallback = RedirectionUrlValidationCallback;
                    Dictionary<string, string> userSettings = GetUserSettings(autoDiscover);
                    string folderidHex = GetConvertedEWSIDinHex(service, EwsID, "[email protected]");
                    string domainName = string.Empty;
                    string mailBoxServer = string.Empty;
                    string userName = string.Empty;
                    foreach (var item in userSettings)
                        switch (item.Key)
                            case "UserDN":
                                domainName = item.Value.ToString();
                                break;
                            case "InternalMailboxServer":
                                mailBoxServer = item.Value.ToString();
                                break;
                            case "UserDisplayName":
                                userName = item.Value.ToString();
                                break;
                    string entryId = GetIntiatorEntryID(domainName);
                    string mailboxId = GetInvitationMailboxId(mailBoxServer, domainName);
                    string sharedFilePath = CreateSharingMessageAttachment(folderidHex, userName, entryId, mailboxId, "[email protected]", "calendar", calendar.FolderName);
                    // Create a new message
                    EmailMessage invitationRequest = new EmailMessage(service);
                    invitationRequest.Subject = "I'd like to share my calendar with you";
                    invitationRequest.Body = "Sent by Exchange Administrator on behalf of user";                
                    //invitationRequest.Culture = "en-US";
                    invitationRequest.Sensitivity = Sensitivity.Normal;
                    // Set a sharing specific property on the message
                    invitationRequest.ItemClass = "IPM.Sharing"; /* Constant Required Value [MS-ProtocolSpec] */
                    byte[] byteEntryId = HexStringToByteArray(entryId);
                    // This is the Guid of the Sharing Provider in Exchange, and it's value does not change
                    Guid binSharingProviderGuid = new Guid("{AEF00600-0000-0000-C000-000000000046}");
                    // Even though I don't think setting this property is mandatory, 
                    // it just seemed like the right thing to do and it works so I \
                    // ain't messin with it!                                        
                    byte[] byteSharingProviderGuid = binSharingProviderGuid.ToByteArray();
                    string strPRBODYHTML = "<html dir=\"ltr\">\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\r\n<meta name=\"GENERATOR\"
    content=\"MSHTML 8.00.7601.17514\">\r\n<style id=\"owaParaStyle\">P {\r\n   MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px \r\n}\r\n</style>\r\n</head>\r\n<body fPStyle=\"1\" ocsi=\"0\">\r\n<tt>\r\n<pre>SharedByUserDisplayName
    (SharedByUserSmtpAddress) has invited you to view his or her Microsoft Exchange Calendar.\r\n\r\nFor instructions on how to view shared folders on Exchange, see the following article:\r\n\r\nhttp://go.microsoft.com/fwlink/?LinkId=57561\r\n\r\n*~*~*~*~*~*~*~*~*~*\r\n\r\n</pre>\r\n</tt>\r\n<div>\r\n<div
    style=\"direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;\">this is a test message</div>\r\n</div>\r\n</body>\r\n</html>\r\n";
                    string strBODY = @"
    SharedByUserDisplayName (SharedByUserSmtpAddress) has invited you to view his or
    her Microsoft Exchange Calendar.
    For instructions on how to view shared folders on Exchange, see the
    following article:
    http://go.microsoft.com/fwlink/?LinkId=57561
    *~*~*~*~*~*~*~*~*~*
    test body
                    // Convert these to hex and binary equivelants to assign to their relevant
                    // extended properties
                    string hexPRBODYHTML = ConvertStringToHex(strPRBODYHTML);
                    byte[] binPRBODYHTML = HexStringToByteArray(hexPRBODYHTML);
                    Guid PropertySetSharing = Guid.Parse("00062040-0000-0000-C000-000000000046");//constant 
                    Guid PropertySetInternetHeaders = Guid.Parse("00020386-0000-0000-C000-000000000046");//constant
                    ExtendedPropertyDefinition PidLidSharingProviderGuidProperty = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A01, MapiPropertyType.CLSID);
                    ExtendedPropertyDefinition ConversationIdProperty = new ExtendedPropertyDefinition(0x3013, MapiPropertyType.Binary);
                    // Sharing Properties (in order of reference according to protocol examples in: [MS-OXSHARE])
                    // Additional Property Constraints
                    // [MS-OXSHARE] 2.2.5.2
                    ExtendedPropertyDefinition PidTagMessageClass = new ExtendedPropertyDefinition(0x001A, MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.5.1
                    //ExtendedPropertyDefinition PidNameContentClass = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.InternetHeaders, "Content-Class", MapiPropertyType.String);
                    ExtendedPropertyDefinition PidNameContentClass = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "Content-class", MapiPropertyType.String);
                    // Common Message Object Properties               
                    // [MS-OXSHARE] 2.2.1
                    ExtendedPropertyDefinition PidTagNormalizedSubject = new ExtendedPropertyDefinition(0x0E1D, MapiPropertyType.String);
                    // The PidTagSubjectPrefix is a zero-length string, so I do not set it
                    // ExtendedPropertyDefinition PidTagSubjectPrefix = new ExtendedPropertyDefinition(0x003D, MapiPropertyType.String);
                    // Sharing Object Message Properties
                    // [MS-OXSHARE] 2.2.2.12
                    ExtendedPropertyDefinition PidLidSharingProviderGuid = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A01, MapiPropertyType.Binary);
                    // [MS-OXSHARE] 2.2.2.13
                    ExtendedPropertyDefinition PidNameXSharingProviderGuid = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Provider-GUID", MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.2.14
                    ExtendedPropertyDefinition PidLidSharingProviderName = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A02, MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.2.15           
                    ExtendedPropertyDefinition PidNameXSharingProviderName = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Provider-Name", MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.2.16
                    ExtendedPropertyDefinition PidLidSharingProviderUrl = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A03, MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.2.17
                    ExtendedPropertyDefinition PidNameXSharingProviderUrl = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Provider-URL", MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.2.5
                    ExtendedPropertyDefinition PidLidSharingFlavor = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A18, MapiPropertyType.Integer);
                    // [MS-OXSHARE] 2.2.2.6
                    ExtendedPropertyDefinition PidNameXSharingFlavor = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Flavor", MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.2.1
                    ExtendedPropertyDefinition PidLidSharingCapabilities = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A17, MapiPropertyType.Integer);
                    // [MS-OXSHARE] 2.2.2.2
                    ExtendedPropertyDefinition PidNameXSharingCapabilities = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Capabilities", MapiPropertyType.String);
                    // Sections 2.3 and 2.4 are also zero-length strings, so I won't set those either
                    // [MS-OXSHARE] 2.2.2.3
                    // ExtendedPropertyDefinition PidLidSharingConfigurationUrl = new   //ExtendedPropertyDefinition(PropertySetSharing, 0x8A24, MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.2.4
                    //ExtendedPropertyDefinition PidNameXSharingConfigUrl = new //ExtendedPropertyDefinition(DefaultExtendedPropertySet.InternetHeaders, "X-Sharing-Config-Url", MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.2.10
                    ExtendedPropertyDefinition PidLidSharingLocalType = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A14, MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.2.11
                    ExtendedPropertyDefinition PidNameXSharingLocalType = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Local-Type", MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.2.7
                    ExtendedPropertyDefinition PidLidSharingInitiatorEntryId = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A09, MapiPropertyType.Binary);
                    // [MS-OXSHARE] 2.2.2.8
                    ExtendedPropertyDefinition PidLidSharingInitiatorName = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A07, MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.2.9
                    ExtendedPropertyDefinition PidLidSharingInitiatorSMTP = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A08, MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.3.1
                    ExtendedPropertyDefinition PidLidSharingRemoteName = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A05, MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.3.2 
                    ExtendedPropertyDefinition PidNameXSharingRemoteName = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Remote-Name", MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.3.5 
                    ExtendedPropertyDefinition PidLidSharingRemoteType = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A1D, MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.3.6 
                    ExtendedPropertyDefinition PidNameXSharingRemoteType = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Remote-Type", MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.3.7 
                    ExtendedPropertyDefinition PidLidSharingRemoteUid = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A06, MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.3.8 
                    ExtendedPropertyDefinition PidNameXSharingRemoteUid = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Remote-Uid", MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.3.3
                    ExtendedPropertyDefinition PidLidSharingRemoteStoreUid = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A48, MapiPropertyType.String);
                    // [MS-OXSHARE] 2.2.3.4
                    ExtendedPropertyDefinition PidNameXSharingRemoteStoreUid = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Remote-Store-Uid", MapiPropertyType.String);
                    //From troubleshooting I noticed I was missing
                    ExtendedPropertyDefinition PidTagPriority = new ExtendedPropertyDefinition(0x0026, MapiPropertyType.Integer);
                    ExtendedPropertyDefinition PidTagSensitivity = new ExtendedPropertyDefinition(0x0036, MapiPropertyType.Integer);
                    ExtendedPropertyDefinition PR_BODY_HTML = new ExtendedPropertyDefinition(0x1013, MapiPropertyType.Binary); //PR_BOD
                    ExtendedPropertyDefinition PR_BODY = new ExtendedPropertyDefinition(0x1000, MapiPropertyType.String);
                    ExtendedPropertyDefinition RecipientReassignmentProhibited = new ExtendedPropertyDefinition(0x002b, MapiPropertyType.Boolean);
                    // Section 2.2.1
                    invitationRequest.SetExtendedProperty(PidTagNormalizedSubject, "I'd like to share my calendar with you"); /* Constant Required Value [MS-OXSHARE] 2.2.1 */
                    //invitationRequest.SetExtendedProperty(PidTagSubjectPrefix, String.Empty); /* Constant Required Value [MS-OXSHARE] 2.2.1 */
                    // Section 2.2.2
                    invitationRequest.SetExtendedProperty(PidLidSharingCapabilities, 0x40220); /* value for Special Folders */
                    invitationRequest.SetExtendedProperty(PidNameXSharingCapabilities, "40220"); /* Test representation of SharingCapabilities value */
                    //invitationRequest.SetExtendedProperty(PidLidSharingConfigurationUrl, String.Empty); /* Zero-Length String [MS-OXSHARE] 2.2.2.3 */
                    //invitationRequest.SetExtendedProperty(PidNameXSharingConfigUrl, String.Empty); /* Zero-Length String [MS-OXSHARE] 2.2.2.4 */
                    invitationRequest.SetExtendedProperty(PidLidSharingFlavor, 0x20310); /* Indicates Invitation for a special folder [MS-OXSHARE] 2.2.2.5 */
                    invitationRequest.SetExtendedProperty(PidNameXSharingFlavor, "20310"); /* Text representation of SharingFlavor value [MS-OXSHARE] 2.2.2.6 */
                    invitationRequest.SetExtendedProperty(PidLidSharingInitiatorEntryId, byteEntryId); /* Value from the Initiator/EntryId value in the Sharing Message attachment .xml document */
                    invitationRequest.SetExtendedProperty(PidLidSharingInitiatorSMTP, "[email protected]"); /* Value from Initiator/Smtp Address in the Sharing message attachment .xml document */
                    invitationRequest.SetExtendedProperty(PidLidSharingInitiatorName, "User1"); /* Value from Initiator/Name Address in the Sharing message attachment .xml document */
                    invitationRequest.SetExtendedProperty(PidLidSharingLocalType, "IPF.Appointment"); /* MUST be set to PidTagContainerClass of folder to be shared */
                    invitationRequest.SetExtendedProperty(PidNameXSharingLocalType, "IPF.Appointment"); /* MUST be set to same value as PidLidSharingLocalType */
                    invitationRequest.SetExtendedProperty(PidLidSharingProviderGuid, byteSharingProviderGuid); /* Constant Required Value [MS-OXSHARE] 2.2.2.12 */
                    invitationRequest.SetExtendedProperty(PidNameXSharingProviderGuid, "AEF0060000000000C000000000000046"); /* Constant Required Value [MS-OXSHARE] 2.2.2.13 */
                    invitationRequest.SetExtendedProperty(PidLidSharingProviderName, "Microsoft Exchange"); /* Constant Required Value [MS-OXSHARE] 2.2.2.14 */
                    invitationRequest.SetExtendedProperty(PidNameXSharingProviderName, "Microsoft Exchange"); /* Constant Required Value [MS-OXSHARE] 2.2.2.15] */
                    invitationRequest.SetExtendedProperty(PidLidSharingProviderUrl, "http://www.microsoft.com/exchange"); /* Constant Required Value [MS-OXSHARE] 2.2.2.16 */
                    invitationRequest.SetExtendedProperty(PidNameXSharingProviderUrl, "http://www.microsoft.com/exchange"); /* Constant Required Value [MS-OXSHARE] 2.2.2.17 */
                    // Section 2.2.3
                    invitationRequest.SetExtendedProperty(PidLidSharingRemoteName, calendar.FolderName); /* MUST be set to PidTagDisplayName of the folder being shared */
                    invitationRequest.SetExtendedProperty(PidNameXSharingRemoteName, calendar.FolderName); /* MUST be set to same value as PidLidSharingRemoteName */
                    invitationRequest.SetExtendedProperty(PidLidSharingRemoteStoreUid, mailboxId); /* Must be set to PidTagStoreEntryId of the folder being shared */
                    invitationRequest.SetExtendedProperty(PidNameXSharingRemoteStoreUid, mailboxId); /* MUST be set to same value as PidLidSharingRemoteStoreUid */
                    invitationRequest.SetExtendedProperty(PidLidSharingRemoteType, "IPF.Appointment"); /* Constant Required Value [MS-OXSHARE] 2.2.3.5 */
                    invitationRequest.SetExtendedProperty(PidNameXSharingRemoteType, "IPF.Appointment"); /* Constant Required Value [MS-OXSHARE] 2.2.3.6 */
                    invitationRequest.SetExtendedProperty(PidLidSharingRemoteUid, folderidHex); /* MUST be set to PidTagEntryId of folder being shared */
                    invitationRequest.SetExtendedProperty(PidNameXSharingRemoteUid, folderidHex); /* Must be set to same value as PidLidSharingRemoteUid */
                    // Section 2.2.5
                    invitationRequest.SetExtendedProperty(PidNameContentClass, "Sharing"); /* Constant Required Value [MS-ProtocolSpec] */
                    invitationRequest.SetExtendedProperty(PidTagMessageClass, "IPM.Sharing"); /* Constant Required Value [MS-ProtocolSpec] */
                    // ********* ADDITIONAL MAPPED PROPERTIES IM FINDING AS I TROUBLESHOOT ********************** //
                    invitationRequest.SetExtendedProperty(PidTagPriority, 0); /* From troubleshooting I'm just trying to match up values that were missing */
                    invitationRequest.SetExtendedProperty(PidTagSensitivity, 0); /* From troubleshooting as well */
                    invitationRequest.SetExtendedProperty(PR_BODY_HTML, binPRBODYHTML); /* From troubleshooting OWA error pointing to serializing HTML failing */
                    invitationRequest.SetExtendedProperty(PR_BODY, strBODY);
                    invitationRequest.SetExtendedProperty(RecipientReassignmentProhibited, true); /* Because it seemed like a good idea */
                    // Add a file attachment by using a stream
                    // We need to do the following in order to prevent 3 extra bytes from being prepended to the attachment
                    string sharMetadata = File.ReadAllText(sharedFilePath, Encoding.ASCII);
                    byte[] fileContents;
                    UTF8Encoding encoding = new System.Text.UTF8Encoding();
                    fileContents = encoding.GetBytes(sharMetadata);
                    //fileContents = File.ReadAllBytes(sharedFilePath);
                    //// fileContents is a Stream object that represents the content of the file to attach.
                    invitationRequest.Attachments.AddFileAttachment("sharing_metadata.xml", fileContents);
                    ////invitationRequest.Attachments.AddFileAttachment(sharedFilePath);
                    //// This is where we set those "special" headers and other pertinent
                    //// information I noted in Part 1 of this series...
                    //Attachment thisAttachment = invitationRequest.Attachments[0];
                    //thisAttachment.ContentType = "application/x-sharing-metadata-xml";
                    //thisAttachment.Name = "sharing_metadata.xml";
                    //thisAttachment.IsInline = false;
                    // Add recipient info and send message
                    invitationRequest.ToRecipients.Add(new EmailAddress() { Address = "[email protected]" });
                    invitationRequest.SendAndSaveCopy();
                    // I always end my methods by returning the EWS 
                    // impersonated user to null to clean up
                    service.ImpersonatedUserId = null;
                catch (Exception ex)
            public String GetConvertedEWSIDinHex(ExchangeService esb, String sID, String strSMTPAdd)
                // Create a request to convert identifiers.
                AlternateId objAltID = new AlternateId();
                objAltID.Format = IdFormat.EwsId;
                objAltID.Mailbox = strSMTPAdd;
                objAltID.UniqueId = sID;
                //Convert  PR_ENTRYID identifier format to an EWS identifier.
                AlternateIdBase objAltIDBase = esb.ConvertId(objAltID, IdFormat.HexEntryId);
                AlternateId objAltIDResp = (AlternateId)objAltIDBase;
                return objAltIDResp.UniqueId.ToString();
            public String GetInvitationMailboxId(string mailBoxServer, string domainName)
                ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013);
                service.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, "[email protected]");
                // Generate The Store Entry Id for the impersonated user
                StringBuilder MailboxIDPointer = new StringBuilder();          
                string fqdn = mailBoxServer;
                string legacyDN = domainName;
                MailboxIDPointer.Append("00000000"); /* Flags */
                MailboxIDPointer.Append("38A1BB1005E5101AA1BB08002B2A56C2"); /* ProviderUID */
                MailboxIDPointer.Append("00"); /* Version */
                MailboxIDPointer.Append("00"); /* Flag */
                MailboxIDPointer.Append("454D534D44422E444C4C00000000"); /* DLLFileName */
                MailboxIDPointer.Append("00000000"); /* Wrapped Flags */
                MailboxIDPointer.Append("1B55FA20AA6611CD9BC800AA002FC45A"); /* WrappedProvider UID (Mailbox Store Object) */
                MailboxIDPointer.Append("0C000000"); /* Wrapped Type (Mailbox Store) */
                MailboxIDPointer.Append(ConvertStringToHex(fqdn)); /* ServerShortname (FQDN) */
                MailboxIDPointer.Append("00"); /* termination bit */
                MailboxIDPointer.Append(ConvertStringToHex(legacyDN)); /* Returns the userDN of the impersonated user */
                MailboxIDPointer.Append("00"); /* terminator bit */
                service.ImpersonatedUserId = null;
                return MailboxIDPointer.ToString();
            static bool RedirectionUrlValidationCallback(String redirectionUrl)
                bool redirectionValidated = false;
                if (redirectionUrl.Equals("https://SampleUrl/autodiscover/autodiscover.xml"))          
                    redirectionValidated = true;
                return redirectionValidated;
            public String GetIntiatorEntryID(string domainName)
                String result = String.Empty;
                //// Bind to EWS
                //ExchangeService service = ExchangeConnection.ExchangeService();
                //service.ImpersonatedUserId =
                //new ImpersonatedUserId(ConnectingIdType.SmtpAddress, "[email protected]");
                //// Get LegacyDN Using the function above this one 
                string sharedByLegacyDN = domainName;
                // A conversion function from earlier
                string legacyDNinHex = ConvertStringToHex(sharedByLegacyDN);
                StringBuilder addBookEntryId = new StringBuilder();
                addBookEntryId.Append("00000000"); /* Flags */
                addBookEntryId.Append("DCA740C8C042101AB4B908002B2FE182"); /* ProviderUID */
                addBookEntryId.Append("01000000"); /* Version */
                addBookEntryId.Append("00000000"); /* Type - 00 00 00 00  = Local Mail User */
                addBookEntryId.Append(legacyDNinHex); /* Returns the userDN of the impersonated user */
                addBookEntryId.Append("00"); /* terminator bit */
                result = addBookEntryId.ToString();
                //service.ImpersonatedUserId = null;
                return result;
            public string ConvertStringToHex(string input)
                // Take our input and break it into an array
                char[] arrInput = input.ToCharArray();
                String result = String.Empty;
                // For each set of characters
                foreach (char element in arrInput)
                    if (String.IsNullOrEmpty(result))
                        result = String.Format("{0:X2}", Convert.ToUInt16(element)).ToString();
                    else
                        result += String.Format("{0:X2}", Convert.ToUInt16(element)).ToString();
                return result.ToString();
     public string CreateSharingMessageAttachment(string folderid, string userSharing, string userSharingEntryID, string invitationMailboxID, string userSharedTo, string dataType, string calendarName)
                XmlDocument sharedMetadataXML = new XmlDocument();
                string sharedMetaDataFilePath = string.Empty;
                try
                    // Create a String that contains our new sharing_metadata.xml file
                    StringBuilder metadataString = new StringBuilder("<?xml version=\"1.0\"?>");              
                    metadataString.Append("<SharingMessage xmlns=\"http://schemas.microsoft.com/sharing/2008\">");
                    metadataString.Append("<DataType>" + dataType + "</DataType>");
                    metadataString.Append("<Initiator>");
                    metadataString.Append("<Name>" + userSharing + "</Name>");
                    metadataString.Append("<SmtpAddress>" + "[email protected]" + "</SmtpAddress><EntryId>" + userSharingEntryID.Trim());
                    metadataString.Append("</EntryId>");
                    metadataString.Append("</Initiator>");
                    metadataString.Append("<Invitation>");
                    metadataString.Append("<Title>" + calendarName + "</Title>");
                    metadataString.Append("<Providers>");
                    metadataString.Append("<Provider Type=\"ms-exchange-internal\" TargetRecipients=\"" + userSharedTo + "\">");
                    metadataString.Append("<FolderId xmlns=\"http://schemas.microsoft.com/exchange/sharing/2008\">");
                    metadataString.Append(folderid);
                    metadataString.Append("</FolderId>");
                    metadataString.Append("<MailboxId xmlns=\"http://schemas.microsoft.com/exchange/sharing/2008\">");
                    metadataString.Append(invitationMailboxID);
                    metadataString.Append("</MailboxId>");
                    metadataString.Append("</Provider>");
                    metadataString.Append("</Providers>");
                    metadataString.Append("</Invitation>");
                    metadataString.Append("</SharingMessage>");
                    sharedMetadataXML.LoadXml(metadataString.ToString());
                    string tempPath = System.IO.Path.GetTempPath();
                    sharedMetaDataFilePath = tempPath + "sharing_metadata.xml";
                    sharedMetadataXML.Save(sharedMetaDataFilePath);
                catch (Exception eg)
                    throw eg;               
                return sharedMetaDataFilePath;
            public Dictionary<string, string> GetUserSettings(AutodiscoverService autodiscoverService)
                GetUserSettingsResponse userresponse = autodiscoverService.GetUserSettings(
                    "[email protected]",
                    UserSettingName.UserDisplayName,
                    UserSettingName.InternalMailboxServerDN,
                    UserSettingName.UserDN
                Dictionary<string, string> myUserSettings = new Dictionary<string, string>();
                foreach (KeyValuePair<UserSettingName, Object> usersetting in userresponse.Settings)
                    if (usersetting.Key.ToString() == "InternalMailboxServerDN")
                        int lastIndexOfEqual = usersetting.Value.ToString().LastIndexOf("=");
                        string subString = usersetting.Value.ToString().Substring(lastIndexOfEqual + 1);
                        string value = subString;
                        myUserSettings.Add("InternalMailboxServer", value.ToString());
                    if (usersetting.Key.ToString() == "UserDisplayName")
                        string[] arrResult = usersetting.Value.ToString().Split('.');
                        myUserSettings.Add("UserDisplayName", arrResult[0].ToString());
                    if (usersetting.Key.ToString() == "UserDN")
                        string[] arrResult = usersetting.Value.ToString().Split('.');
                        myUserSettings.Add("UserDN", arrResult[0].ToString());
                return myUserSettings;
            private static byte[] HexStringToByteArray(string input)
                byte[] Bytes;
                int ByteLength;
                string HexValue = "\x0\x1\x2\x3\x4\x5\x6\x7\x8\x9|||||||\xA\xB\xC\xD\xE\xF";
                ByteLength = input.Length / 2;
                Bytes = new byte[ByteLength];
                for (int x = 0, i = 0; i < input.Length; i += 2, x += 1)
                    Bytes[x] = (byte)(HexValue[Char.ToUpper(input[i + 0]) - '0'] << 4);
                    Bytes[x] |= (byte)(HexValue[Char.ToUpper(input[i + 1]) - '0']);
                return Bytes;
    am i missing anything 
    any help is appreciated 
    Thanks in advance

  • EWS Managed API - 1. BindToItems returns ErrorAccessDenied error, 2. appointments created in one mailbox show up in others

    Hi,
    I know there are other questions about ErrorAccessDenied but they are not exactly describing my situation and all are pretty much old and mostly not answered so forgive me for creating my own.
    Also, wall of text coming so please bear with me.
    We have an application that synchronizes Exchange items into our internal systems. Items created on Exchange are stored in that system and vice versa of course with a lot of business logic and rules, etc. Application uses EWS Managed API and impersonation
    to access users mailboxes. Everything works fine but now we have this one customer that has a lot of strange things going on with main 2 problems mentioned in subject.
    1. To ensure both sides (Exchange and our system) are in sync we have a functionality that allows users to decide that items no longer existing on Exchange should be removed also from system database. Since in our record we store id of original Exchange
    item internal system simply sends us list of those ids to confirm items still exist. What application does is a BindToItems method call with BasePropertySet.IdOnly as requested property and depending on server response we notify internal system about state
    of items. There is some semi complex logic behind what exactly is done on system side but in general NoError and item returned means item exists, ErrorItemNotFound means item doesn't exist.
    For this one customer suddenly we started to receive ErrorAccessDenied and ErrorBatchProcessingStopped error codes which is very strange because seconds earlier there were events read from PullSubscribtion, items read from server, items created on server
    and bunch of other stuff going on which basically makes me sure that impersonation is working. For some reason during execution of this particular code ErrorAccesDenied is returned and it messes up whole BindToItems call.
    But what is really strange is that for first id in list of ids we get NoError and correct item returned, for second id we get ErrorAccessDenied, and rest of responses is ErrorBatchProcessingStopped. So is it really about credentials or there is some
    completely different reason AccessDenied is retuned? According to customer those items exist in user mailbox for whom those errors are showing up. It doesn't happen for all users, only for some - who have exactly the same configuration of mailboxes as rest
    (according to customer).
    2. For same customer another problem started to occur since 1st of January, at least that is a date when they noticed it for the first time. Again, it happens for some users and there is no scenario that would guarantee to reproduce it.
    When new record is created in our system or its data change it has to be created/updated on Exchange. With same impersonation as for problem described above I simply create new item or find existing item using id provided by our system, set item properties
    according to whatever was sent and save/update item on Exchange. Simple and it works in multiple installations without problems.
    But this customer reports that appointments created for one user show up in other users mailboxes which I find really strange because as far as I know when I impersonate [email protected] everything I do is executed in context of this one user only. So if
    I create appointment in his calendar I cannot create same appointment in userB's calendar without explicitly switching impersonation to userB. What is worth mentioning during our sync process we store on Exchange items bunch of custom properties that help
    us verify whole process and do various filters, etc. All of those custom properties are visible in outlook in that design form view or whatever it is called. And I have screenshot from user that claims to have one of those "not his" appointments
    and basically half of our properties is not there and some have no values while they definitely should have otherwise whole sync would fail and everything is logged as successful.
    Sorry for this wall of text but I really have no idea what can causing those strange problems so I tried to describe as much as possible without breaching NDA and such stuff. We added a lot of logging around areas where impersonation is changed, Exchange
    items are created/updated, etc. Logs show nothing, of course.
    So, for first issue: is it possible that items were moved on Exchange in such way that user still can see them but for EWS API call we get ErrorAccessDenied? I'm not sure where exactly could be such location because if id of an item would change we should
    rather get ErrorItemNotFound or even something about id being not properly formatted, right?
    For second issue: is it possible that there is something running on Exchange server and does some kind of simplistic mirroring of items between mailboxes? Customer claims there are no such things on server nor user side but can it be something that non-IT
    people wouldn't know? Like some kind of script that admins like to run to keep server healthy or something innocent but lethal for our scenarios? Anybody has any hints what we should even ask customer about to get closer to solution of those mysterious problems?

    Were you able to figure what was going on with your first problem? we're seeing the exact same issue with one of our customers.

  • How do you change volume permissions with Solaris Volume Manager?

    (Previously posted in "Talk to the Sysop" - no replies)
    I'm trying to set up Solaris 9 to run Oracle on raw partitions. I have my design nailed down and I have built all the raw partitions I need as soft partitions on top of RAID 1 volumes. All this is built using Solaris Volume Manager (SVM).
    However, all the partitions are still owned by root. Before I can create my Oracle database, I need to change the owner of the Oracle partitions to oracle:oinstall. The only reference I found telling me how to do this was in a Sun Blueprint and it essentially said "You can't change volume permissions directly or permanently using SVM and chown will only remain effective until the next reboot. To make the changes permanent, you must modify /etc/minor_perm". Unfortunately, I can't find an example of how to do this anywhere and the online man pages are not particularly helpful (at least not to me).
    I'd appreciate a quick pointer, either to a good online resource or, even better, a simple example. For background, the volumes Oracle needs to own are:
    /dev/md/rdsk/d101-109
    /dev/md/rdsk/d201-203
    /dev/md/rdsk/d301-303
    /dev/md/rdsk/d401-403
    /dev/md/rdsk/d501-505
    I provide this information because I'd like to assign some, but not all, of the devices under /dev/md/rdsk to the oracle user and I was hoping some smart person out there could illustrate an approach using simle regular expressions, at which I'm horribly poor.
    Thanks in advance,
    Adrian

    Ron, I feel your pain.  I just came from an HTC also and a lot of stuff with this iPhone is bugging the crap out of me.  Who makes a phone where you can't adjust the ringer and alert volumes independently?  Instead, I have to adjust the alert volume when it is active.  C'mon guys.  Get with the program.  You won a bunch of Android users over with the 4S, but you're going to chase us all back when we're done with our contract.  Frustrating.  

  • Unable to Initialize Volume Manager from a Configuration File

    I'd like to reattach a D1000 to a rebuilt system. The array contains a raid 5 partition that was built with Solaris Volume Manager (Solaris 9). Since it is the same system all controller/target/slice ids have not changed. I was able to restore the Volume Manager configuration files (/etc/lvm) from a tape backup and followed the instructions provided in the Solaris Volume Manager Administration Guide: How to Initialize Solaris Volume Manager from a Configuration File <http://docs.sun.com/db/doc/816-4519/6manoju60?a=view>.
    All of the state database replicas for this partition are contained on the disks within the array so I began by creating new database replicas on a local disk.
    I then copied the /etc/md.cf file to /etc/md.tab
    # more /etc/lvm/md.tab
    # metadevice configuration file
    # do not hand edit
    d0 -r c1t10d0s0 c1t11d0s0 c1t12d0s0 c1t8d0s0 c1t9d0s0 c2t10d0s0 c2t11d0s0 c2t12d0s0 c2t8d0s0 c2t9d0s0 -k -i 32b -h hsp000
    hsp000 c1t13d0s0 c2t13d0s0
    I then tested the syntax of the md.tab file (this output is actually from my secomd attempt).
    # /sbin/metainit -n -a
    d0: RAID is setup
    metainit: <hostname>: /etc/lvm/md.tab line 4: hsp000: hotspare pool is already setup
    Not seeing any problems I then attempted to recreate the d0 volume, but it fails with the error below:
    # /sbin/metainit -a
    metainit: <hostname>: /etc/lvm/md.tab line 3: d0: devices were not RAIDed previously or are specified in the wrong order
    metainit: <hostname>: /etc/lvm/md.tab line 4: hsp000: hotspare pool is already setup
    Any suggestions on how to reinitialize this volume would be appreciated.
    Thanks, Doug

    You have UserPrincipalName column heading in the csv file so this should be your cmdlet.
    import-csv C:\temp\sharedMailboxCreationTest.csv | ForEach-Object {New-Mailbox -shared  -Name $_.Name  -Alias $_.Alias  -OrganizationalUnit $_.OrganizationalUnit -UserPrincipalName $_.UserPrincipalName -Database $_.Database}
    Blog |
    Get Your Exchange Powershell Tip of the Day from here

  • EWS Managed API 2.0 - Attachment.Inline property value incorrect

    I have an application where I am reading the emails from a mailbox using EWS managed api. One of the things that I check for in the email message is whether it has any inline attachments. 
    I am having this issue where I have an email with an image in the body and an excel file attached. When I check the Attachment.Inline property for the image, it says "false". This is not right. It should say "true".
    I tried to reproduce this behavior by creating an email of my own with the same image and another excel file as attachment but cannot reproduce it.
    I tried stripping the excel attachment and forwarding the problem email with just the picture in it's body but I still see the inline property as false.
    The text format on all these emails is HTML.
    I am not sure why inline is false and why I am unable to reproduce this behavior.
    Thanks.

    Yes FolderId's (like MessageId's) are globally unique.
    >> In other words: Can 2 folders have the same id when accessing them?
    No see
    http://msdn.microsoft.com/en-us/library/ee178877(v=exchg.80).aspx
    Cheers
    Glen

  • Veritas volume manager for solaris 10

    Hi All
    which version veritas volume manager will support solaris 10 06/06.
    can you just update a link for reference
    Regards
    RPS

    Hello,
    we are currently using solaris 9 with veritas volume manager 3.5.So i would like to know if i upgrade to solaris 10 06/06.whether i can use 3.5 or not.
    Using the Veritas (Symantec) support site, I have found the following document
    VERITAS Storage Solutions 3.5 Maintenance Pack 4 for Solaris
    http://seer.support.veritas.com/docs/278582.htm
    The latest supported version listed for VxVM 3.5 with MP4 applied is Solaris 9. That means the answer is NO.
    I understand that searching the Veritas knowledge base might be tough and time consuming, but it's their product ...
    Michael

  • Veritas volume manager on Solaris 10(X86)

    is it possible to install veritas volume manager on solaris 10 (x86) ?

    You should check the supported operating system matrix for Storage Foundation to see what they support. But yes, Solaris x64 is supported. I don't think they support 32-bit x86.
    Darren

  • Can't use built in volume manager in PCMan File Manager

    Trying to use the built in volume manager in PCMan FM causes 2 error messages to appear.  They are unreadable (the title bar says "Unable t" that's it).  An error like the one that follows appears in the the console (or whatever Eterm is) for each:
    (pcmanfm:3084): Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Error on line 1 char 57: '-' is not a valid character following a '<' character; it may not begin an element name
    After those a third message box appears and says: "Directory doesn't exist".  That box is not accompanied by any error text on the console.
    I assume the first to say something like "Unable to mount" but I don't know WHY.
    The problem does NOT occur if I mount it as root (using sudo) and access it that way.  This however then requires any further access to be made as root if anything useful is to be done with the drive (copying files, writing to it, etc.)
    I'm running Fluxbox as my WM, if that matters.
    Thanks in advance!

    Hmm...the wiki refers to files I don't have.  /etc/hal/fdi/policy and /etc/hal/fdi/information are both empty directories (even when viewed as root).  Any thoughts?
    I feel like an idiot now.  I should have guessed i needed to put those files in.
    Last edited by guitarMan666 (2009-04-22 03:22:36)

  • Getting list of internal partitions in volume manager (eg. thunar)

    It's always been an annoying point for me that I can't see the list of unmounted internal partitions (partitions on fixed hard drive, not removable) without some annoying fstab work. However, in other distros (where you don't have to do the grunt work yourself) it autodetects all the partitions and gives you a list in your volume manager but yet leaves them unmounted.
    I've tried to do some searching on the wiki here and over at gentoo, but wasn't able to find anything - maybe my keywords were incorrect or something. Can somebody point me the way?
    I'm using openbox and thunar+volman if it matters.

    Guess it's one of those things not possible with Thunar.. yet.
    Some searching suggests you're not the only one with this question.
    I found http://bbs.archlinux.org/viewtopic.php?id=80589 with a patch that shows the devices in the sidepane, but no (un)mounting from Thunar I'm afraid.

Maybe you are looking for

  • Photoshop CS4 and save as PDF

    Is there a way to make Photoshop CS4 save layers in a PDF that are accessible in Acrobat, InDesign, Illustrator? I had to do an ad layout for a weekly newspaper and when I saved it as a PDF from photoshop, it retained the layers as long as it was ope

  • IS Error Member load terminated with error in Essbase Integration Services

    Hi all, Please help! When i am trying to build the outline of a cube using Essbase Integration Services 9 it gives me the following error: IS Error Member load terminated with error Any replies - appreciated. Thanks in advance. Avishek Sarkar.

  • 3D content for iTunes and Apple TV!

    Is apple any closer to supplying 3D content to Apple TV owners and iTunes users? If not, then why not! Most of the forums that came up when I searched it were from 2011, now in the past two years 3D technology has changed as well as the amount of TV

  • Two great questions, bonus points for solving.

    The most important first, I cannot change any info on any of my songs. This is a real problem, since the volume balancer also does not work, and had to balance manually. Related issue, I cannot check the button to "not play while shuffling." Very imp

  • Dynamic in UI

    Hi, we are planning to develop an app for our plants in 23 different countries. Each country is using something about 10-20% the same process but there are country specific differences. Therefore we need a solution like the field control. We are goin