Question about installation/security

Jun 28, 2007 at 3:52 PM
Hello,

I'm very excited about this project as it is a much needed web part in the MOSS world and I wouldn't even know where to begin to create something like this. I acknowledge right now that I am a complete beginner at all of this.

I installed the dll to the gac using gacutil and imported the dwp to a site using the gui in my test environment; changed the web.config for the portal; but when I try to use the uploaded web part, I am getting the error:
Unable to add selected web part(s). A Web Part or Web Form Control on this Page cannot be displayed or imported. The type is not registered as safe.

What am I missing here in the setup?

Thanks!
Mindy
Coordinator
Jun 29, 2007 at 12:29 AM
Mindy,
If you are getting this error then either the web.config change you made is not correct, or you changed the wrong web.config.

Please let me know what you did to find the web.config, and what did you change.

Ishai



mindy wrote:
Hello,

I'm very excited about this project as it is a much needed web part in the MOSS world and I wouldn't even know where to begin to create something like this. I acknowledge right now that I am a complete beginner at all of this.

I installed the dll to the gac using gacutil and imported the dwp to a site using the gui in my test environment; changed the web.config for the portal; but when I try to use the uploaded web part, I am getting the error:
Unable to add selected web part(s). A Web Part or Web Form Control on this Page cannot be displayed or imported. The type is not registered as safe.

What am I missing here in the setup?

Thanks!
Mindy

Jun 29, 2007 at 3:20 PM
Hi Ishai,

I found the web.config by going to the web site in IIS, right-clicking and choosing properties, then using the Local Path from the Home Directory Tab. Browsed to the Local Path and edited from there...

I added the following line to <Safe Controls>:
<SafeControl Assembly="ContentQueryOverride, Version=1.0.0.0, Culture=neutral, PublicKeyToken=03c4e6ed81288e59" Namespace="SharePointTips.WebParts" TypeName="*" Safe="True" />

I do have two front-ends with NLB, so I changed both of them and IISRESET both of them.

Did I miss anything?

Thanks!
Mindy
Jul 9, 2007 at 3:49 PM
Hello again,

I have downloaded beta version 2 and followed the directions to install. I insured that the Publishing feature was activated where needed, but there is no feature listed for the Enhanced CQWP.

Also, when I add the Enhanced CQWP to a page, I get the following message:
"Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Windows SharePoint Services-compatible HTML editor such as Microsoft Office SharePoint Designer. If the problem persists, contact your Web server administrator."

And when I try to modify the shared web part, I get the following error (with logging turned up):

Could not load XSL file. The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
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.SharePoint.WebPartPages.WebPartPageUserException: Could not load XSL file. The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

WebPartPageUserException: Could not load XSL file. The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
Microsoft.SharePoint.Publishing.WebControls.CmsDataFormWebPart.GetXslFile(String templateFileUrl) +271
Microsoft.SharePoint.Publishing.WebControls.CmsDataFormWebPart.PopulateDropDown(DropDownList ddl, String selectedValue, String xslUrl, String resourcePrefix) +96
Microsoft.SharePoint.Publishing.WebControls.CmsDataFormWebPart.PopulateItemDropDown(DropDownList ddl, String selectedValue) +53
Microsoft.SharePoint.Publishing.WebControls.ContentByQueryToolPart.populateItemStylesDropDown() +59
Microsoft.SharePoint.Publishing.WebControls.ContentByQueryToolPart.populateStylesControlGroup() +24
Microsoft.SharePoint.Publishing.WebControls.ContentByQueryToolPart.populateCBQControls() +80
Microsoft.SharePoint.Publishing.WebControls.ContentByQueryToolPart.CreateChildControls() +62
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +41
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360


Thanks,
Mindy
Jul 9, 2007 at 10:13 PM
I'm getting the same error as Mindy. It seems that the Enhanced CQWP xlst files were left out of the solution build.
Coordinator
Jul 11, 2007 at 9:36 AM
Honestly I don't understand why is this happening to you. Can you write step by step what you did, including what configuration is the site you are installing to? (is it a root site collection in the web application?)
Can you also check if the xslt files were deployed to the style sheet library in the root web site?
Jul 11, 2007 at 8:37 PM
Hi ishaisagi,

