A
Anthony Christianson
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("MyApp.WSProxy"),Guid("79B14
4C6-4E1C-3793-9CBA-FC5DCBB6449E")]
[SecurityPermission(SecurityAction.Assert,Flags=SecurityPermissionFlag.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
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("MyApp.WSProxy"),Guid("79B14
4C6-4E1C-3793-9CBA-FC5DCBB6449E")]
[SecurityPermission(SecurityAction.Assert,Flags=SecurityPermissionFlag.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