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

New Attribute

Hi All..

I tried to create an attribute,more or less the same as .NET role base
security provides (I mean like PrincipalPermissionAttribute). I inherit from
CodeAccessSecurityAttribute and it compiled.
When I put the attribute in my ASP.NET project I got the following error :

c:\inetpub\wwwroot\GaliSite\Test.aspx.cs(71): Error emitting
Att.CheckRolesAttribute' attribute -- 'Failed to load assembly Att --
System.IO.FileNotFoundException: File or assembly name Bll.Web.UI, or one of
its dependencies, was not found.
File name: "Att"

=== Pre-bind state information ===
LOG: DisplayName = Att, Version=1.0.1321.28423, Culture=neutral,
PublicKeyToken=null
(Fully-specified)
LOG: Appbase = c:\Program Files\Microsoft Visual Studio .NET
2003\Common7\IDE
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===

LOG: Private path hint found in config'
I put the DLL into 'c:\Program Files\Microsoft Visual Studio .NET
2003\Common7\IDE
' as it says and it worked great...
Can someone tell me what I have to do in oreder not to put the DLL there ??

Thanks... Zviki


Jul 19 '05 #1
1 1662
Try adding to the GAC and to Policy Assemblies (Fully trusted assemblies).
Need to use Gacutil to get it into the GAC, but can use the .NET
Configuration tool to add it to Policy.

gacutil -i nameidpermissionattribute.dll
caspol -q -m -af nameidpermissionattribute.dll

Shel
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Zviki Goldberg" <zv****@matrix.co.il> wrote in message
news:OT*************@tk2msftngp13.phx.gbl...
Hi All..

I tried to create an attribute,more or less the same as .NET role base
security provides (I mean like PrincipalPermissionAttribute). I inherit from CodeAccessSecurityAttribute and it compiled.
When I put the attribute in my ASP.NET project I got the following error :

c:\inetpub\wwwroot\GaliSite\Test.aspx.cs(71): Error emitting
Att.CheckRolesAttribute' attribute -- 'Failed to load assembly Att --
System.IO.FileNotFoundException: File or assembly name Bll.Web.UI, or one of its dependencies, was not found.
File name: "Att"

=== Pre-bind state information ===
LOG: DisplayName = Att, Version=1.0.1321.28423, Culture=neutral,
PublicKeyToken=null
(Fully-specified)
LOG: Appbase = c:\Program Files\Microsoft Visual Studio .NET
2003\Common7\IDE
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===

LOG: Private path hint found in config'
I put the DLL into 'c:\Program Files\Microsoft Visual Studio .NET
2003\Common7\IDE
' as it says and it worked great...
Can someone tell me what I have to do in oreder not to put the DLL there ??
Thanks... Zviki

Jul 19 '05 #2

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

Similar topics

7
by: svilen | last post by:
hello again. i'm now into using python instead of another language(s) for describing structures of data, including names, structure, type-checks, conversions, value-validations, metadata etc....
1
by: j erickson | last post by:
with the following xsl and xml file, the display of the gif file with the <image/url> tag works. However, the gif file in the <description> tag using the name attribute "src" won't make the correct...
4
by: Lénaïc Huard | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, I've some namespace problems when defining default values for attributes. My problem seems to come from the fact that the attributes are...
3
by: Tony Johansson | last post by:
Hello!! Assume we have one base class called Vehicle and two derived classes called Car and Bus. I would be able to call method getName on an object of class Car or Bus and return back the name...
1
by: arnold | last post by:
Hi, I've been knocking my head against the wall trying to create an XSL transform to perform "normalizations" of a set of XML files that have a common structure. % XML file before transform
5
by: Soledad Vel | last post by:
Hi All, i write this code: var sliderwidth=100; var sliderheight = 100; var div1 = document.createElement('div'); div1.setAttribute('id','d5'); div1.setAttribute('style',...
2
by: gary.goodwin | last post by:
HI I am trying to understand Attribute usage. For example the class SerializableAttribute is a class correct? So why when it is actually u sed the "Attribute" portion of the name is dropped. The...
0
by: Thomas Wittek | last post by:
Hi! I'm using xsl:attribute-sets to reduce redundancy in my XSLT. An example from a transformation to XHTML (the attribute values are simply copied from input to output): <xsl:attribute-set...
6
by: Adam Donahue | last post by:
As an exercise I'm attempting to write a metaclass that causes an exception to be thrown whenever a user tries to access 'attributes' (in the traditional sense) via a direct reference. Consider:...
18
by: Gabriel Rossetti | last post by:
Hello everyone, I had read somewhere that it is preferred to use self.__class__.attribute over ClassName.attribute to access class (aka static) attributes. I had done this and it seamed to work,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.