Server Error Has Occurred

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
12/11/2014 12:50:13 PM
Gravatar
Total Posts 17

Server Error Has Occurred

Hello,

Our site has worked fine for as long as we've had it. (Although we've never been able to upload anything over 5mb without getting the server error mentioned below.)

However, for the past 3 days, as soon as I log in as the admin I get the error below. If I reload the page then it will work.

I also can't upload anything anymore without getting the error, no matter what the size of the file. We've made no changes anywhere, so I'm not sure why the problem arose all of the sudden.

 

"We're sorry but a server error has occurred while trying to process your request.

The error has been logged and will be reviewed by our staff as soon as possible. It is possible that the error was just a momentary hiccup and you may wish to use the back button and try again or go back to the home page."

12/11/2014 12:52:21 PM
Gravatar
Total Posts 18444

Re: Server Error Has Occurred

start with basic troubleshooting

12/11/2014 1:08:27 PM
Gravatar
Total Posts 17

Re: Server Error Has Occurred

Okay, I set the Web.config file to show the actual error, and I get the below for both login and uploads.

 

Security Exception

Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

 

From what I've researched on the forums, it looks like we're running "Full Trust" since we also have a file on the server named Web.fulltrust.config

12/11/2014 1:11:03 PM
Gravatar
Total Posts 17

Re: Server Error Has Occurred

Or Medium Trust rather. I got that information from :

https://www.mojoportal.com/mediumtrust.aspx

12/11/2014 1:12:00 PM
Gravatar
Total Posts 18444

Re: Server Error Has Occurred

no, your host must have changed something in the trust level security policy of the server.

the Web.fulltrust.config is just different configuration for when you are in full trust it cannot make the site be in full trust, only the host can do that

that is not enough error detail to see where the error is happening

clearly something changed in your hosting environment but I do not know what or how to fix it, I suggest contact your host

12/11/2014 1:13:00 PM
Gravatar
Total Posts 17

Re: Server Error Has Occurred

Haha, nevermind the Medium trust comment above. It IS fulltrust, not medium trust.

12/11/2014 2:07:20 PM
Gravatar
Total Posts 17

Re: Server Error Has Occurred

GoDaddy is telling me to make the web.config file "full trust" and then "recycle the app pool" ... whatever that means.

We already have a web.fulltrust.config file on the server.

 

I'm just not sure what she was telling me to do. She said in the web.config file it should look like this:

<location allowOverride="false">

    <system.web>

        <trust level="Full" originUrl="" />

    </system.web>

</location>

 

But the only instance of "trust level" in my current web.config file says medium and that whole section is commented out anyway

    <!-- for testing purposes only
        Some hosted environments enforce Medium trust
        this setting in the machine.config will override any setting made here
         <trust level="Medium" originUrl="" />
     For server side web requests to work we need the origin url like this:
     <trust level="Medium" originUrl=".*" />
        -->

12/11/2014 2:27:47 PM
Gravatar
Total Posts 18444

Re: Server Error Has Occurred

the web site only uses Web.config, it does not use Web.fulltrust.config.

the difference between Web.config and Web.fulltrust.config is the full trust one has configuration for NeatUpload which can only work in full trust. so to use it you would have to rename the current Web.config then rename Web.fulltrust.config as Web.config

but I don't suggest you do that, it won't fix the problem and could cause other errors

also what she told you to do will not solve it either

if you look under Administration > System Information it will either say Full Trust or it will say Partial Trust

if it says full trust then you are running in full trust

if it says Partial Trust, there is nothing you can do yourself to make it full trust, putting what she said into Web.config will not make it full trust and would not be needed if it is already full trust

the only thing I can think of that might be problem, search your web.config for "enableViewStateMac" if you find that set to false change it to true. it may have been set to false in old versions of mojoportal like you have but recent updates to the .NET framework don't allow false anymore. This guess might not be the problem, it is just a guess, because if the server was updated by windows update it could account for a sudden change.

the error itself does look like a trust level error, I would not expect to see it in full trust. if there is any further error detail that you didn't post, you should post it again. the part you posted does not give enough information to really know what is causing it

12/11/2014 2:35:10 PM
Gravatar
Total Posts 17

Re: Server Error Has Occurred

When I go to Administration > System Information I'm not seeing any information on the trust level.


