Full Trust and Uploading

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
9/23/2011 11:57:43 AM
Gravatar
Total Posts 199

Full Trust and Uploading

I am getting the below error when uploading a 11 MB pdf.  I am running in full trust. I tried to increase <requestLimits maxAllowedContentLength="524288000" />

I also tried to use the fulltrust.config file but the site would not load then.

2011-09-23 12:46:10,904 ERROR mojoPortal.Web.Services.FileService - System.Web.HttpException (0x80004005): Maximum request length exceeded.
   at System.Web.HttpRequest.GetEntireRawContent()
   at System.Web.HttpRequest.GetMultipartContent()
   at System.Web.HttpRequest.FillInFormCollection()
   at System.Web.HttpRequest.get_Form()
   at System.Web.HttpRequest.FillInParamsCollection()
   at System.Web.HttpRequest.GetParams()
   at mojoPortal.Web.Services.FileService.LoadSettings(HttpContext context)
   at mojoPortal.Web.Services.FileService.ProcessRequest(HttpContext context)
2011-09-23 12:48:08,123 INFO mojoPortal.Web.Global - Global.asax.cs Application_End
2011-09-23 12:50:10,724 INFO mojoPortal.Web.Global - Application Started.

 

any help is appreciated

9/23/2011 12:08:07 PM
Gravatar
Total Posts 18439

Re: Full Trust and Uploading

You need to set a larger maxRequestLength on the <httpRuntime element in Web.config

See Supporting Large File Uploads.

Hope that helps,

Joe

9/23/2011 12:20:35 PM
Gravatar
Total Posts 199

Re: Full Trust and Uploading

when I un-comment the below line the site goes down with an internal server error:

<httpRuntime maxRequestLength="2097151" executionTimeout="3600" useFullyQualifiedRedirectUrl="true" />

Am I missing something

9/23/2011 12:27:46 PM
Gravatar
Total Posts 18439

Re: Full Trust and Uploading

If you are using .NET 4 then it should already exist uncommented just before the closing </system.web> element, so uncommenting another one would cause an error.

If using .NET 3.5 try removing the part about useFullyQualifiedRedirectUrl

in either case look carefully to make sure that <httpRuntime element is not declared more than once.

9/23/2011 12:45:00 PM
Gravatar
Total Posts 199

Re: Full Trust and Uploading

Thank you Joe - I looked closer and this is what happened.

I had this:

<httpRuntime maxRequestLength="2097151" executionTimeout="3600" useFullyQualifiedRedirectUrl="true" />

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

should of had this:

<httpRuntime requestValidationMode="2.0" maxUrlLength="560" maxQueryStringLength="2048" maxRequestLength="20097151" executionTimeout="3600" useFullyQualifiedRedirectUrl="true" />

Thanks as always -keep up the good work.

1/17/2012 10:52:55 AM
Gravatar
Total Posts 8

Re: Full Trust and Uploading

Hi Joe ,

I am getting the below error for configuration .

Obviously, instructions are a little different on Linux/Mono but the same principle is true, the Data folder and all its child objects must be writable.
Folder Details

The Data folder is not writable.The Data/Sites/1/ folder is not writableThe Data/Sites/1/systemfiles/ folder is not writableThe Data/Sites/1/index/ folder is not writableThe Data/Sites/1/SharedFiles/ folder is not writableThe Data/Sites/1/SharedFiles/History/ folder is not writable

MSSQL database connection ok.
database permissions are sufficient to alter schema.
database initial schema already exists.
database core schema is up to date.
1 site(s) found.
This site appears to be running in a secured environment using Medium Trust policy or at least lower than Full Trust.

 

I also tried to use the fulltrust.config file but the site would not load then.

Thanks,

Yusuf.A

1/18/2012 4:23:36 AM
Gravatar
Total Posts 8

Re: Full Trust and Uploading

Hi Joe,

We have solve the Data folder is not writable to Make read write option.

Still l am getting the below error for configuration .

1 site(s) found.

Error:
This site appears to be running in a secured environment using Medium Trust policy or at least lower than Full Trust.

In the web config file i was updated the following code.

<system.web>
<trust level="Full" />
</system.web>

Please help Urgent.

Thanks

Yusuf.A

1/18/2012 6:21:28 AM
Gravatar
Total Posts 18439

Re: Full Trust and Uploading

Hi,

If machine.config is configured for partial trust you cannot change to full trust by web.config. You can only make it more restrictive from web.config not less restrictive. ie if machine.config is set for full trust you can change to medium trust in web.config because that is more restrictive, but you can't go the other way. If the host has it configured for medium trust you cannot make it full trust.

Hope that helps,

Joe

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