MVC error

Last post 12-08-2010, 8:40 AM by Eric. 2 replies.
Sort Posts: Previous Next
  •  12-08-2010, 3:15 AM 65323

    MVC error

    I tried to use the ajax uploader control in my project, but when I open the page I get an script error. I use visual studio 2008 on my workstation with Windows 7. The project is in MVC 2.0
     
    See listing below for error in cursive 
     

    <!-- input type='hidden' id='myuploader' name='myuploader' -->

     

    <script type='text/javascript' src='/CuteWebUI.AjaxUploader.ashx?type=script&amp;_ver='></script><input type='hidden' id='myuploader' name='myuploader' autocomplete='off' /><img id='myuploader_Loader' UniqueID='myuploader' Namespace='CuteWebUI' PageUpload='1' src='/CuteWebUI.AjaxUploader.ashx?type=file&amp;file=continuous.gif' onload='this.style.display=&quot;none&quot; ; CuteWebUI_AjaxUploader_Initialize(this.id);' onerror='this.onload()' ContextValue='!3wEWAQU0QzpcVXNlcnNca3Jla3RocFxBcHBEYXRhXExvY2FsXFRlbXBcQWpheFVwbG9hZGVyVGVtcIELybfjBkfyVfxrHpU9x8LraAU1' UploadModuleNotInstall='1' ShowProgressInfo="1" WindowsDialogLimitMsg="Unable to select so many files at once. The total file name length cannot exceed 32kb." InserText="Upload a file" BorderStyle="border:1px solid #444444;" UploadUrl="/UploadHandler.ashx" BarHeight="20" MaxFilesLimitMsg="The maximum number of files allowed to be uploaded is set to {0}." InfoStyle="padding-left:3px;font:normal 12px Tahoma;" FileTooLargeMsg="{0} cannot be uploaded!

    File size ({1}) is too large. The maximum file size allowed is set to: {2}." CancelUploadMsg="Cancel upload" ResourceHandler="/CuteWebUI.AjaxUploader.ashx" InsertText="Select a file to upload" UploadType="Auto" PanelWidth="360" ShowProgressBar="1" CancelAllMsg="Cancel all Uploads" UploadingMsg="Uploading.." Extensions="jpg,gif,png,bmp,zip,rar" BarStyle="Continuous"/>

     
     
     
    Filed under:
  •  12-08-2010, 6:56 AM 65325 in reply to 65323

    Re: MVC error

    I found that the error was caused by incorrect editing of the web.config file for the CuteWebUi.UploadModule entries. I had one entry and changed it to both entries mentioned in the help file.
  •  12-08-2010, 8:40 AM 65326 in reply to 65325

    Re: MVC error

    Dear hpkrekt,
     
    There are two methods to add AjaxUploader httpModule to web.config's httpModules list.

    IIS 6.0 and IIS 7.0 Classic mode

    <configuration>
      <system.web>
        <httpModules>
          <add name="CuteWebUI.UploadModule" type="CuteWebUI.UploadModule,CuteWebUI.AjaxUploader"/>
         </httpModules>
      </system.web>
    </configuration>

    IIS 7.0 Integrated mode

    <configuration>
      <system.webServer>
        <modules>
          <add name="CuteWebUI.UploadModule" type="CuteWebUI.UploadModule,CuteWebUI.AjaxUploader"/>
        </modules>
      </system.webServer>
    </configuration>
     
    Thank you for asking
View as RSS news feed in XML