[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 274
  • Last Modified:

.Net framework security


I have a Sharepoint webpart which calls webservice.  The Sharepoint site is being migrated to new servers and from Sharepoint 2003 to 2007.  I have to update the webparts.  The question isn't really about Sharepoint though!

The Web service is a .Net 1 assembly.  The web parts are .Net 2 (I could rebuild them in 3.5 if it helps but not 4!).  The web service needs to be enabled using machine level code access security and the is done with a Full Trust URL group.

The new server is Windows 2008 and I'm struggling to put the code access security on.  The .Net 1 configuration tools aren't in control panel and the .mrc (?) control app isn't in the framework 1.* folders.  Caspol is in the framework 2 folders and so I can create some scripts.  Unfortunately I can't test them as the business security seems to stop me running them (I can test them on my XP machine but not on a test server).  This means I want to double check I'm doing the right thing before I get someone to run them.  

Can anyone tell me if
  1) Caspol is the way to go...
  2) I may have a problem because the caspol file is in the framework 2 structure but the web service is a framework 1 app?  (I assume this needs framework 1 security even though it is remote and accessed through a URL?!)

Thanks in advance for any assistance.

  • 3
1 Solution
Daniel Van Der WerkenIndependent ConsultantCommented:
I believe CASPOL is the way to go.  I set up code access security for an assembly I wrote back in 2005 in .NET 1.1, but I'm pretty sure that if you use a .NET 2 CASPOL you'll be okay with a .NET 1.1 assembly.  I don't think the specific version of the assembly has any direct correlation on how CAS works.
gringogordoAuthor Commented:
Caspol didn't seem to solve the problem, which definately seems to be a security problem.  I'm wondering if I should try to get the .Net 1 config tools copied over ?
gringogordoAuthor Commented:
Hi, Sorry I can't work out how to cancel the close.  I thought I had accepted the 'solution' and awarderd points.  I'm happy to award points between all responders.

gringogordoAuthor Commented:
Actually my issue wasn't a runtime security problem !

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now