1

Well, I've been told by my host that I need to enable FullTrust in my webmatrix website because I keep getting an error. (BUT, I have used a different host, and everything on my site works perfectly with them without modification). Anyway, I used the code my host suppllies in their KB, but that just generates a different error. So I looked up full trust on google and used about 5 different code samples to enable full trust but they all generate errors! even the ones on MSDN. And googling "Full Trust WebMatrix" doesn't really bring anything helpful either.

How can I successfully add full trust to a web.config file that is made using WebMatrix?

Any help is greatly appreciated!

Thank you

One of about 20 different errors:

HTTP Error 500.19 - Internal Server Error

The requested page cannot be accessed because the related configuration data for the page is invalid.

Detailed Error Information:

Module

IIS Web Core

Notification

Unknown

Handler

Not yet determined

Error Code

0x8007000d

Config Error

Config File

\?\C:\Users\Jason\Documents\My Web Sites\OSF\web.config

Requested URL

http://localhost:40625/Default.cshtml

Physical Path

Logon Method

Not yet determined

Logon User

Not yet determined

Request Tracing Directory

C:\Users\Jason\Documents\IISExpress\TraceLogFiles\

Config Source: -1: 0:

More Information: This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.

If you see the text "There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined", this error is because you are running a .NET Framework 3.5-based application in .NET Framework 4. If you are running WebMatrix, to resolve this problem, go to the Settings node to set the .NET Framework version to ".NET 2". You can also remove the extra sections from the web.config file. View more information »

The web.config file:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <securityPolicy>
            <trust level="Full" />
        </securityPolicy>

        <defaultDocument>
            <files>
                <add value="Default.cshtml" />
            </files>
        </defaultDocument>
    </system.webServer>
</configuration>
3
  • Why is this such a bloody pain in the ass to get working? My other host does not require ANY modification or configuration. It just works. (appliedi.net) - WinHost on the other hand always seems to throw a bunch of errors at me when I use WebMatrix for anything, even though they say it supports webmatrix.
    – anon271334
    Mar 30, 2011 at 13:38
  • 1
    So you have one hosting company where things work without problems and another one where things are broken... why not stick with the one that works. It's very possible that the broken one is misconfigured and nothing you do will make it work.
    – marcind
    Mar 30, 2011 at 17:36
  • I've been with the one that doesn't seem to want to work for me for years now and their service is unbelievable, very reliable and their control panel is the best i've seen. The other host (the one that works with webmatrix without hassle), is ugly, disorganized and slow, and I can't stand slow websites. They also claim to offer unlimited stuff, and from past experience, that usually means, "we don't have that many resources, but we plan on buying them as we need, just to give the impression that it's unlimited." - I just trust winhost more than the other company.
    – anon271334
    Mar 31, 2011 at 8:57

1 Answer 1

0

securityPolicy or trust element in system.web element.

securityPolicy Element (ASP.NET Settings Schema)

trust Element (ASP.NET Settings Schema)

2
  • Web element does not work with WebMatrix. It brings errors! I've already tried that lol, I've tried about 30 different things, and different variations of other things I've tried, and nothing works, each thing i've tried gives me a different error.
    – anon271334
    Mar 30, 2011 at 13:36
  • Yes, @takepara; That link in your comment is the same link as the second one in your answer. And I've already tried that before posting here on SO.
    – anon271334
    Mar 31, 2011 at 8:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.