server error has occurred

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

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.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
4/9/2009 10:53:48 AM
Gravatar
Total Posts 5

server error has occurred

Hi, I have I have troubling installing Mojoportal.

New install.
Using:
- windows
- MySql v.5
-latest version of mojoportal

What I have done
1. downloaded lastest Mojoportal.
2. Unzipped local.
3. downloaded MySql package and unzipped ddl files to specified folder.
4. Created database on server
5. (tried to...) edit the user config (see below)
6. upload all in folder wwwroot to the rootfolder (to the folder that usually contains the index.html file)
7. Given write access to /Data folder

 

<add key="MySqlConnectionString" value="Server=localhost;Database=xxxx;Uid=xxx;Pwd=xxxx" />

(And uncomment “medium Trust” due to earliger error report)

 

And when I try to run the setup I get this report: (in /data folder), I have tried diffrent things, this is the latest error...

 


2009-04-09 16:37:53,127 ERROR mojoPortal.Web.Global - xxx (my ip was here...)-sv-SE - /Setup/Default.aspx
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.Web.HttpContext.System.IServiceProvider.GetService(Type service)
at Brettle.Web.NeatUpload.UploadHttpModule.GetCurrentWorkerRequest()
at Brettle.Web.NeatUpload.UploadHttpModule.Application_BeginRequest(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
The action that failed was:
Demand
The type of the first permission that failed was:
System.Security.Permissions.SecurityPermission
The Zone of the assembly that failed was:
MyComputer

 


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.


Thanx for all help... dont know what to do

Best regards
Nicklas
 

4/9/2009 10:58:58 AM
Gravatar
Total Posts 18439

Re: server error has occurred

Hi,

Follow the steps listed here:

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

Hope it helps,

Joe 

4/9/2009 11:02:36 AM
Gravatar
Total Posts 5

Re: server error has occurred

Thanx a lot , I give it a try

best regards

Nicklas

 

4/9/2009 11:10:55 AM
Gravatar
Total Posts 5

Re: server error has occurred

Hi again...

my provider says that I have to use this, to get the connection correct, and some part of this are not in the user config or in the web config what I can see. My questin is: should I try to add this information in the config - and if Yes, how?

<connectionStrings>
<add name="myConnStr" connectionString="Data Source=sql2.binero.se;Initial Catalog=databasensnamn;Persist Security Info=True;
User ID=användarnamn;Password=lösenord" providerName="System.Data.SqlClient"/>
</connectionStrings>

Thanx a lot

4/9/2009 11:14:28 AM
Gravatar
Total Posts 18439

Re: server error has occurred

Your provider is mistaken, mojoPortal uses the connection string from appSettings and the connection string they show you is for MS SQL, you said you were using MySql.

Hope it helps,

Joe

4/9/2009 11:19:49 AM
Gravatar
Total Posts 5

Re: server error has occurred

yes, MySql. I appreciate your help a lot
best regards

 

 

4/9/2009 11:24:35 AM
Gravatar
Total Posts 18439

Re: server error has occurred

<connectionStrings>
<add name="myConnStr" connectionString="Data Source=sql2.binero.se;Initial Catalog=databasensnamn;Persist Security Info=True;
User ID=användarnamn;Password=lösenord" providerName="System.Data.SqlClient"/>
</connectionStrings>

The above that your host told you is for MS SQL, see  "System.Data.SqlClient"

and this part also looks like an MS SQL connection string: 
"Data Source=sql2.binero.se;Initial Catalog=databasensnamn;Persist Security Info=True;User ID=användarnamn;Password=lösenord"

mojoPortal uses the settings from appSettings - example:

<add key="MySqlConnectionString" value="Data Source=localhost;Database=mojoportal;User ID=mojouser;Password=mojo123;Charset=utf8;" />

It can go in Web.config appSettings or user.config appSettings

but you need the right connection string for your MySql db provided by youre host.

Hope it helps,

Joe

4/9/2009 12:34:34 PM
Gravatar
Total Posts 5

Re: server error has occurred

you are absolutely correct, my provider now gave me this:

connectionString = "Driver={MySQL ODBC 3.51 Driver};Server=adress to mysql;Option=3;Database=database name;Uid=username;Pwd=password;"

 Do you think I should  try to use "Driver....... " in my connectstring in user.config? Dont know what it does...????

And they say:
the following additions are made in our settings for the "Medium Trust" to give you extra rights (for the functions that are usually needed):

* Read / write rights in the application.
* OleDbPermission, to write / read the Access database.
* OdbcPermission, for generic ODBC Access.
* WebPermission, the call / use of external web services (web services).
* Socket Permission to open sockets for outgoing network connections.
* ReflectionPermissions, the possibility to use reflections

To summarize, so we do not:
* Read / write access rights outside the FTP account (home directory).
* Access files / folders that are not destined for our shared environments (eg, registry, event log).
* Unmanaged code and Assemblies with no indication of that is called with "partial trust" are allowed.


I have tried to do this (below) but with no result:

-Rename Web.config file to Web.fulltrust.config
-Rename Web.mediumtrust.config to Web.config
-Delete DotNetOpenId.dll from the /bin folder


it gives this error report (in explorer):

 Server Error in '/' Application.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>


Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>

any more idea??

Sorry for taking up your time with this, access issue...
Regards
Nicklas

 

4/9/2009 1:16:26 PM
Gravatar
Total Posts 18439

Re: server error has occurred

Hi,

mojoPortal does not use the ODBC connector, so I would try removing  "Driver={MySQL ODBC 3.51 Driver};" and just put the rest of what they gave you into the appSettings "MySqlConnectionString" connection string setting.

If they only allow the ODBC connector its not going to work, it needs to be able to use the MySql Connector for .NET

Hope it helps,

Joe

6/19/2009 3:16:34 AM
Gravatar
Total Posts 2

Re: server error has occurred

This is bad news. mojoPortal does not support MySQL ODBC conector?? Are there workarounds? If not I have to think of alternatives while my provider does not support the MySQL .NET connector. Is SQLite a good alternative?

Kind regards,
Berthold Hutten

6/19/2009 7:22:45 AM
Gravatar
Total Posts 18439

Re: server error has occurred

Hi Berthold,

I have no plans on supporting odbc connector and don't know of any workarounds other than get a host that supports/allows .NET Connector. 

SQLite is ok for sites with moderate traffic but does not scale well for very high traffic sites and it does not work in medium trust hosting at all.

Best,

Joe

7/11/2009 10:05:43 PM
Gravatar
Total Posts 1

Re: server error has occurred

Hello,

Installed WAMP and then mod_aspdotnet.

Installed Mojoportal and got following server error. Can you please help? Thanks

Server Error in '/ASP' Application.
Unexpected body in request for /ASP/Setup/Default.aspx
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Unexpected body in request for /ASP/Setup/Default.aspx

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HttpException (0x80004005): Unexpected body in request for /ASP/Setup/Default.aspx]
Brettle.Web.NeatUpload.UploadHttpModule.Application_BeginRequest(Object sender, EventArgs e) +3391
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +128
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +76


Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082

