Microsoft Content Management Server - This operation requires the context of a Posting

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > April 2006 > This operation requires the context of a Posting





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author This operation requires the context of a Posting
Tom

2006-04-27, 7:27 am

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 not
be null.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
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 Url
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
Tim Pacl

2006-04-27, 7:27 am

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 not
> be null.
> Description: An unhandled exception occurred during the execution of the
> current web request. Please review the stack trace for more information about
> 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 Url
> 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

Tom

2006-04-27, 7:27 am

I see what you mean but.

So I go the root site and click "Switch To Edit". I then clikc new page.
So far so good. But when I clikc my new template, now I am getting "You
don't have permissions to view this page. 403 Access denied!

What can I try next?

Thanks

Tom


"Tim Pacl" wrote:
[vbcol=seagreen]
> 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:
>
Stefan [MSFT]

2006-04-27, 7:27 am

Hi Tom,

sounds as if your web application is in a different application pool than
the root of the website.
This is not allowed with MCMS.
Ensure that the application pool of your web application is identical with
the application pool of the website root.

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
Check out the new book as well: Advanced MCMS development:
http://tinyurl.com/8ugwj
----------------------


"Tom" <Tom@discussions.microsoft.com> wrote in message
news:21F1EC35-5AA9-4EE7-81F6-54F664CAEF2B@microsoft.com...[vbcol=seagreen]
>I see what you mean but.
>
> So I go the root site and click "Switch To Edit". I then clikc new page.
> So far so good. But when I clikc my new template, now I am getting "You
> don't have permissions to view this page. 403 Access denied!
>
> What can I try next?
>
> Thanks
>
> Tom
>
>
> "Tim Pacl" wrote:
>


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com