473,327 Members | 2,025 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,327 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

Nov 22 '05 #1
0 642

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

Similar topics

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...
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...
1
by: Brian Barnes | last post by:
I've been searching using google trying to find a way to display Access Reports via ASP.NET and only finding commericial products which appear to require that the report needs to be converted every...
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.