10/9/2011 12:22:58 PM
Gravatar
Total Posts 17

Re: server error has occurred

Mr. Joe Audette

 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.

And I did what you said about medium trust Web.mediumtrust.config.

and i asked the hoster to  Make sure the App_Data folder exists and is writable by the web process user , they said it's done.

Buy it's does not work too.

Please help me Mr. Joe Audette

Mohamed Ramadan

10/9/2011 1:17:44 PM
Gravatar
Total Posts 18439

Re: server error has occurred

Hi,

Start with Basic Troubleshooting to find out what error is happening.

Hope that helps,

Joe

10/9/2011 1:35:35 PM
Gravatar
Total Posts 17

Re: server error has occurred

Mr.Joe Audette,

I can't solve my problem.I'm not a technical developer.

so please tell me what i have to do.

thanks so much.

Mohamed Ramadan

 

10/9/2011 2:03:46 PM
Gravatar
Total Posts 550

Re: server error has occurred

Hi Mohamed Ramadan,

You can send log file of your site to me (a dot samarian at g mail dot com ) or if can't do this send me your site url  so I register to it and then give administrator role , I try to discover the problem.

Asad,

 

10/9/2011 2:58:13 PM
Gravatar
Total Posts 17

Re: server error has occurred

Hi,

Mr.Asad,

I sent you all information to email

thanks,

Mohamed

10/9/2011 3:21:11 PM
Gravatar
Total Posts 550

Re: server error has occurred

Hi Mohamed,

I didn't got any email from you yet. Please send it again.

a  dot  samarian  at  g mail  dot  com

10/9/2011 4:05:43 PM
Gravatar
Total Posts 17

Re: server error has occurred

Hi,

Mr.Asad,

I sent you all information to email

thanks,

Mohamed
 

10/10/2011 12:22:17 PM
Gravatar
Total Posts 550

Re: server error has occurred

Hi Joe,

I check it , we faced with this error in some administration actions like updation contents, viewing log ,...). I checked the web config for validateRequest but it is false. Can you give me a direction?

A potentially dangerous Request.Form value was detected from the client (ctl00$mainContent$edContentinnerEditor="<table align="left" ...").

 

Best,

Asad

 

 

10/11/2011 10:58:20 AM
Gravatar
Total Posts 18439

Re: server error has occurred

 

My best guess is that you are running the 3.5 .NET version of mojoPortal under .NET 4. Ideally you should install the .NET 4 version of mojoPortal, but you can also work around this specific error by adding this in Web.config just before the closing </system.web>

<httpRuntime requestValidationMode="2.0" maxUrlLength="560" maxQueryStringLength="2048" />

requestValidationMode="2.0" is the important part for this error

Hope that helps,

Joe

10/11/2011 11:40:29 AM
Gravatar
Total Posts 550

Re: server error has occurred

Hi Hoe,

The installation version was 2.3.5.5, I upgrade it to 2.3.7.0  NET 4 version. Now we have this error after updating HTML Content instance modules. I think this is a host related trick.

ERROR 84.241.34.194 - en-US - /HtmlEdit.aspx?mid=58&pageid=0 - mojoPortal.Web.Global - Referrer(http://72.41.70.239/HtmlEdit.aspx?mid=58&pageid=0) useragent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 System.InvalidOperationException: Unable to generate a temporary class (result=1). error CS2001: Source file 'C:\WINDOWS\TEMP\tsqpilmu.0.cs' could not be found error CS2008: No inputs specified

Best,

Asad

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