473,503 Members | 1,701 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

WSE3.0 doesn't work with trust level="Medium" need help!

Stu
I x-posted this in the enhancements group as well, looking for some
help:

Need help with a CAS issue with WSE3.

Enable an asp.net2 webapp to use WSE3.
Create a new webservice in the app via Add New Item WebService

Alter code for webservice so the service inherits from SoapService,
instead of the defaults, like so: (this forces your service to use
WSE3)

using System;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using Microsoft.Web.Services3;
using Microsoft.Web.Services3.Design;
using Microsoft.Web.Services3.Messaging;

/// <summary>
/// Summary description for TestService
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class TestService : SoapService {

public TestService () {

//Uncomment the following line if using designed components
//InitializeComponent();
}

[WebMethod]
public string HelloWorld() {
return "Hello World";
}

}

Now attempt to call that HelloWorld method from the browser. works
fine, right?

Now edit the trust level for your IIS server to medium here:
c:\windows\..<lastest .net framework>\CONFIG\web.config

change ~line 23 to this:
<trust level="Medium" originUrl="" />

restart your IIS server via iisreset /restart

invoke your HelloWorld method again... you should get this error:
System.Security.SecurityException: That assembly does not allow
partially trusted callers.
at
System.Security.CodeAccessSecurityEngine.ThrowSecu rityException(Assembly
asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle
rmh, SecurityAction action, Object demand, IPermission permThatFailed)
at TestService..ctor()

anyone have a clue to solve for this???

I added a StrongNameMembershipCondition into the web_mediumtrust.config
for WSE3 DLL, but this does not fix the situation!

any help would be appreciated!

Sep 6 '06 #1
0 1202

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

32
3346
by: Will Hartung | last post by:
Can someone clarify that multiple classes in the "class" attribute are ok and "legal" and not some fluke? So, I can do: ..pink {color: pink} ..bold {font-weight: bold} ..medium {font-size:...
10
2025
by: Alf P. Steinbach | last post by:
The fifth part of my attempted Correct C++ tutorial is now available, although for now only in Word format (use free Open Office if no Word), and also, it's not yet been reviewed at all -- ...
4
2659
by: Mark B | last post by:
It seems the Access 97 FontName property supports multiple font names, e.g. "Franklin Gothic Medium, Tahoma". I assume that means that if the first font is not available on the target PC, the...
388
21396
by: maniac | last post by:
Hey guys, I'm new here, just a simple question. I'm learning to Program in C, and I was recommended a book called, "Mastering C Pointers", just asking if any of you have read it, and if it's...
2
3495
by: Harrie Verveer | last post by:
Hi, I'm building quiet a large webapplication (CMS) in ASP.NET. On localhost the application runs fine. For publishing we use 2 hosting providers at the moment (let's call those 'A' and 'B')....
1
1863
by: Achim Domma (SyynX Solutions GmbH) | last post by:
Hi, is there a possibility to set the font size to a percent value of the "top level" font size? For example: The font size of the body might be 100% and I have a div which should have a...
22
129953
by: stephen | last post by:
I have created an order form that users javascript to create a new html document when the customers clicks the "print page" button. Once the new document has been created it then prints the...
28
2481
by: darren via AccessMonster.com | last post by:
Hi I've seen details on bypassing macro security with a bat file but has any one incorporated this with Tony Toews FE Updater? If so, I'd appreciate some guidance. As both open the database...
0
7199
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7273
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7322
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6982
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7451
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5572
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3161
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3150
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
374
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.