Note that there are some explanatory texts on larger screens.

plurals
  1. POCKeditor Upload Image Not working only when I deploy it to IIS7.5 server
    text
    copied!<p>I am currently building an ASP.Net MVC3 website and using ckeditor as my wsywig. Everything works perfectly find when deploying the server from visual studio, but when I set the website up on IIS7.5 for some reason the posted file keeps coming back as null.</p> <p>Here is the code in the UploadController file:</p> <pre><code>public ActionResult Upload(HttpPostedFileBase upload, string CKEditorFuncNum, string CKEditor, string langCode) { string fileName = upload.FileName; string basePath = Server.MapPath("~/Uploads"); upload.SaveAs(basePath + "\\" + fileName); return View(); } </code></pre> <p><strong>HttpPostedFileBase upload keeps coming in as being null.</strong> </p> <p>Here is the code in the ckeditor config.js file:</p> <pre><code> CKEDITOR.editorConfig = function( config ) { config.filebrowserBrowseUrl = "/Admin/Uploads/Browse"; config.filebrowserWindowWidth = 500; config.filebrowserWindowHeight = 650; config.filebrowserUploadUrl = "/Admin/Uploads/Upload"; }; </code></pre> <p>Here is the stack trace:</p> <pre><code> System.NullReferenceException: Object reference not set to an instance of an object. at SOSWebCMS.Areas.Admin.Controllers.UploadsController.Upload(HttpPostedFileBase upload, String CKEditorFuncNum, String CKEditor, String langCode) in **C:\Documents\SOSWebCMS\Areas\Admin\Controllers\UploadsController.cs:line 31** at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.&lt;&gt;c__DisplayClass15.&lt;InvokeActionMethodWithFilters&gt;b__12() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.&lt;&gt;c__DisplayClass15.&lt;&gt;c__DisplayClass17.&lt;InvokeActionMethodWithFilters&gt;b__14() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) at System.Web.Mvc.Controller.ExecuteCore() at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) at System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) at System.Web.Mvc.MvcHandler.&lt;&gt;c__DisplayClass6.&lt;&gt;c__DisplayClassb.&lt;BeginProcessRequest&gt;b__5() at System.Web.Mvc.Async.AsyncResultWrapper.&lt;&gt;c__DisplayClass1.&lt;MakeVoidDelegate&gt;b__0() at System.Web.Mvc.Async.AsyncResultWrapper.&lt;&gt;c__DisplayClass8`1.&lt;BeginSynchronous&gt;b__7(IAsyncResult _) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End() at System.Web.Mvc.MvcHandler.&lt;&gt;c__DisplayClasse.&lt;EndProcessRequest&gt;b__d() at System.Web.Mvc.SecurityUtil.&lt;GetCallInAppTrustThunk&gt;b__0(Action f) at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) </code></pre> <p>One thing I did notice is that the path to the controllers action is the one to my local host, not the correct path on my live environment. Not sure if that has any barring considering it does seem to be referencing the correct line in the file.</p> <p>I have given MachineName\IIS_IUSRS all of the appropriate permissions so I know it is not a permissions issue. </p> <p>If you need me to post anything else let me know.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload