Cann't edit the Portal Content

May 18, 2010 at 1:33 PM

Hi.

When pressing the edit button, a box appears with "An error has occurred while saving you content. Your changes have not been saved."

The user I’m logged in with, has the WebRole "Customer Portal Administrator" - the only one available. In the documentation, tree is mentioned.

Can anyone help?

Regards

Jacob Mondrup

May 18, 2010 at 5:16 PM

I'm nor clear on exactly what the error is. Can you please give me detailed repro stesps?

May 18, 2010 at 5:30 PM

The editing interface uses an oData feed on the system.  This is registered in the web.config as an app setting (Microsoft.Xrm.Portal.Web.CmsServiceBaseUri) and is defaulted to /Services/Cms.svc. The location is also protected in the web.config to the role "Customer Portal Administrators" (notice the plural).  The role provider is also required in order to validate the user is in the role. Finally, the website example has a /Services/Cms.svc file that is a single line that wires up the service based on your code-gen.  All of these components have to be in place for this to work.  Also note that .Net Framework 3.5 SP1 is also required as that is where the oData runtimes are defined in.

Please validate all of the above details, paying attention to anything you might have changed that deviates from the default.  Once you have done this, you can also try to hit the service with your browser directly.  If using IE, I would recommend turning off feed reading first, or using Firebug with Firefox to examine the request to the service.  If there is an error, the error message will likely be in the response to the /Services/Cms.svc file.

Good luck!

Shan McArthur
www.shanmcarthur.net

May 24, 2010 at 4:33 PM

I am receiving this same error.  Have done my best to verify the above mentioned settings.  User Web Role is set to Customer Portal Administrators, service is in default folder location and running .Net 3.5.1 on Windows Server 2008 R2.

Any additional information on what to check for this error?

May 25, 2010 at 12:16 AM

Can you paste in the error message that you captured with Fiddler or Firebug?  The error message on the /Services/Cms/svc file is the important error to read.

Thanks,
Shan

May 25, 2010 at 3:07 PM

I'm getting a Page not Found error on this line, the call to the Services/cms.svc.

http://"My Portal name"/Services/Cms.svc/adx_webpages(guid'd5ab6b76-8905-439d-bcd1-114302a696ce')/adx_copy

Textview of the error in Fiddler is long, any particular piece you need to see?

May 25, 2010 at 3:49 PM

If the page is an html rendering of page not found, then I don't need the page.  If there is an error on that page, I would need to see it.

There is a security limitation at the bottom of the web.config file on the service url, and it limits the call to the service to the role "Customer Portal Administrators".  Is your user authenticated, and are they in that exact role name?  If you have customized your role name in CRM, you will also have to change the rule in the web.config to match.

Shan

May 25, 2010 at 3:58 PM

It is a html Page not Found.  My contact record is in the Customer Portal Administrators (plural) web role, the default that came with the accelerator.  I have done no customization.  My user is authenciated.  When I log into the portal, I see the edit boxes available.

May 25, 2010 at 5:38 PM

If you see the edit buttons, you are authenticated, so that is good.  Try commenting out the <location> node in the web.config and see if that fixes the problem.  The service is a physical file in the project folder, so I cannot think of another reason that you would get a 404, except that the locations node is restricting access to it.

Shan

May 25, 2010 at 7:22 PM

Commenting out the entire locations block, which includes the authorization section, had no effect on the error.  I commented out just the location lines, leaving the authorization section active and it produced an unformatted home page which I was not able to login too.

I did verified the cms.svc file exists under the Services folder.

This is the first few line from the Fiddler error.  I have replace my portal name with "My Portal Name".  Not sure if this will help or not.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 
 <head><title>
 Page Not Found
</title><link rel="stylesheet" type="text/css" href="/css/base.css" /><link rel="stylesheet" type="text/css" href="/css/eservices.css" /><link rel="stylesheet" type="text/css" href="/css/settings.css.aspx" /><link rel="stylesheet" type="text/css" href="/css/print.css" media="print" /><link href="http://yui.yahooapis.com/combo?2.8.0r4/build/assets/skins/sam/skin.css" rel="stylesheet" type="text/css" /><link href="/xrm/css/editable.css" rel="stylesheet" type="text/css" /></head>
 <body>
  <form name="aspnetForm" method="post" action="/Default.aspx?404;http://"My Portal Name:80/Services/Cms.svc/adx_webpages(guid'd5ab6b76-8905-439d-bcd1-114302a696ce')/adx_copy" id="aspnetForm">

May 25, 2010 at 9:07 PM

That is definately the managed 404 page.  The only other thing I can think of that might be causing an issue is that WCF is not set up properly on your workstation.  The portal requires .Net 3.5 Framework SP1 installed on your workstation, and for WCF to function, you also have to have WCF HTTP activation enabled on your workstation.

Shan

May 25, 2010 at 10:51 PM

That was it.  On my web server (Windows 2008 R2) I had the .NET 3.5.1 feature loaded, but did not have the WCF sub-features (http and non-http) under the .Net 3.5.1 feature loaded.

