Please go through below code.
I am trying to create a page called Subpage_1 under the page Page_Title . Please tell me what is the problem with this code, when i execute this code in vs2005 it gives the following exception messages and it is not creating a page.
1. A first chance exception of type 'MindTouch.Dream.DreamResponseException' occurred in mindtouch.dream.dll
2. 'MindTouch.Dream.Plug.Get()' is obsolete: 'This method is thread-blocking. Please avoid using it if possible.' C:\Users\Abhijit\Documents\Visual Studio 2005\Projects\WindowsApplication3\WindowsApplicati on3\Form1.cs
3. 'MindTouch.Dream.Plug.Post(MindTouch.Dream.DreamMe ssage)' is obsolete: 'This method is thread-blocking. Please avoid using it if possible.' C:\Users\Abhijit\Documents\Visual Studio 2005\Projects\WindowsApplication3\WindowsApplicati on3\Form1.cs 29 18 WindowsApplication3
Code:using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using MindTouch; using MindTouch.Dream; namespace WindowsApplication3 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { } private void button1_Click(object sender, EventArgs e) { try { Plug p = Plug.New("http://localhost"); p.At("users", "authenticate").WithCredentials("Abhijit", "13111985").Get(); DreamMessage msg = DreamMessage.Ok(MimeType.TEXT, "<h2>Section 1</h2>Section 1 text<h2>Section2</h2>Section 2 text"); p.At("=Page_Title%252fSubpage_1", "contents").With("abort", "exists").Post(msg); } catch { Console.Write("Something error"); } } } }
I am using localhost as my default mindtouch server, with username as Abhijit and Password as 13111985.


Reply With Quote