Reference error when use Microsoft.Web.Preview.UI.Controls.WebParts.WebPartManager, please help.

Rate It (1)

Last post 11-10-2006 1:33 PM by axshon. 7 replies.

Sort Posts:

  • Reference error when use Microsoft.Web.Preview.UI.Controls.WebParts.WebPartManager, please help.

    10-23-2006, 3:23 AM
    • Contributor
      3,349 point Contributor
    • wyx2000
    • Member since 11-25-2002, 11:43 AM
    • Posts 808

    After I installed the value-add and build my webpartmanager on Microsoft.Web.Preview.UI.Controls.WebParts.WebPartManager, I get error

    Could not load file or assembly 'Microsoft.Web.Resources.ScriptLibrary.PreviewDragDrop.js' or one of its dependencies. The system cannot find the file specified.

    Stack Trace:

    [FileNotFoundException: Could not load file or assembly 'Microsoft.Web.Resources.ScriptLibrary.PreviewDragDrop.js' or one of its dependencies. The system cannot find the file specified.]
       System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
       System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +211
       System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +141
       System.Reflection.Assembly.Load(String assemblyString) +25
       Microsoft.Web.UI.AssemblyCache.Load(String assemblyName) +70
       Microsoft.Web.UI.ScriptReference.GetUrlFromName(ScriptManager scriptManager, IControl scriptManagerControl) +168
       Microsoft.Web.UI.ScriptReference.GetUrl(ScriptManager scriptManager, IControl scriptManagerControl) +808
       Microsoft.Web.UI.ScriptControlManager.RegisterScriptsForScriptReferences(IEnumerable`1 scriptReferences, Control control) +147
       Microsoft.Web.UI.ScriptControlManager.RegisterScriptsForScriptControls() +154
       Microsoft.Web.UI.ScriptManager.OnPreRender(EventArgs e) +395
       System.Web.UI.Control.PreRenderRecursiveInternal() +77
       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
    

    any idea what causes this error?

     

    thanks

  • Re: Reference error when use Microsoft.Web.Preview.UI.Controls.WebParts.WebPartManager, please help.

    10-25-2006, 11:09 PM
    • Member
      5 point Member
    • geoffakens
    • Member since 10-26-2006, 2:53 AM
    • Posts 1

    I'm seeing the same thing.  To keep things simple and ensure it wasn't some issue with my more complex project, I created a new project from the 'ASP.NET AJAX-Enabled Web Site' template.  Then I added the following to my web.config file:

    <system.web>
        <pages>
           <controls>
              ...
              <add namespace="Microsoft.Web.Preview.UI.Controls.WebParts" assembly="Microsoft.Web.Preview" tagPrefix="ajax"/>
           </controls>
           ...
        </pages>
        ...
    </system.web>

     Next, I added the following to my Default.aspx page:

    <ajax:WebPartManager ID="TheManager" runat="server" />
    
    <ajax:WebPartZone ID="TheZone" runat="server">
        <ZoneTemplate>
            <asp:Calendar ID="TheCalendar" runat="server"></asp:Calendar>
        </ZoneTemplate>
    </ajax:WebPartZone>

     Finally, I added a reference to the Microsoft.Web.Preview.dll to my project.

    With the above code, I get the error you're getting.  However, if I change the 'ajax' tag prefix to 'asp' and use the System.Web.UI.WebControls.WebParts classes instead, it all works fine.  Seems like the AJAX-enabled versions are broken in the beta release.  They worked fine in the July CTP. 

  • Re: Reference error when use Microsoft.Web.Preview.UI.Controls.WebParts.WebPartManager, please help.

    10-26-2006, 4:30 AM
    • Member
      100 point Member
    • flaxon
    • Member since 07-18-2004, 9:01 AM
    • Posts 20

    For the WebParts look here: http://forums.asp.net/thread/1437920.aspx

    However, have you tried remapping the WebPartManger and WebPartsZone controls in web.config (like it was in CTP 07)?

  • Re: Reference error when use Microsoft.Web.Preview.UI.Controls.WebParts.WebPartManager, please help.

    10-26-2006, 12:42 PM
    • Member
      194 point Member
    • chenriks
    • Member since 09-27-2006, 5:07 PM
    • Redmond, WA
    • Posts 50
    • AspNetTeam
    The 10/20 Preview release has a bug where the web part controls register the required scripts (Preview, DragDrop, WebPart) improperly.  The bug had been fixed internally, but somehow didn't get into the release.  Unfortunately, there's not a workaround.
    Christy Henriksson
    ASP.NET Team
  • Re: Reference error when use Microsoft.Web.Preview.UI.Controls.WebParts.WebPartManager, please help.

    10-26-2006, 3:52 PM
    • Member
      100 point Member
    • flaxon
    • Member since 07-18-2004, 9:01 AM
    • Posts 20
    Do you plan to update the current release soon?
  • Re: Reference error when use Microsoft.Web.Preview.UI.Controls.WebParts.WebPartManager, please help.

    11-07-2006, 5:23 AM
    • Member
      50 point Member
    • paulecoyote
    • Member since 07-31-2006, 10:38 AM
    • Dorset / Hampshire, Uk
    • Posts 10

    I wish I had found this thread BEFORE I tried to upgrade, having spent days trying to figure out what I was doing wrong and making all those namespace and classname changes. Now I either have to roll back my installation to a previous version or drop Atlas / Ajax extensions altogether. 

     I attempted the upgrade to try and sort out this issue:

    <a href="http://forums.asp.net/thread/1412888.aspx">http://forums.asp.net/thread/1412888.aspx</a>

    paulecoyote:

    Microsoft.Web.UI.ScriptManager needs to be changed to fix this problem with controls that must be declared early on in the page cycle but aren't rendered in the end, as the client script asserts because it tries to find things that are not actually there. 

    I cannot effectively extend ScriptManager because:

    • _scriptControls is private, and there are no property accessor or mutators protected or public that I can use to update the collection
    • IScriptControlContainer only has RegisterControl, and no mirror UnregisterControl method - which would seem to be the best place to put UnRegisterControl if it were to be implemented.
    • IScriptManager is an internal interface, so that means I can't inherit that from a seperate assembly

    Is this the right forum to post in to get the attention of Atlas developers?  Is there some other way I should submit this change request? 

  • Re: Reference error when use Microsoft.Web.Preview.UI.Controls.WebParts.WebPartManager, please help.

    11-07-2006, 9:01 AM
    • Member
      40 point Member
    • zati
    • Member since 06-26-2006, 10:10 AM
    • Posts 10
    it is now fixed in Beta 2 :)
  • Re: Reference error when use Microsoft.Web.Preview.UI.Controls.WebParts.WebPartManager, please help.

    11-10-2006, 1:33 PM
    • Member
      10 point Member
    • axshon
    • Member since 03-08-2006, 7:47 AM
    • Baltimore MD
    • Posts 2

    I am currently running the latest beta for asp ajax, IE7, Office 2003 and Office 2007 latest beta. Perhaps of note also, I currently cannot install .net framework 1.1 Sp1. Windows update fails with no message. 

    When I add the following to my master page script manager per another thread:

    <

    asp:ScriptManager ID="ScriptManager1" runat="server">

    <Scripts>

    <asp:ScriptReference Assembly="Microsoft.Web.Preview" Name="Microsoft.Web.Resources.ScriptLibrary.PreviewScript.js" />

    <asp:ScriptReference Assembly="Microsoft.Web.Preview" Name="Microsoft.Web.Resources.ScriptLibrary.PreviewGlitz.js" />

    <asp:ScriptReference Assembly="Microsoft.Web.Preview" Name="Microsoft.Web.Resources.ScriptLibrary.PreviewDragDrop.js" />

    </Scripts>

    </

    asp:ScriptManager>

     I get the following errors:

    Could not load file or assembly 'Microsoft.Web.Preview' or one of its dependencies. The system cannot find the file specified.

    _____________________________________
    Character Counts. Do the right thing.
Page 1 of 1 (8 items)