WCSF hosted on medium trust site

Topics: Web Client Software Factory, User Forum
May 3, 2008 at 5:49 AM
I have developed a site with the WCSF and want to deploy it in GoDaddy hosted site. Their security requires applications to run in medium trust. This is new territory for me and I have yet to find clear direction on what must be done. With no changes to abide by the medium trust constraint I get: SecurityException: That assembly does not allow partially trusted callers. ASP.global_asax..ctor() +0

Anyone else had to do this? Tomorrow I will run permcalc and check against web_MediumTrust.config. My guess is that all reflection must go. More later...


May 3, 2008 at 6:13 AM
There was work done to make EntLib work under Medium Trust, however it was ugly.
Medium Trust was considered as far back as V1 of WCSF, but there was not enough demand to cause us to make WCSF work in this scenario. If you can get it to work, great. However, I am willing to wager that there will be recompilation of the Composite Web App Block, and lots of challenges before you find success.

Sorry,
Michael Puleio - patterns & practices
Bloghttp://blogs.msdn.com/mpuleio/
May 6, 2008 at 3:08 PM


PrefersGolfing wrote:
I have developed a site with the WCSF and want to deploy it in GoDaddy hosted site. Their security requires applications to run in medium trust. This is new territory for me and I have yet to find clear direction on what must be done. With no changes to abide by the medium trust constraint I get: SecurityException: That assembly does not allow partially trusted callers. ASP.global_asax..ctor() +0

Anyone else had to do this? Tomorrow I will run permcalc and check against web_MediumTrust.config. My guess is that all reflection must go. More later...


I would recommend http://www.crystaltech.com/sharedhosting.aspx; I have been with them for a few years and they have always acommodated me with a full-trust server (you just have to ask for it). I have yet to have a support issue that had not been responded to within 15-20 minutes.

Bill
Aug 18, 2008 at 9:41 AM
I am having the same problem publishing a site I developed with the WCSF in one of the most popular italian host provider (aruba.it):

[SecurityException: That assembly does not allow partially trusted callers.]    ASP.global_asax..ctor() +0

It is really a pity that WCSF doesn't work in a medium-trust environment because I think that many low cost ISP only  support this!

This is also for me new territory and I don't know how to procede. On the other site I don't want to spread away all my work and start again with an other web framework!!

Any suggestion? Someone can explain how to solve the problem? There is no intention to make WCSF work also in a medium-trust environment???? 

Kind regards
Enzo
Aug 18, 2008 at 6:06 PM

We are currently in a "wait for feedback" mode on WCSF.

Like any other feature, if there are enough folks who vote for it, it may get considered for the next version of WCSF.
The task to vote for is: Ability to Deploy to Medium Trust Environments

In the meantime, here are a couple of places to look for information on writing and fixing code for medium trust environments:

Michael Puleio - patterns & practices
Blog http://blogs.msdn.com/mpuleio/

Jan 9, 2009 at 7:16 AM
Just as a helpful hint to those in the future, if you wish to make the ObjectContainerDataSource usuable in medium trust, download the source and remove all unnessary references.

Remove
System.Data
System.Drawing

So the only ones you should have left are
System
System.Design
System.Web
System.Windows.Forms
System.Xml

Then recompile.

I do know that data and drawing have many functions that require fulltrust permission, i didn't expect however that just referencing these DLL's would cause the security issue.
Jan 9, 2009 at 7:55 PM
nice!

have you stumbled on a similar solution for MS AJAX? I have hosting w/ 1 and 1 and I can't run my AJAX-enabled site there because of similar security configuration restrictions