473,385 Members | 1,944 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Code Access Permissions, ServicedComponents 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 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")
strReturn = objWsProxy.GetHtml()

ServicedComponent Code:

[assembly: System.Security.AllowPartiallyTrustedCallers]
[ClassInterface(ClassInterfaceType.None),ProgId("My App.WSProxy"),Guid("79B14
4C6-4E1C-3793-9CBA-FC5DCBB6449E")]
[SecurityPermission(SecurityAction.Assert,Flags=Sec urityPermissionFlag.Execu
tion)]
public class WSProxy{
private localhost.Service1 _service;
public WSProxy(){
_service = new localhost.Service1();
}

public string GetHtml()
{
return _serivice.GetHtml();
}
}
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 ServicedComponent.
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 1269

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

Similar topics

4
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...
0
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...
0
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...
1
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...
4
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...
10
by: vvenk | last post by:
Hello: When I tried to use an Access database, I get the following exception: Server Error in '/WebGrid' Application....
5
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
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...
0
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. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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
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...

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.