473,666 Members | 2,357 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Code Access Permissions, ServicedCompone nts and Web Services

Here is the Scenario:
I have a web service that performs processing on data.
I need to call this web service from an ASP page.
I created a ServicedCompone nt that has the WebService Proxy and provides a
COM Interface to the ASP code to make requests to the Web Service.

ASP Code:

dim objWsProxy, strReturn
set objWsProxy = Server.CreateOb ject("MyApp.WSP roxy")
strReturn = objWsProxy.GetH tml()

ServicedCompone nt Code:

[assembly: System.Security .AllowPartially TrustedCallers]
[ClassInterface( ClassInterfaceT ype.None),ProgI d("MyApp.WSProx y"),Guid("79 B14
4C6-4E1C-3793-9CBA-FC5DCBB6449E")]
[SecurityPermiss ion(SecurityAct ion.Assert,Flag s=SecurityPermi ssionFlag.Execu
tion)]
public class WSProxy{
private localhost.Servi ce1 _service;
public WSProxy(){
_service = new localhost.Servi ce1();
}

public string GetHtml()
{
return _serivice.GetHt ml();
}
}
Now, before the August 2003, Cumulative Patch for Internet Explorer 6
Service Pack 1 (822925). Everything worked fine and dandy. Afterwards, I
continually got, "Execution Permission could not be acquired"

So, I created a Code Access Policy for my ServicedCompone nt.
caspol -m -ag All_Code -strong -file MyApp.dll -noname -noversion
FullTrust -name "My Proxy Class"
caspol -af MyApp.dll

That didnt work. So I manually went into the .NET Configuration 1.1 Utility
and Created a code access permission for my Strong Named Component.

After restarting IIS, it worked. Then after a reboot, it stopped working.
Then after fiddling with policy again but actually changing nothing. It
started working again.
Then it stopped after an IIS Reset. I am completely lost on what is going
on any more. Any advice would be greatly appreciated.

Anthony

Jul 21 '05 #1
0 1282

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

Similar topics

4
2725
by: RichB | last post by:
Hello, The .NET application I have just installed at a client web site is throwing a strange error. At first the applications works without any problems, but after 10 mins or so Access denied error messages are thrown. The application, web based, late binds to a series of assemblies, none of which are in the GAC. I have configured the application to impersonate the IIS user and have set the user to have access to all relevant...
0
2083
by: Namratha Shah \(Nasha\) | last post by:
Hey Guys, Today we are going to look at Code Access Security. Code access security is a feature of .NET that manages code depending on its trust level. If the CLS trusts the code enough to allow it ro run then it will execute, the code execution depends on the permission provided to the assembly. If the code is not trusted wnough to run or it attempts to perform an action which doe not have the required permissions then its execution...
0
1083
by: Anthony Christianson | last post by:
Here is the Scenario: I have a web service that performs processing on data. I need to call this web service from an ASP page. I created a ServicedComponent that has the WebService Proxy and provides a COM Interface to the ASP code to make requests to the Web Service. ASP Code: dim objWsProxy, strReturn set objWsProxy = Server.CreateObject("MyApp.WSProxy")
1
2814
by: Microsoft News | last post by:
I have a web server sitting on computer 1, (QA1). Out on the network on my main server I have a folder with a zip file in it. All I want is for the web services that are on the web server to pick up the Zip file and send it when the web services are called. However I am getting the following error: -- Message: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.ApplicationException:...
4
2255
by: Martin | last post by:
Hi, I am getting an "Access Denied" error when attempting to browse asp.net pages. I have installed ASP.NET 1.1.4322 on a domain controller. The machine also has ASP.NET 1.0.3705 installed on it. The machine is win 2k server. IIS is installed. I have already run aspnet_regiis - i to reinstall the .net framework.
10
2126
by: vvenk | last post by:
Hello: When I tried to use an Access database, I get the following exception: Server Error in '/WebGrid' Application. -------------------------------------------------------------------------------- The Microsoft Jet database engine cannot open the file 'D:\Program Files\Infragistics\NetAdvantage 2005 Volume 2\ASP.NET\Samples\Data\samplebrowser.mdb'. It is already opened exclusively
5
3714
by: Simon Hart | last post by:
Does anyone know the standard code access permission to be able to manipulate a process using the Process class? Thanks Simon.
3
1895
by: Tom | last post by:
Is it possible to access (Read via StreamReader) an external file from a Wndows service? I.E. In the OnStart method of the service, I need to go out and read a couple of external files (and these files appear on a differnet server and are accessed via a UNC syntax - i.e. \\server\share\myfile.txt). I tried this under my VB.NET service but it keeps telling me that I have an unauthorized file access when my service starts up) Thanks.
0
2545
by: taylorjonl | last post by:
I am having a problem generating some soap proxies dynamically using almost the exact same code as in the MSDN sample. http://msdn2.microsoft.com/en-us/library/system.web.services.description.webreference(VS.80).aspx It has very few differences, mainly I had to manipulate the document to remove the Any tags that caused 400+ validation warnings but even after getting the WebReference object ValidationWarnings to 0, it says...
0
8440
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8352
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8780
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8549
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7378
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6189
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5661
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4192
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2005
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.