04-27-06 12:27 PM
Tom,
You are halfway there. Now browse to the channel where you wish to create a
new posting. If you haven't done so already, create a channel using Site
Manager. Now access the authoring console and switch to edit site mode. You
will now see an option to Create New Page. Select the template you created
and populate your content into the placeholder. Then save and approve.
The aspx file your template uses can't be opened directly when it has a
placeholder control because they must be in the CMS context or you get the
error you reported.
"Tom" wrote:
> I have created a new CMS enabled web applicaiotn in VS.NET 2003.
> I then created a new Template Gallery and added a new item to it called
> generic.
> I then added a new htmlplaceholder to it and checked it in to cms.
> I then associated this new Template Gallery Item to Home.aspx.
> On the home.aspx page I added a new htmlplaceholder to it.
> I then copiled the applicatoin.
>
> but when I run my applicaiton in the browser, I get this error.
>
> This operation requires the context of a Posting. The request must have a
> valid Posting Url or QueryString so that the CmsHttpContext.Posting will n
ot
> be null.
> Description: An unhandled exception occurred during the execution of the
> current web request. Please review the stack trace for more information ab
out
> the error and where it originated in the code.
>
> Exception Details:
> Microsoft.ContentManagement.WebControls.WebAuthorException: This operation
> requires the context of a Posting. The request must have a valid Posting U
rl
> or QueryString so that the CmsHttpContext.Posting will not be null.
>
> Source Error:
>
>
> Line 40: //
> Line 41: InitializeComponent();
> Line 42: base.OnInit(e);
> Line 43: }
> Line 44:
>
>
> Source File: c:\inetpub\wwwroot\pws\templates\home.aspx.cs Line: 42
>
>
> Can anyone assist?
>
> Thanks
>
> Tom
[ Post a follow-up to this message ]
|