CodeVerge.Net Beta
Login Idy
Register Password
  Forgot?
   Explore    Item Entry    Profile    Invite   History    Resources   SiteMap  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML




Zone: > newsgroup > asp.net forum > microsoft_downloads.css_friendly_control_adapters Tags:
Item Type: NewsGroup Date Entered: 1/15/2008 3:12:29 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 6 Views: 27 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
7 Items, 1 Pages 1 |< << Go >> >|
Flo_
Asp.Net User
Problems to adopt menu adapters on menu control1/15/2008 3:12:29 PM

0/0

Hello,

at the moment I'm working on a moss 2007 project where I want to use CSS Friendly Adapters especially for the menu control to render table-free HTML code. After some experimentation I got the adapter running and every SharePoint menu control renders table free HTML code. Unfortunately I also ran into some problems, as the adapter adopts on each menu control unless its "AdatperEnabled" attribute is set to false. According to this also the menu within the administrative area of SharePoint are affected. As I don't want to alter any css file or master page of the admin area, I'm not pleased with this situation.

To avoid this behavior I tried to adopt the adapters on only a special type of menu control. Therefore I downloaded MossMenu, (Link) the soruce code of the sealed AspMenu class, that allows me to build my own a menu control or simply the MossMenu class/control. After my understanding of the CSS Friendly Adapters it should be possible to alter the .browser-file in this way that the css friendly menu adapter is only adopted to the new build MossMenu control and that all other menus like SharePoint:Menu are unaffected by the adapter.

But also here I ran into some problems. The MossMenu control on its own works perfect and shows the same behavior as the normal SharePoint:Menu control. But every time I try to apply the menu adapter to the MossMenu control due the settings in the browser file, I got the error message "Could not load type 'Moss.SharePoint.Controls.MossMenu'." At the moment I don't really know why the MossMenu class could not be found, as it is in the Windows assembly and also registered in the web.config within the safe control area. Would there be any mistake the MossMenu shouldn't run at all. I also double checked the name spaces etc but couldn't find any mistakes. This becomes more and more strange as I already said, the MossMenu control on its own works perfect.

I would be glad for any tip or hint which helps me solve my problem as I can't find many information regarding my problem.

 

Best regards,

Flo
 

MikeJ83
Asp.Net User
Re: Problems to adopt menu adapters on menu control1/17/2008 1:27:29 AM

0/0

Compile MossMenu into a DLL, strongly name it, then add it to your bin directory and put it in your SafeControls section of the web.config. You will probably also need to put it in the GAC.

Flo_
Asp.Net User
Re: Problems to adopt menu adapters on menu control1/17/2008 9:18:37 AM

0/0

MikeJ83:

Compile MossMenu into a DLL, strongly name it, then add it to your bin directory and put it in your SafeControls section of the web.config. You will probably also need to put it in the GAC.

I think I've already done all the things you mentioned. I compiled MossMenu into an dll using .NET-Framework 2.0. I strongly named it by singing it with my key and I put the dll into both directories, into "_app_bin" of the application and into the GAC. But I got still the same response from MOSS:

 Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not load type 'Moss.SharePoint.Controls.MossMenu'.

Source Error:

Line 2:    <browser refID="Default">
Line 3: <controlAdapters>
Line 4: <adapter controlType="Moss.SharePoint.Controls.MossMenu" adapterType="CSSFriendly.MenuAdapter, CSSFriendlyAdapters, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a9f3335dc30fe83c" />
Line 5: </controlAdapters>
Line 6: </browser>

[HttpException]: Could not load type 'Moss.SharePoint.Controls.MossMenu'.
at System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
at System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase)
[ConfigurationErrorsException]: Could not load type 'Moss.SharePoint.Controls.MossMenu'. (C:\Inetpub\wwwroot\wss\VirtualDirectories\8084\App_Browsers\CSSFriendlyAdapters.browser line 4)
at System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase)
at System.Web.Configuration.BrowserDefinition.CheckType(String typeName, Type baseType, XmlNode child)
at System.Web.Configuration.BrowserDefinition.ProcessControlAdaptersNode(XmlNode node)
at System.Web.Configuration.BrowserDefinition..ctor(XmlNode node, Boolean isDefaultBrowser)
at System.Web.Configuration.BrowserCapabilitiesCodeGenerator.ProcessBrowserNode(XmlNode node, BrowserTree browserTree)
at System.Web.Configuration.BrowserCapabilitiesCodeGenerator.ProcessBrowserFiles(Boolean useVirtualPath, String virtualDir)
at System.Web.Compilation.ApplicationBrowserCapabilitiesCodeGenerator.GenerateCode(AssemblyBuilder assemblyBuilder)
at System.Web.Compilation.AssemblyBuilder.AddBuildProvider(BuildProvider buildProvider)
[HttpParseException]: Could not load type 'Moss.SharePoint.Controls.MossMenu'. (C:\Inetpub\wwwroot\wss\VirtualDirectories\8084\App_Browsers\CSSFriendlyAdapters.browser line 4)
at System.Web.Compilation.AssemblyBuilder.AddBuildProvider(BuildProvider buildProvider)
at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders()
at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
at System.Web.Compilation.BrowserCapabilitiesCompiler.GetBrowserCapabilitiesType()
at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()
[HttpException]: Could not load type 'Moss.SharePoint.Controls.MossMenu'. (C:\Inetpub\wwwroot\wss\VirtualDirectories\8084\App_Browsers\CSSFriendlyAdapters.browser line 4)
at System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()
at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()
at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters)
[HttpException]: Could not load type 'Moss.SharePoint.Controls.MossMenu'. (C:\Inetpub\wwwroot\wss\VirtualDirectories\8084\App_Browsers\CSSFriendlyAdapters.browser line 4)
at System.Web.HttpRuntime.FirstRequestInit(HttpContext context)
at System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)
at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)

 

