Can't upload images or files in the Post editor

Aug 4, 2011 at 7:04 PM
Edited Aug 4, 2011 at 7:26 PM

Whenever I try to upload an image, video, or file in the Post editor I get this error.  I have no idea what is going on.  Any help is much appreciated.  Thanks.

Event Type: Warning
Event Source: ASP.NET 4.0.30319.0
Event Category: Web Event
Event ID: 1309
Date:  8/3/2011
Time:  5:25:03 PM
User:  N/A
Computer: WEB02
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 8/3/2011 5:25:03 PM
Event time (UTC): 8/4/2011 12:25:03 AM
Event ID: b9ef7dfd629b45d2ae4b70a1d0f9d781
Event sequence: 1396
Event occurrence: 2
Event detail code: 0
 
Application information:
    Application domain: /LM/W3SVC/192941946/Root/blog-6-129568051454993608
    Trust level: Full
    Application Virtual Path: /blog
    Application Path: C:\Inetpub\webs\sharedink\website\blog\
    Machine name: WEB02
 
Process information:
    Process ID: 2676
    Process name: w3wp.exe
    Account name: FISHER\ASPNET
 
Exception information:
    Exception type: NullReferenceException
    Exception message: Object reference not set to an instance of an object.
   at Admin.Posts.AddEntry.Upload(String virtualFolder, FileUpload control, String fileName)
   at Admin.Posts.AddEntry.BtnUploadImageClick(Object sender, EventArgs e)
   at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
   at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

 
 
Request information:
    Request URL: https://www.sharedink.com:443/blog/admin/Posts/Add_entry.aspx?id=dd7a754a-adab-4ce4-b450-6c41b6b816ce
    Request path: /blog/admin/Posts/Add_entry.aspx
    User host address: XXX.XXX.XXX.XXX 
    User: XXX 
    Is authenticated: True
    Authentication Type: BlogEngine.NET Custom Identity
    Thread account name: FISHER\ASPNET
 
Thread information:
    Thread ID: 1
    Thread account name: FISHER\ASPNET
    Is impersonating: False
    Stack trace:    at Admin.Posts.AddEntry.Upload(String virtualFolder, FileUpload control, String fileName)
   at Admin.Posts.AddEntry.BtnUploadImageClick(Object sender, EventArgs e)
   at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
   at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 
 
Custom event details:

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Aug 4, 2011 at 11:27 PM

KeyWord here is:    

Exception type: NullReferenceException
Exception message: Object reference not set to an instance of an object.

 

Sounds like when you are attaching for some reason its not picking up the file so its coming up as "Blank"

causing a "Null" error because to the server you are trying to upload nothing.

 

Now the question why is it not picking up the file?

 

Did you try different files and images to upload?

 

Did you try the "Page" editor too?

 

Maybe the upload process is not working.

 

Did you check the /media   folder to see if the file you are uploading

is on your server?

 

Or check the /files  folder

app_data/posts/date/files    <-----------

 

If the files and images are on your server then thats not the issue

 

but if its not then its an upload issue.

 

Possible Issues:

 

1. Uploading to server

2. Attaching the files to the editor

 

3. Rights issue,  (Rights not set correctly for the app_data folder, files have "read only", and etc.)

 

I think thats it.

 

So you  need to go down this list in order till you figure it out :)

 

Have a great day !!

 

Brian Davis