Enabling them corrected the issue.

Thanks for the assistance.

Jun 1, 2010 at 5:30 AM
I add a similar issue, but I had WCF sub-features installed. Turns out my issue involved having multiple IIS bindings on the website. I had the internal binding of http://servername:12345 but had another binding of http://portal.domain.com. I fixed this issue by adding the following to the web.config file under the <serviceHostingEnvironment> tag: <baseAddressPrefixFilters> <add prefix="http://portal.domain.com"/add> </baseAddressPrefixFilters> Hope this helps people out.
Jun 1, 2010 at 4:14 PM

Yes, WCF (previous to version 4) has a limitation of only being able to bind to a single binding in IIS, and multiple host-headers on a site require special configuration of the service to ensure that WCF can still function.  Thanks for documenting the solution as I am certain it will help some other people.  Just remember to bind to the domain that you want the CMS interfaces to function on. 

The good news is that the WCF team has finally resolved this problem in WCF with .Net 4.0 and WCF services can now be hosted in regular hosting environments with multiple bindings to the website.

Shan

Jun 18, 2010 at 9:12 PM

When I added <baseAddressPrefixFilters> <add prefix="http://portal.domain.com"/> </baseAddressPrefixFilters> to my web.config, I am receiving this error: 500 - Internal server error.

thanks for your help

Jun 18, 2010 at 10:17 PM

I already got over above error.

My real problem is that I have no .Net framework 3.5 in my features. I have only .Net framework 3.0. My operating system is Windows Server Datacenter Service Pack 2.

I appreciate your help

 

Jun 18, 2010 at 11:35 PM

The portal requires .Net Framework 3.5 SP1.  This is an additive framework that you can download from Microsoft and safely add to your existing operating system.

Shan

Jun 18, 2010 at 11:41 PM
Ok, Shan

.Net Framework 3.5 SP1 I have already installed, but this does not appear in my features.

Thanks

RC.-






From: [email removed]
To: [email removed]
Date: Fri, 18 Jun 2010 15:35:30 -0700
Subject: Re: Cann't edit the Portal Content [customerportal:213015]

From: shan_mcarthur
The portal requires .Net Framework 3.5 SP1. This is an additive framework that you can download from Microsoft and safely add to your existing operating system.
Shan
Read the full discussion online.
To add a post to this discussion, reply to this email (customerportal@discussions.codeplex.com)
To start a new discussion for this project, email customerportal@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Discover the new Windows Vista Learn more!
Jun 18, 2010 at 11:55 PM

The .Net 3.5 Framework with SP 1 does not show up in your features list.  You will see .Net Framework 3.5 in your control panel | Programs list.

Jun 21, 2010 at 9:45 PM
That's fine, but I can not edit the Portal Content .

There is something else I should check?


Regards

RC.-






From: [email removed]
To: [email removed]
Date: Fri, 18 Jun 2010 15:55:30 -0700
Subject: Re: Cann't edit the Portal Content [customerportal:213015]

From: shan_mcarthur
The .Net 3.5 Framework with SP 1 does not show up in your features list. You will see .Net Framework 3.5 in your control panel | Programs list.
Read the full discussion online.
To add a post to this discussion, reply to this email (customerportal@discussions.codeplex.com)
To start a new discussion for this project, email customerportal@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Discover the new Windows Vista Learn more!
Jun 21, 2010 at 9:49 PM

If you run fiddler and capture the request and response to the /Services/cms.svc file, what error message does it give in the response?  I need to see something more than a generic 500 error message.  The details should either be in the response, or perhaps in your windows event log.

Shan

Jun 21, 2010 at 9:55 PM
This is the detailed error:

