ASP.NET Membership, Roles and AllowPartiallyTrustedCallers

  • Thread starter Thread starter pompair
  • Start date Start date
P

pompair

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-
 
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.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Blog:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think outside the box! |
********************************************
 
Back
Top