473,382 Members | 1,736 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,382 software developers and data experts.

secure method calls

Hi;

I Posted this on public.dotnet.security recently and it driving me
nuts, can anyone please help me?
I have a "special" requirement that only certain methods from certain
classes can only be invoked from certain web apps (on our intranet).
Othwerwise, it should raise security exception.
I dont have any experience with code acces security so I started
reading msdn and stumbled on SiteIdentityPermission class and I think
that could be it. Maybe I was wrong becaouse it doesnt work.
So, now i have in my AssemblyInfo.cs following :
[assembly:
SiteIdentityPermissionAttribute(SecurityAction.Req uestMinimum, Site =
"http://Myserver/MyTrustedSite/")]
And, just before method body I have :
public class MyClass
{
[SiteIdentityPermissionAttribute(SecurityAction.Dem and, Site
=
"http://Myserver/MyTrustedSite/)]
static public void DoSomething()
{
.... and, it doesnt work, method DoSomething can be called from any
other web site.
What I am doing wrong? How can I make this method secure so that it
could be called only from http://Myserver/MyTrustedSite/ for example?
If I wasnt clear enough, my shared assembly and that web site are on
the same server. Assembly is local assembly for now, but when I put
it
in gac I want to make sure that only one specific aspnet web site
should be able to use these secure methods.

I should be, it certainly sounds trivilal, but it isnt. There is no
clear example in documentation or internet. Did anyone ever needed
this?
Sep 5 '08 #1
0 1126

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

Similar topics

6
by: Sarah Tanembaum | last post by:
I was wondering if it is possible to create a secure database system using RDBMS(MySQL, Oracle, SQL*Server, PostgreSQL etc) and web scripting/programming language(Perl, PHP, Ruby, Java, ASP, etc)...
9
by: Paul Rubin | last post by:
I'm trying the super() function as described in Python Cookbook, 1st ed, p. 172 (Recipe 5.4). class A(object): def f(self): print 'A' class B(object): def f(self):
5
by: Chua Wen Ching | last post by:
Hi all, Basically right now, i am interested to learn how to break strong names in ..net assemblies. I had researched a lot and found a blog that mention how to hack strong name assemblies....
7
by: Seth | last post by:
I have noticed that the id of my session object changes when I switch from a non-secure to a secure connection. What I'm trying to do: I have a cookie that is built on the non-secure side of...
5
by: sk | last post by:
Hi, I'm trying to override the Render method of my Page class. Are there any standard guidelines for this? Thanks. Shardul
14
by: Usman | last post by:
Hi I'm working on an application that contains classes for licensing, authentication etc, including all the algorithms of encryption/decryption etc. I wanted to secure this code, but after...
8
by: Harris Kosmidhs | last post by:
Hello, while I'm developing sites for some time I never coded a login form with security in mind. I was wondering what guidelines there are. For my point of view I'm thinking of using md5...
0
by: Raven | last post by:
Hi, I have a problem with a server side redirect from a secure page to a non-secure page (same domain name, same folder) I have added some test code that can display the target URL and that...
3
by: zr | last post by:
Hi, Does usage of checked iterators and checked containers make code more secure? If so, can that code considered to be reasonably secure?
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.