Could not load file or assembly 'CuteWebUI.AjaxUploader' or one of its dependencies. The system cannot find the file specified

Last post 05-06-2016, 12:45 PM by miladDev. 1 replies.
Sort Posts: Previous Next
  •  05-06-2016, 10:28 AM 83299

    Could not load file or assembly 'CuteWebUI.AjaxUploader' or one of its dependencies. The system cannot find the file specified

    Hello,

     

    We have added an ajax-uploader to our (web-forms) project, and we have added the below settings in the web.config under the configuration node.

    <system.webServer>

        <modules>

          <add name="CuteWebUI.UploadModule" type="CuteWebUI.UploadModule,CuteWebUI.AjaxUploader" />

        </modules>

     

    We are running in integrated mode in IIS and are on .NET 4.5.  The page that we added the ajax-uploader is a new page, and the page works fine without issues, and we are able to drag & drop and also attach by hitting browse.

     

    The issue we are having is with other pages that already exist in the application.  Any calls to our existing Web API services in the other pages in the same application/project are throwing the below error when the above setting is the config.  When we remove the above setting from the web.config, the Web API service calls work again, however, the drag & drop and browse no longer works from our new page.

     

    Anyone have any thoughts as to why the below would start occuring on service calls that are on other pages within the application?  I am guessing this is a configuration issue, and would be interested to hear thoughts/suggestions. 

    Could not load file or assembly 'CuteWebUI.AjaxUploader' or one of its dependencies. The system cannot find the file specified.

    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: System.IO.FileNotFoundException: Could not load file or assembly 'CuteWebUI.AjaxUploader' or one of its dependencies. The system cannot find the file specified.

     

    Thank you in advance 

  •  05-06-2016, 12:45 PM 83301 in reply to 83299

    Re: Could not load file or assembly 'CuteWebUI.AjaxUploader' or one of its dependencies. The system cannot find the file specified

    we have resolved this issue.  It stems from the fact that the web api services were configured as virtual applications in IIS under the main application, which we were adding the ajax uploader.  As such, the child services were picking up the config settings of the main project, because of .NET config inheritance.

     

    As a result, we had to add this around the system.webserver node of the config, to prevent the settings from cascading down to the child services. 

     

    <!--this prevents this section of config settigns from cascading down to child apps -->

    <location path="." inheritInChildApplications="false">

      <system.webServer>   

        <modules>     

            <add name="CuteWebUI.UploadModule" type="CuteWebUI.UploadModule,CuteWebUI.AjaxUploader" />     

        </modules>

    </system.webServer>

      </location>   

View as RSS news feed in XML