ASP.NET Membership, Roles and AllowPartiallyTrustedCallers

Discussion in 'ASP .Net' started by pompair, Feb 12, 2009.

  1. pompair

    pompair Guest

    Hello,

    I have a ASP.NET MVC website with XML based membership and roles. I
    have the ReadOnlyXmlRoleProvider and ReadOnlyXmlMembershipProvider
    deployed in bin-folder as two signed dll's.

    The site works perfectly on one service provider's new platform (IIS 6
    + full trust), where I've tested it. I had to ask for Wildcard
    Mapping, to get the site running with css styles. Users can login, log
    out and post items on the page, manage their own accounts etc. All
    just works.

    However, on another service provider's platform, where the site is
    supposed to be deployed, it works only partly. At first I had to ask
    for Wildcard Mapping too to get the site running with CSS styles.
    Then, every time I tried to login (using membership+roles) I was faced
    with an error that suggested that RoleManager didn't want to work with
    medium/partial trust.

    Then I added the following on top of Membership and Roles classes:

    [assembly: AllowPartiallyTrustedCallers]

    Now, the site works like this:

    * Users can log in and log out
    * Users can see their account data, but when they change something
    (eg. their address) it doesn't actually change. (this is my custom
    logic, which works OK on local Visual Studio developement server and
    on another service providers website)
    * Users cannot post anything to the site, because then there pops
    up a window "Authentication Required" (I don't want external windows
    popping up when the user has already logged in!)

    And all this just WORKS in another server. So something is not right
    in the IIS setting on in my Membership/Role dlls.

    Any ideas appreaciated.

    -pom-
     
    pompair, Feb 12, 2009
    #1
    1. Advertisements

  2. By post, do you mean posting a form or posting a file? If posting a file,
    you will have to make sure the file upload directory has proper permissions
    to allow the ASP.NET user to write to the directory. If just posting a form,
    I have nothing right this second.
     
    Cowboy \(Gregory A Beamer\), Feb 12, 2009
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.