473,804 Members | 4,153 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Web Application, Web Service, Class Libraries, and StrongNameIdent ityPermissionAt tribute Class

I have the following setup:

BLL Project
Category.vb
AssemblyInfo.vb

Schema Project
Category.xsd
AssemblyInfo.vb

Web Service Project
CategoryService .asmx
AssemblyInfo.vb

Web Application Project
WebServiceTest. aspx
AssemblyInfo.vb
In the BLL project's AssemblyInfo, I have the following:

<Assembly: AssemblyKeyName ("...")>

and in it's Category.vb class:

< _
Transaction(Tra nsactionOption. Required), _
StrongNameIdent ityPermission( _
SecurityAction. Demand, _
PublicKey := "..." _
) _
_

Public Class Category
...
In my Web Service and Web Application projects, I have the following in
AssemblyInfo.vb files:

<Assembly: AssemblyKeyName ("...")>

The key name matches the same key name in the BLL project's AssemblyInfo.vb
file. I have installed the strong-name key into the CSP and get the public
key from the dll using secutil -hex -s myassembly.dll which I place into the
StrongNameIdent ityPermission attributes constructor for the Category Class
definition.

Anywho, the problem is, when I build and then run the application, I get the
following:
Server was unable to process request. --> Request for the permission of type
System.Security .Permissions.St rongNameIdentit yPermission, mscorlib,
Version=1.0.500 0.0, Culture=neutral , PublicKeyToken= ... failed.

Anyone have any idea how to get the StrongNameIdent ityPermissionAt tribute
class to work correctly? I do not want SecurityAction. LinkDemand, just
SecurityAction. Demand.

Thanks,
Mythran

Nov 19 '05 #1
1 1559

"Mythran" <ki********@hot mail.comREMOVET RAIL> wrote in message
news:OJ******** ******@tk2msftn gp13.phx.gbl...
I have the following setup:

BLL Project
Category.vb
AssemblyInfo.vb

Schema Project
Category.xsd
AssemblyInfo.vb

Web Service Project
CategoryService .asmx
AssemblyInfo.vb

Web Application Project
WebServiceTest. aspx
AssemblyInfo.vb
In the BLL project's AssemblyInfo, I have the following:

<Assembly: AssemblyKeyName ("...")>

and in it's Category.vb class:

< _
Transaction(Tra nsactionOption. Required), _
StrongNameIdent ityPermission( _
SecurityAction. Demand, _
PublicKey := "..." _
) _
_

Public Class Category
...
In my Web Service and Web Application projects, I have the following in
AssemblyInfo.vb files:

<Assembly: AssemblyKeyName ("...")>

The key name matches the same key name in the BLL project's
AssemblyInfo.vb file. I have installed the strong-name key into the CSP
and get the public key from the dll using secutil -hex -s myassembly.dll
which I place into the StrongNameIdent ityPermission attributes constructor
for the Category Class definition.

Anywho, the problem is, when I build and then run the application, I get
the following:
Server was unable to process request. --> Request for the permission of
type System.Security .Permissions.St rongNameIdentit yPermission, mscorlib,
Version=1.0.500 0.0, Culture=neutral , PublicKeyToken= ... failed.

Anyone have any idea how to get the StrongNameIdent ityPermissionAt tribute
class to work correctly? I do not want SecurityAction. LinkDemand, just
SecurityAction. Demand.

Thanks,
Mythran


Gah! Just found:

Note: Issuing a full stack walk demand for the
StrongNameIdent ityPermission does not work if your assembly is called by a
Web application or Web service. This is because it is not possible to strong
name the dynamically compiled classes associated with ASP.NET Web
applications or Web services.

That stinks...so SecurityAction. Demand won't work on
StrongNameIdent ityPermissionAt tribute :( So, guess I have to use LinkDemand
:(

Mythran

Nov 19 '05 #2

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

Similar topics

4
1305
by: Cablito | last post by:
Is there a way to protect my class libraries? I have for instance, a class library full of my base forms and classes latter inherited by various projects. A lot of logic is within those objects and I´d hate to see other companies or individuals being able to add my DLLs to their .NET solution and using it at will.
10
1876
by: Jeremy Ames | last post by:
I have created a web application that uses a custom control and a web service on my local system. I have gotten all of the bugs worked out on my local system and now it is time to move it to the sever. I have tried copying all of the files and folders within my application folder. I have even tried building a web setup and installing it on the server. The problem that I am having is that my web service is still looking for the web service...
5
1578
by: z. f. | last post by:
Hi, I'm working on a web project and i create classes to do business logic and connect to DB. i also need a windows application to do the same functionality as defined in classes inside the ASP.NET project. when i reference the web project DLL (inside the BIN directory) I successfully make a call to a function and get return value. but this is just a test and when trying to access the application
1
1251
by: Nelson | last post by:
Hi Folks, How can I secure an Assembly (DLL) from being referenced in programs other than my Strong Named Assembly (EXE) by using the StrongNameIdentityPermissionAttribute. Nelson
4
4710
by: Chris Curvey | last post by:
Hi all, I have used the win32com libraries to set up a service called MyService under Windows. So far, so good. Now I need to run multiple copies of the service on the same machine. I also have that working. For monitoring and logging, I'd like each instance of the service to know it's own identity (MyService1, MyService2, etc.) But I can't quite seem to grasp how to do this. In the code below, the command line parameter "-i"...
0
1337
by: Ludwig | last post by:
Hi, I'm about to start development of a SOA type application using C# and Visual Studio team System. Description: A Business layer contains a web service that uses a Business Component; this business component talks to the Data Access layer. The data access layer consists of a data access component that is used directly from the business components.
4
3577
by: | last post by:
I have learned about compartmentalizing my code base using Class Libraries. I have my common code such as my ORM framework broken out into their own Class Libraries, which are referenced as projects from my Website. I also have a common set of DLLs I use across all of my applications. It would be great if I could put all of those DLLs into their own projects, and to reference that project from various solutions. The way my solution is...
4
1699
by: Coder | last post by:
Hello, Can my application call a web service ? and web service returns a class file ? Then May I run this "cs" file in my main application ? without compiling ? Thanks Coder @Toronto
0
9585
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10323
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7622
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6856
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5658
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4301
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3823
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2997
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.