Log Name: Application
Source: System.ServiceModel 3.0.0.0
Date: 6/21/2010 4:22:09 PM
Event ID: 3
Task Category: WebHost
Level: Error
Keywords: Classic
User: NETWORK SERVICE
Computer: mycomputer.domain
Description:
WebHost failed to process a request.
Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/28044935
Exception: System.ServiceModel.ServiceActivationException: The service '/Services/Cms.svc' cannot be activated due to an exception during compilation. The exception message is: This collection already contains an address with scheme http. There can be at most one address per scheme in this collection.
Parameter name: item. ---> System.ArgumentException: This collection already contains an address with scheme http. There can be at most one address per scheme in this collection.
Parameter name: item
at System.ServiceModel.UriSchemeKeyedCollection.InsertItem(Int32 index, Uri item)
at System.Collections.Generic.SynchronizedCollection`1.Add(T item)
at System.ServiceModel.UriSchemeKeyedCollection..ctor(Uri[] addresses)
at System.ServiceModel.ServiceHost..ctor(Type serviceType, Uri[] baseAddresses)
at System.ServiceModel.Web.WebServiceHost..ctor(Type serviceType, Uri[] baseAddresses)
at System.Data.Services.DataServiceHostFactory.CreateServiceHost(Type serviceType, Uri[] baseAddresses)
at System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
--- End of inner exception stack trace ---
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath)
Process Name: w3wp
Process ID: 3120
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="System.ServiceModel 3.0.0.0" />
<EventID Qualifiers="49154">3</EventID>
<Level>2</Level>
<Task>5</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2010-06-21T20:52:09.000Z" />
<EventRecordID>7798</EventRecordID>
<Channel>Application</Channel>
<Computer>crmserver.wau.local</Computer>
<Security UserID="S-1-5-20" />
</System>
<EventData>
<Data>System.ServiceModel.ServiceHostingEnvironment+HostingManager/28044935</Data>
<Data>System.ServiceModel.ServiceActivationException: The service '/Services/Cms.svc' cannot be activated due to an exception during compilation. The exception message is: This collection already contains an address with scheme http. There can be at most one address per scheme in this collection.
Parameter name: item. ---> System.ArgumentException: This collection already contains an address with scheme http. There can be at most one address per scheme in this collection.
Parameter name: item
at System.ServiceModel.UriSchemeKeyedCollection.InsertItem(Int32 index, Uri item)
at System.Collections.Generic.SynchronizedCollection`1.Add(T item)
at System.ServiceModel.UriSchemeKeyedCollection..ctor(Uri[] addresses)
at System.ServiceModel.ServiceHost..ctor(Type serviceType, Uri[] baseAddresses)
at System.ServiceModel.Web.WebServiceHost..ctor(Type serviceType, Uri[] baseAddresses)
at System.Data.Services.DataServiceHostFactory.CreateServiceHost(Type serviceType, Uri[] baseAddresses)
at System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
--- End of inner exception stack trace ---
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath)</Data>
<Data>w3wp</Data>
<Data>3120</Data>
</EventData>
</Event>


RC.-






From: [email removed]
To: [email removed]
Date: Mon, 21 Jun 2010 13:49:10 -0700
Subject: Re: Cann't edit the Portal Content [customerportal:213015]

From: shan_mcarthur
If you run fiddler and capture the request and response to the /Services/cms.svc file, what error message does it give in the response? I need to see something more than a generic 500 error message. The details should either be in the response, or perhaps in your windows event log.
Shan
Read the full discussion online.
To add a post to this discussion, reply to this email (customerportal@discussions.codeplex.com)
To start a new discussion for this project, email customerportal@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Discover the new Windows Vista Learn more!
Jun 21, 2010 at 11:06 PM

This is a limitation of WCF 3, of which is used by the portal.  WCF can only be bound by one scheme, which means that you cannot use multiple host headers on the site, or multiple protocols (http and https).  You can use WCF configuration to bind it to a single scheme, but note that the scheme has to match your website configuration.  I would recommend validating that your host header on the website matches the domain name you put in the web.config. 

The solution will be standard WCF, it has nothing to do with the portals, so I would recommend looking at the WCF forums for a solution.  Here is a similar error and potential solution for you: http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/cf8d0056-d0ec-4527-b522-6e0cafd6ff9d

Shan

Jun 21, 2010 at 11:16 PM
Thanks, Shank

I'm going to try this!


RC.-






From: [email removed]
To: [email removed]
Date: Mon, 21 Jun 2010 15:06:30 -0700
Subject: Re: Cann't edit the Portal Content [customerportal:213015]

From: shan_mcarthur
This is a limitation of WCF 3, of which is used by the portal. WCF can only be bound by one scheme, which means that you cannot use multiple host headers on the site, or multiple protocols (http and https). You can use WCF configuration to bind it to a single scheme, but note that the scheme has to match your website configuration. I would recommend validating that your host header on the website matches the domain name you put in the web.config.
The solution will be standard WCF, it has nothing to do with the portals, so I would recommend looking at the WCF forums for a solution. Here is a similar error and potential solution for you: http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/cf8d0056-d0ec-4527-b522-6e0cafd6ff9d
Shan
Read the full discussion online.
To add a post to this discussion, reply to this email (customerportal@discussions.codeplex.com)
To start a new discussion for this project, email customerportal@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Connect to the next generation of MSN Messenger  Get it now!
Jun 22, 2010 at 12:22 AM
Problem Solved

thank you very much.

RC.-





From: [email removed]
To: [email removed]
Date: Mon, 21 Jun 2010 15:06:30 -0700
Subject: Re: Cann't edit the Portal Content [customerportal:213015]

From: shan_mcarthur
This is a limitation of WCF 3, of which is used by the portal. WCF can only be bound by one scheme, which means that you cannot use multiple host headers on the site, or multiple protocols (http and https). You can use WCF configuration to bind it to a single scheme, but note that the scheme has to match your website configuration. I would recommend validating that your host header on the website matches the domain name you put in the web.config.
The solution will be standard WCF, it has nothing to do with the portals, so I would recommend looking at the WCF forums for a solution. Here is a similar error and potential solution for you: http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/cf8d0056-d0ec-4527-b522-6e0cafd6ff9d
Shan
Read the full discussion online.
To add a post to this discussion, reply to this email (customerportal@discussions.codeplex.com)
To start a new discussion for this project, email customerportal@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Explore the seven wonders of the world Learn more!