Click here to Skip to main content
15,922,894 members
Home / Discussions / C#
   

C#

 
AnswerRe: string matching Pin
Ravi Bhavnani15-Jun-10 7:00
professionalRavi Bhavnani15-Jun-10 7:00 
AnswerRe: string matching [modified] Pin
Luc Pattyn15-Jun-10 7:05
sitebuilderLuc Pattyn15-Jun-10 7:05 
AnswerRe: string matching Pin
Dave Kreskowiak15-Jun-10 7:08
mveDave Kreskowiak15-Jun-10 7:08 
GeneralRe: string matching Pin
Luc Pattyn15-Jun-10 7:13
sitebuilderLuc Pattyn15-Jun-10 7:13 
GeneralRe: string matching Pin
arkiboys15-Jun-10 7:59
arkiboys15-Jun-10 7:59 
AnswerRe: string matching Pin
T M Gray15-Jun-10 8:34
T M Gray15-Jun-10 8:34 
GeneralRe: string matching Pin
arkiboys15-Jun-10 8:46
arkiboys15-Jun-10 8:46 
GeneralRe: string matching Pin
Luc Pattyn15-Jun-10 11:36
sitebuilderLuc Pattyn15-Jun-10 11:36 
GeneralRe: string matching Pin
arkiboys15-Jun-10 11:38
arkiboys15-Jun-10 11:38 
GeneralRe: string matching Pin
Luc Pattyn15-Jun-10 11:38
sitebuilderLuc Pattyn15-Jun-10 11:38 
QuestionSystem.IO.Exception Pin
MWRivera15-Jun-10 6:32
MWRivera15-Jun-10 6:32 
AnswerRe: System.IO.Exception Pin
J4amieC15-Jun-10 6:44
J4amieC15-Jun-10 6:44 
GeneralRe: System.IO.Exception Pin
MWRivera15-Jun-10 7:45
MWRivera15-Jun-10 7:45 
AnswerRe: System.IO.Exception Pin
Luc Pattyn15-Jun-10 7:10
sitebuilderLuc Pattyn15-Jun-10 7:10 
AnswerRe: System.IO.Exception Pin
yu-jian27-Jun-10 10:28
yu-jian27-Jun-10 10:28 
QuestionDataGrid Column: How to create simulated mouse click event or column header click event. Pin
roman_s15-Jun-10 5:26
roman_s15-Jun-10 5:26 
AnswerRe: DataGrid Column: How to create simulated mouse click event or column header click event. Pin
Henry Minute15-Jun-10 6:26
Henry Minute15-Jun-10 6:26 
QuestionRe: trapping F1 in a file dialog Pin
mla15415-Jun-10 4:30
mla15415-Jun-10 4:30 
AnswerRe: trapping F1 in a file dialog Pin
dan!sh 15-Jun-10 4:49
professional dan!sh 15-Jun-10 4:49 
GeneralRe: trapping F1 in a file dialog Pin
mla15415-Jun-10 5:12
mla15415-Jun-10 5:12 
GeneralRe: trapping F1 in a file dialog Pin
Dave Kreskowiak15-Jun-10 5:25
mveDave Kreskowiak15-Jun-10 5:25 
GeneralRe: trapping F1 in a file dialog [modified] Pin
mla15415-Jun-10 5:30
mla15415-Jun-10 5:30 
GeneralRe: trapping F1 in a file dialog Pin
Dave Kreskowiak15-Jun-10 7:05
mveDave Kreskowiak15-Jun-10 7:05 
GeneralRe: trapping F1 in a file dialog Pin
dan!sh 15-Jun-10 5:57
professional dan!sh 15-Jun-10 5:57 
QuestionCreating Calendar folders using WebDav and C# Pin
vonb15-Jun-10 4:10
vonb15-Jun-10 4:10 
Hello,

Creating one calendar folder (..\<account>\Calendar\<folder>) works without problems. (Using a MKCOL Query for IPF.Appointment).

However creating a sub-sub folder (needed for example dept/responsable/employee) it keeps giving me a "409 Conflict" Error from exchange. Creating the folder manually in outlook works fine.

Code is the following.

 string sUri = "http://ExchServer/Exchange/vonb/calendar/xxx"; //==>OK
//string sUri = "http://ExchServer/Exchange/vonb/calendar/xxx/yyy"; //==>Not OK even after the creation and 
//testing of the /xxx/ folder

	  
	        System.Uri myUri = new System.Uri(sUri);
	        HttpWebRequest HttpWRequest = (HttpWebRequest)WebRequest.Create(myUri);
	
	        string sQuery;
	        sQuery = "<?xml version='1.0'?>" + 
	          "<a:propertyupdate xmlns:a='DAV:' " + 
	          "xmlns:ex='http://schemas.microsoft.com/exchange/'>" + 
	          "<a:set><a:prop>" + 
	          "<ex:outlookfolderclass>IPF.Appointment</ex:outlookfolderclass>" + 
	          "</a:prop></a:set>" + 
	          "</a:propertyupdate>";
	
	        // Set Credentials
	        // TODO: Replace with appropriate user credentials
	        NetworkCredential myCred = new NetworkCredential(@"<myUser>", "<myPWD>");
	        CredentialCache myCredentialCache = new CredentialCache();
	        myCredentialCache.Add(myUri, "NTLM", myCred);
	        HttpWRequest.Credentials = myCredentialCache;
	
	        // Set Headers
	        HttpWRequest.KeepAlive = false; 
	        HttpWRequest.Headers.Set("Pragma", "no-cache");
	        HttpWRequest.ContentType =  "text/xml";
	        HttpWRequest.ContentLength = sQuery.Length;
	
	        //Set the request timeout to 5 minutes
	        HttpWRequest.Timeout = 300000;
	        // Set the request method
	        HttpWRequest.Method = "MKCOL";
	
	        // Store the data in a byte array
	        byte[] ByteQuery = System.Text.Encoding.ASCII.GetBytes(sQuery);
	        HttpWRequest.ContentLength = ByteQuery.Length;
	        Stream QueryStream = HttpWRequest.GetRequestStream();
	        // Write the data to be posted to the Request Stream
	        QueryStream.Write(ByteQuery,0,ByteQuery.Length);
	        QueryStream.Close();
	
	        // Send Request and Get Response
	        HttpWebResponse HttpWResponse = (HttpWebResponse)HttpWRequest.GetResponse();
	
	        // Get the Status code
	        int iStatCode =  (int)HttpWResponse.StatusCode;


Comes directly from MSDN, so should be fine

Any help would be apreciated, thanks

vonb

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.