My environment is a farm with two front-end web servers using NLB, an index server, and a back-end SQL server (cluster in production, but I ran this install in DEV).
I did not try using it on a root site collection, but on a site within another site collection (based on a different site definition) in the same web application. Should be available everywhere though based on -allcontenturls though, right?

I'm not sure what the xslt files are supposed to be named, but I don't see anything new there.

I simply ran the batch file on one of the front end servers and then added the web part.

Mindy
Developer
Jul 12, 2007 at 9:30 PM
Edited Jul 12, 2007 at 9:30 PM
I made several updates to the project which will hopefully improve its stability. Try the new updated release (still under Beta 2 ... look for the updated solution) and let us know how it works for you. Be sure to uninstall the previous solution before installing this one.
Cheers,
Brian Culver
Jul 13, 2007 at 3:02 PM
Hi Brian,

Definitely moving in the right direction! I had to edit the install script to change http://localhost to the correct URL for my portal, probably because I'm not using the default web server. It installed fine and I am able to run the query for some sites without too much trouble.

There is one (important to me) site where I am getting an error: There was an error retrieving data to display in this Web Part.

I'm using the same list type and content types as on the other sites.

Can you point me in the right direction for troubleshooting this issue?

Thanks,
Mindy
Developer
Jul 15, 2007 at 8:03 AM
Have you tried using the Show Error option in the Web Part Settings?

This may shed some light on errors generated from within the web part. Also, a screenshot would be useful.
Finally, take a look at the log files usually located in the following location "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS"

Cheers,
Brian Culver
Jul 19, 2007 at 9:52 AM
Hi there,

I've got the same error as Mindy (Unable to display ...) when I try to convert a webpart to a XSLT Data view. Here is what I get in the logfile :

07/19/2007 11:40:13.00 w3wp.exe (0x1FC4) 0x1088 Windows SharePoint Services Web Parts 89a1 Monitorable Error while executing web part: System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.SharePoint.WebPartPages.BaseXsltDataWebPart.ResolveMondoCAMLParamValues(XsltArgumentList argList, BaseDdwRuntime runtime) at Microsoft.SharePoint.WebPartPages.DataFormWebPart.ResolveParameterValuesToXsl(ArgumentClassWrapper argList) at Microsoft.SharePoint.WebPartPages.DataFormWebPart.PrepareAndPerformTransform()

Any idea ?
Thanks for your help.
Coordinator
Jul 19, 2007 at 10:40 PM
Labarik - what are you talking about? what are you trying to do? "convert a webpart to a XSLT Data view."? what webpart? does this have anything to do with the enhanced content query web part?
Jul 20, 2007 at 9:30 AM
ishaisagi - A thousand sorries... no I do not think it's linked. At first I thought it was because I got the same error message but I think it's a common message.
Have you ever had this message ?
**********************
Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Windows SharePoint Services-compatible HTML editor such as Microsoft Office SharePoint Designer. If the problem persists, contact your Web server administrator.
**********************
I can tell you your help would be greatly appreciated as I'm pulling off my hair for a couple of weeks on that.
I get this message everytime I convert a document library or a link list to XSLT data view.
Again, I'm sorry about the post.
Dec 8, 2009 at 4:58 PM

Hi guys,

 

I'm not sure if this has been fixed but I have run across this error and have been able to solve it.

This post here covers most of the details: http://lbellows.blogspot.com/2009/12/there-was-error-retrieving-data-to.html

Apr 1, 2010 at 3:09 PM
Edited Apr 1, 2010 at 3:10 PM

 

 

 

  I am also still having this issue,

 

I have tried all the fixes above but to no avail,

 

If anyone has a solution to this please email me. As my head is about to explode!!!!

 

 

 

  Could not load XSL file. The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

Web Parts Maintenance Page: If you have permission, you can use this page to temporarily close Web Parts or remove personal settings. For more information, contact your site administrator.

Troubleshoot issues with Windows SharePoint Services.