I also double checked the namespaces and I'm pretty sure that they are correct. The namespace shown in the MossMenu Project properties says "Moss.SharePoint.Controls", so the code in line 4 should be correct. The really strange thing is that each component on its own works just perfect. I could adapt the CSS Friendly MenuAdapter onto the standard SharePoint:Menu controls and I could also use the MossMenu control within any SharePoint site (without applying the adapter). But applying the CSS Friendly MenuAdapter on to the MossMenu leads to the error shown above.

So I relay don't know what else I could do to get the CSS Friendly MenuAdapter working on the MossMenu.

 Every tip or hint is welcome.
 

MikeJ83
Asp.Net User
Re: Problems to adopt menu adapters on menu control1/17/2008 6:31:54 PM

0/0

You want to put the dll in you bin folder, not _app_bin. Like this:
C:\Inetpub\wwwroot\wss\VirtualDirectories\SharePointSite\bin\MossMenu.dll

You will also need to give it appropriate permissions. I'm not sure what the correct permissions are, so I just gave "Everyone" read and execute access on the directory. Probably not a best practice, but it works.

HTH,

-Mike

MikeJ83
Asp.Net User
Re: Problems to adopt menu adapters on menu control1/17/2008 6:38:07 PM

0/0

You will probably also need to add a <SafeControl... entry to the web.config (If you haven't done so already).

Flo_
Asp.Net User
Re: Problems to adopt menu adapters on menu control1/18/2008 8:58:46 AM

0/0

Hello Mike,

I want to say thank you for your great help and all the tips and hints you gave me. Obviously copying the MossMenu.dll into the bin directory got things going. It just works great.

But know I have one last question. What is the difference between the "_app_bin" and "bin" directory? Am I right when I say, the "_app_bin" directory is only for stuff like WebParts and  Features?

 

So an big thank you one more time. You really helped me with your tips.

 

Best regards,

Flo
 

MikeJ83
Asp.Net User
Re: Problems to adopt menu adapters on menu control1/21/2008 3:22:29 AM

0/0

Glad I could help, I was having the same problem recently :)

According to the WSS SDK, you must install WebParts only to the bin directory, never the _app_bin. However, according to the MOSS SDK, installing to _app_bin is just fine. I'm not very clear on how/why SharePoint treats the two directories differently, perhaps someone who knows can chime in...

-Mike

7 Items, 1 Pages 1 |< << Go >> >|



Search This Site:





Other Resources:
control placement - general_asp.net.faq_frequently_asked_questions ... control placement, > ROOT > NEWSGROUP > Asp.Net Forum > general_asp.net. ... problems to adopt menu adapters on menu control. open a link in the content ...
Roadmap to Control on the other hand, require a null-modem cable or adapter in order to make each ... external control, such as specific menu settings. ...
IBM, Sun, and Dell adopt InfiniBand technology | Geek.com InfiniBand host channel adapters will also be available for existing servers, ... they do not have "enough control over" does not deserve to be invested in. ...
Excit@Home Blues Open the TCP/IP control panel under the Apple menu. Use the Edit menu to go into Advanced Mode. ... Choose your Ethernet adapter in the pull-down menu. ...
ASP.NET 2.0: Enforce Web Standards For Better Accessibility To remedy these problems, URLs should be organized according to ... 7 Menu Control Adapter HTML ... It can be challenging to adopt these standards because it is ...
Flicker Fix ... are using the CSS Friendly ASP.NET Control Adapters you will find it helpful to ... to adopt a simple policy of using PersistantImage.ashx for all of the menu ...
 
All Times Are GMT