Administration Menu > System Information

System Information

mojoPortal Version 2.3.1.7 MSSQL
Server Time Zone Mountain Standard Time
Server Local Time 12/11/2014 1:29:33 PM
Current Time in Greenwich (aka GMT or UTC): 12/11/2014 8:29:33 PM
Server GMT Offset -7
Preferred GMT Offset Web.config Setting -6

 

 

 

Changing the "enableViewStateMac" line to true didn't do anything.

 

 

 

Below is the full page regarding the error, instead of just the top portion which I posted earlier.

 

Security Exception

Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Source Error:
 

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

  <%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
   <system.web>
       <compilation debug="true"/>
   </system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.


Stack Trace:
 

[SecurityException: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.] System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0 System.Security.CodeAccessPermission.Demand() +58 System.IO.Path.GetTempPath() +54 Brettle.Web.NeatUpload.FilesystemUploadStorageProvider.GetDefaultTempDirectory() +326 Brettle.Web.NeatUpload.FilesystemUploadStorageProvider.GetTempDirectory(NameValueCollection attrs) +631 Brettle.Web.NeatUpload.FilesystemUploadStorageProvider.Initialize(String providerName, NameValueCollection attrs) +58 Brettle.Web.NeatUpload.UploadStorage.get_LastResortProvider() +180 Brettle.Web.NeatUpload.UploadStorage.get_Provider() +81 Brettle.Web.NeatUpload.UploadStorage.CreateUploadStorageConfig() +31 Brettle.Web.NeatUpload.FileControl.get_StorageConfig() +603 Brettle.Web.NeatUpload.MultiFile.Render(HtmlTextWriter writer) +2637 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19 System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +10 System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +32 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19 System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +10 System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +32 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19 System.Web.UI.Control.Render(HtmlTextWriter writer) +10 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19 System.Web.UI.Control.Render(HtmlTextWriter writer) +10 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19 System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +10 System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +32 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19 System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +163 System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32 System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +51 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99 System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19 System.Web.UI.Control.Render(HtmlTextWriter writer) +10 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19 System.Web.UI.Page.Render(HtmlTextWriter writer) +29 mojoPortal.Web.mojoBasePage.Render(HtmlTextWriter writer) +36 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6785 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242 System.Web.UI.Page.ProcessRequest() +80 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21 System.Web.UI.Page.ProcessRequest(HttpContext context) +49 ASP.default_aspx.ProcessRequest(HttpContext context) +4 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

12/11/2014 3:03:53 PM
Gravatar
Total Posts 18444

Re: Server Error Has Occurred

ok, you are running a really old version of mojoPortal, 2.3.1.7 was released in September 2009. That version did not show the trust level.

that error is very clear, it is caused by NeatUpload which is known to not work except in full trust. 

version 2.3.1.7 was shipped with full trust/neatupload enabled by default, but for those in medium trust we shipped a web.mediumtrust.config that had neatupload removed to disable it. this file could be renamed to web.config to make the site work in medium trust.

so my best guess is your host changed it to partial trust lately and now you are getting the known neatupload error

if you have the web.mediumtrust.config file you could backup your current web.config and try that renaming the medium trust one as web.config

it may solve this error but, there are greater concerns I would be worried about. There have been various security fixes over time and a your version is known to predate some important security fixes.

If this is an important site I would want to upgrade it the latest version if I were you. But you need to be aware of several issues upgrading from that old, I'd recommend hire the i7media guys on our hosting page to help you upgrade if you decide to do it, because they can help you solve the upgrade issues you will encounter. For example you need to be aware of the following:

the latest version requires .NET 4.5 hosting, your current version runs in .NET 3.5 or higher, so you can only upgrade if your hosting has been updated to .NET 4.5 or if your host can move you to a newer server with 4.5

also your current version may have supported ms sql as old as sql 2000, but the latest version of mojoportal only supports sql 2005 up to all the latest

also there are likely changes in the skinning system that will require fixes in your skin after upgrading

the i7media guys could handle all of that and any other issues that might happen, so you might want to contact them for a quote

12/11/2014 3:07:31 PM
Gravatar
Total Posts 17

Re: Server Error Has Occurred

Is there any cost associated with upgrading the package itself, outside of hiring someone to assist?

You must sign in to post in the forums. This thread is closed to new posts.