Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Internal Server Error 500Internal Server Error 500
Previous
 
Next
New Post
1/28/2015 6:03 PM
 

Hi Folks:

 My head hurts! :)

 

I was extending a module to allow emailing of attachments on a modified 'contact us' module. It's working great (mostly).

 It has an ASP FileUpload control on the page. If I use small files (<2mb), it seems to be ok. THe file gets uploaded to the DNN portal no problem.

 But if I put a file of anywhere between 4mb and 20mb, I get this error both on my WInHost intsance and in my local dev environment. I get this error:

500 Internal Server Error
The requested Url does not return any valid content.

Administrators
Change this message by configuring a specific 404 Error Page or Url for this website.

 

 And here's what show's up in my local application event log:

Event code: 3008
Event message: A configuration error has occurred.
Event time: 1/28/2015 5:02:37 PM
Event time (UTC): 1/28/2015 10:02:37 PM
Event ID: 0abe81bb6afb4b528c8463234956ddb0
Event sequence: 1
Event occurrence: 1
Event detail code: 0
 
Application information:
    Application domain: /LM/W3SVC/1/ROOT/desktopmodules/GP_Hosting_ContactForm-2-130669561574006528
    Trust level: Full
    Application Virtual Path: /desktopmodules/GP_Hosting_ContactForm
    Application Path: C:\DNN\ContactModule\
    Machine name: WIN-GVB566GRTNG
 
Process information:
    Process ID: 2424
    Process name: w3wp.exe
    Account name: IIS APPPOOL\DefaultAppPool
 
Exception information:
    Exception type: Configurati sException
    Exception message: Could not load file or assembly 'DotNetNuke.HttpModules' or one of its dependencies. The system cannot find the file specified.
   at System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase)
   at System.Web.Configuration.Common.ModulesEntry.SecureGetType(String typeName, String propertyName, ConfigurationElement configElement)
   at System.Web.Configuration.Common.ModulesEntry..ctor(String name, String typeName, String propertyName, ConfigurationElement configElement)
   at System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList)
   at System.Web.HttpApplication.GetModuleCollection(IntPtr appContext)
   at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
   at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
   at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
   at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)

Could not load file or assembly 'DotNetNuke.HttpModules' or one of its dependencies. The system cannot find the file specified.
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throw , Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throw , Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)
   at System.Type.GetType(String typeName, Boolean throw , Boolean ignoreCase)
   at System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throw , Boolean ignoreCase)
   at System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase)

 
 
Request information:
    Request URL: http://localhost/DesktopModules/GP_Hosting_ContactForm/module.css?cdv=67
    Request path: /DesktopModules/GP_Hosting_ContactForm/module.css
    User host address: ::1
    User: 
    Is authenticated: False
    Authentication Type: 
    Thread account name: IIS APPPOOL\DefaultAppPool
 
Thread information:
    Thread ID: 9
    Thread account name: IIS APPPOOL\DefaultAppPool
    Is impersonating: False
    Stack trace:    at System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase)
   at System.Web.Configuration.Common.ModulesEntry.SecureGetType(String typeName, String propertyName, ConfigurationElement configElement)
   at System.Web.Configuration.Common.ModulesEntry..ctor(String name, String typeName, String propertyName, ConfigurationElement configElement)
   at System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList)
   at System.Web.HttpApplication.GetModuleCollection(IntPtr appContext)
   at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
   at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
   at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
   at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
 
 
Here's the section of code on the click event for the submit button:

 

            string MyAttachmentFileName = string.Empty;
         
            //check to make sure a file is selected
            if (MyFileUpload.HasFile)
            {
                //create the path to save the file to
               // string fileName = System.IO.Path.Combine(Server.MapPath("~/Files"), MyFileUpload.FileName);
                //create email attachments path if it doesn't exist
                string MyAttachmentsPath =Server.MapPath(PortalSettings.HomeDirectory)+"\\EmailAttachments";
                System.IO.Directory.CreateDirectory(MyAttachmentsPath);
                string fileName=System.IO.Path.Combine(MyAttachmentsPath, txtname.Text+"_"+txtsurname.Text+"_"+ MyFileUpload.FileName);
                MyAttachmentFileName=fileName;
                //save the file to our local path
                MyFileUpload.SaveAs(fileName);
            }

It's pretty straight forward.

 

But i'm pulling my hair out trying to figure out why even a 10mb or 20mb file would throw this error. SMaller files don't through the error. And these aren't that large.

 

I'm trying to build a 'request a quotation' form where customers can upload design files that maybe up to 50mb in size. A lot of our potential customers work in Autodesk producst and these file sizes aren't that uncommon.

 

But anyways, I can't understand why this is occuring. the event in the eventlog, posted above, doesn't seem to clearly point me into what could be wrong. DotNetNuke.HttpModules.

 

I'd really love it if somone would help offer some thoughts on what could be occuring.

 

FYI: I have a customized module placed singly on a  page. It's really nothign fancy. A set of input text boxes, a fileupload control, a submit button. 

 

Is the FileUpload asp.net control not going to work within the context of DNN? Is that the issue? Or is there some web.config or DNN config issue regarding file size that is tripping the problem? I mean, the whole app throws a 500, so it's something pretty serious. My Try Catch blocks aren't catching anything.

 
New Post
1/29/2015 7:52 AM
 
NVM. Figured it out on my own. Adjusted settings in web.config. done. thanks.
 
New Post
2/23/2016 12:04 PM
 
What was the answer? I think I just did the same thing to myself...
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Internal Server Error 500Internal Server Error 500


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.

Content Layout

Subscribe to DNN Digest

DNN Digest is our monthly email newsletter. It highlights news and content from around the DNN ecosystem, such as new modules and themes, messages from leadership, blog posts and notable tweets. Keep your finger on the pulse of the ecosystem by subscribing.  


Copyright 2017 by DNN Corp Terms of Use Privacy
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out