Showing posts with label strong. Show all posts
Showing posts with label strong. Show all posts

Saturday, March 24, 2012

Strong Assembly Name

I have following question:

Why Strong Naming?
When I need It?

RegardsStrong naming an assembly means someone can't go into your assembly and
modify it. In other words, someone can't hack it, put a trojan in it and
make it look like it's ur doing.

In my opinion you'd do it when you are shipping a product or even more so a
component/library. If you are doing internal developement (enterprise
development) or you are shipping to a single client (contract work) it
becomes less important. Of course, it barely takes any time...

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!

"Raed Sawalha" <RaedSawalha@.discussions.microsoft.com> wrote in message
news:C299AF7D-A09E-4514-9036-42874803C7ED@.microsoft.com...
>I have following question:
> Why Strong Naming?
> When I need It?
> Regards
> If you are doing internal developement (enterprise development) or you
> are shipping to a single client (contract work) it becomes less important.
> Of course, it barely takes any time...

In fact, it's better to NOT use the GAC for this type of thing generally, as
it makes it a pain in the butt to make changes and update them. For example,
in our system, we make changes on a weekly (usually) basis. And since our
stuff is safely behind a firewall, and other security systems, there's no
need to go to the trouble.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
I'd rather be a hammer than a nail.

"Karl Seguin" <karl REMOVE @. REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:uW90zLpwFHA.2792@.tk2msftngp13.phx.gbl...
> Strong naming an assembly means someone can't go into your assembly and
> modify it. In other words, someone can't hack it, put a trojan in it and
> make it look like it's ur doing.
> In my opinion you'd do it when you are shipping a product or even more so
> a component/library. If you are doing internal developement (enterprise
> development) or you are shipping to a single client (contract work) it
> becomes less important. Of course, it barely takes any time...
> Karl
> --
> MY ASP.Net tutorials
> http://www.openmymind.net/
> http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!
>
> "Raed Sawalha" <RaedSawalha@.discussions.microsoft.com> wrote in message
> news:C299AF7D-A09E-4514-9036-42874803C7ED@.microsoft.com...
>>I have following question:
>>
>> Why Strong Naming?
>> When I need It?
>>
>> Regards

Strong Assembly Name

I have following question:
Why Strong Naming?
When I need It?
RegardsStrong naming an assembly means someone can't go into your assembly and
modify it. In other words, someone can't hack it, put a trojan in it and
make it look like it's ur doing.
In my opinion you'd do it when you are shipping a product or even more so a
component/library. If you are doing internal developement (enterprise
development) or you are shipping to a single client (contract work) it
becomes less important. Of course, it barely takes any time...
Karl
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!
"Raed Sawalha" <RaedSawalha@.discussions.microsoft.com> wrote in message
news:C299AF7D-A09E-4514-9036-42874803C7ED@.microsoft.com...
>I have following question:
> Why Strong Naming?
> When I need It?
> Regards
> If you are doing internal developement (enterprise development) or you
> are shipping to a single client (contract work) it becomes less important.
> Of course, it barely takes any time...
In fact, it's better to NOT use the GAC for this type of thing generally, as
it makes it a pain in the butt to make changes and update them. For example,
in our system, we make changes on a wly (usually) basis. And since our
stuff is safely behind a firewall, and other security systems, there's no
need to go to the trouble.
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
I'd rather be a hammer than a nail.
"Karl Seguin" <karl REMOVE @. REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:uW90zLpwFHA.2792@.tk2msftngp13.phx.gbl...
> Strong naming an assembly means someone can't go into your assembly and
> modify it. In other words, someone can't hack it, put a trojan in it and
> make it look like it's ur doing.
> In my opinion you'd do it when you are shipping a product or even more so
> a component/library. If you are doing internal developement (enterprise
> development) or you are shipping to a single client (contract work) it
> becomes less important. Of course, it barely takes any time...
> Karl
> --
> MY ASP.Net tutorials
> http://www.openmymind.net/
> http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!
>
> "Raed Sawalha" <RaedSawalha@.discussions.microsoft.com> wrote in message
> news:C299AF7D-A09E-4514-9036-42874803C7ED@.microsoft.com...
>

Strong name a ASPX web Page Question

Hello,
Can anyone tell me how to strong name a web page?
Thanks
GopalBuck, Rock, and Dirk are all traditionally considered strong names. ;-)
Seriously, though, a page cannot have a strong name. An assembly can.
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
"Gopal Krish" <gsgk@.yahoo.com> wrote in message
news:8b4092e6.0411041121.7cdcfe25@.posting.google.com...
> Hello,
> Can anyone tell me how to strong name a web page?
> Thanks
> Gopal
Thanks Kevin,
Then my question is how to strong name an assembly that contains aspx
web page(s). I understand the runtime creates a assembly of the aspx
pages just before executing it.
Can I strong name that somehow?
The reason I ask this is strong names are really valuable to protect
code from hacking attempt but I can't use SecurityAction.Demand in my
class libraries because I could not strong name my ASPX pages (They do
full stack walk).
I know I can use LinkDemand or Assert but I also know they are less
secure than Demand / full stack walk.
SO, is there any way to strong name a ASPX assembly?
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!
You can give a strong name to ANY .Net assembly. Here's how:
http://msdn.microsoft.com/library/d...ystrongname.asp
I'm not sure what you mean by "an assembly that contains aspx web page(s)."
Only classes are in an assembly. The Template files are not.
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
"Gopal Krish" <gsgk@.yahoo.com> wrote in message
news:uYvdhhtwEHA.2568@.TK2MSFTNGP11.phx.gbl...
> Thanks Kevin,
> Then my question is how to strong name an assembly that contains aspx
> web page(s). I understand the runtime creates a assembly of the aspx
> pages just before executing it.
> Can I strong name that somehow?
> The reason I ask this is strong names are really valuable to protect
> code from hacking attempt but I can't use SecurityAction.Demand in my
> class libraries because I could not strong name my ASPX pages (They do
> full stack walk).
> I know I can use LinkDemand or Assert but I also know they are less
> secure than Demand / full stack walk.
> SO, is there any way to strong name a ASPX assembly?
>
>
>
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!
Interesting question!
Do you want to strong name the temporary assemblies the runtime
creates when it parses and compiles ASPX pages?
I can't think of a way to do this.
Scott
http://www.OdeToCode.com/blogs/scott/
On Thu, 04 Nov 2004 17:40:06 -0800, Gopal Krish <gsgk@.yahoo.com>
wrote:

>Thanks Kevin,
>Then my question is how to strong name an assembly that contains aspx
>web page(s). I understand the runtime creates a assembly of the aspx
>pages just before executing it.
>Can I strong name that somehow?
>The reason I ask this is strong names are really valuable to protect
>code from hacking attempt but I can't use SecurityAction.Demand in my
>class libraries because I could not strong name my ASPX pages (They do
>full stack walk).
>I know I can use LinkDemand or Assert but I also know they are less
>secure than Demand / full stack walk.
>SO, is there any way to strong name a ASPX assembly?
>
>
>
>*** Sent via Developersdex http://www.examnotes.net ***
>Don't just participate in USENET...get rewarded for it!
I couldn't answer that question, Gopal.
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
"Gopal Krish" <gsgk@.yahoo.com> wrote in message
news:uYvdhhtwEHA.2568@.TK2MSFTNGP11.phx.gbl...
> Thanks Kevin,
> Then my question is how to strong name an assembly that contains aspx
> web page(s). I understand the runtime creates a assembly of the aspx
> pages just before executing it.
> Can I strong name that somehow?
> The reason I ask this is strong names are really valuable to protect
> code from hacking attempt but I can't use SecurityAction.Demand in my
> class libraries because I could not strong name my ASPX pages (They do
> full stack walk).
> I know I can use LinkDemand or Assert but I also know they are less
> secure than Demand / full stack walk.
> SO, is there any way to strong name a ASPX assembly?
>
>
>
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!

Strong name a ASPX web Page Question

Hello,

Can anyone tell me how to strong name a web page?

Thanks
GopalBuck, Rock, and Dirk are all traditionally considered strong names. ;-)

Seriously, though, a page cannot have a strong name. An assembly can.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Gopal Krish" <geeksgk@.yahoo.com> wrote in message
news:8b4092e6.0411041121.7cdcfe25@.posting.google.c om...
> Hello,
> Can anyone tell me how to strong name a web page?
> Thanks
> Gopal
Thanks Kevin,

Then my question is how to strong name an assembly that contains aspx
web page(s). I understand the runtime creates a assembly of the aspx
pages just before executing it.

Can I strong name that somehow?

The reason I ask this is strong names are really valuable to protect
code from hacking attempt but I can't use SecurityAction.Demand in my
class libraries because I could not strong name my ASPX pages (They do
full stack walk).

I know I can use LinkDemand or Assert but I also know they are less
secure than Demand / full stack walk.

SO, is there any way to strong name a ASPX assembly?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
You can give a strong name to ANY .Net assembly. Here's how:

http://msdn.microsoft.com/library/d...ystrongname.asp

I'm not sure what you mean by "an assembly that contains aspx web page(s)."
Only classes are in an assembly. The Template files are not.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Gopal Krish" <geeksgk@.yahoo.com> wrote in message
news:uYvdhhtwEHA.2568@.TK2MSFTNGP11.phx.gbl...
> Thanks Kevin,
> Then my question is how to strong name an assembly that contains aspx
> web page(s). I understand the runtime creates a assembly of the aspx
> pages just before executing it.
> Can I strong name that somehow?
> The reason I ask this is strong names are really valuable to protect
> code from hacking attempt but I can't use SecurityAction.Demand in my
> class libraries because I could not strong name my ASPX pages (They do
> full stack walk).
> I know I can use LinkDemand or Assert but I also know they are less
> secure than Demand / full stack walk.
> SO, is there any way to strong name a ASPX assembly?
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!
Interesting question!

Do you want to strong name the temporary assemblies the runtime
creates when it parses and compiles ASPX pages?

I can't think of a way to do this.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Thu, 04 Nov 2004 17:40:06 -0800, Gopal Krish <geeksgk@.yahoo.com>
wrote:

>Thanks Kevin,
>Then my question is how to strong name an assembly that contains aspx
>web page(s). I understand the runtime creates a assembly of the aspx
>pages just before executing it.
>Can I strong name that somehow?
>The reason I ask this is strong names are really valuable to protect
>code from hacking attempt but I can't use SecurityAction.Demand in my
>class libraries because I could not strong name my ASPX pages (They do
>full stack walk).
>I know I can use LinkDemand or Assert but I also know they are less
>secure than Demand / full stack walk.
>SO, is there any way to strong name a ASPX assembly?
>
>
>
>*** Sent via Developersdex http://www.developersdex.com ***
>Don't just participate in USENET...get rewarded for it!
I couldn't answer that question, Gopal.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Gopal Krish" <geeksgk@.yahoo.com> wrote in message
news:uYvdhhtwEHA.2568@.TK2MSFTNGP11.phx.gbl...
> Thanks Kevin,
> Then my question is how to strong name an assembly that contains aspx
> web page(s). I understand the runtime creates a assembly of the aspx
> pages just before executing it.
> Can I strong name that somehow?
> The reason I ask this is strong names are really valuable to protect
> code from hacking attempt but I can't use SecurityAction.Demand in my
> class libraries because I could not strong name my ASPX pages (They do
> full stack walk).
> I know I can use LinkDemand or Assert but I also know they are less
> secure than Demand / full stack walk.
> SO, is there any way to strong name a ASPX assembly?
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

Strong name assembly

Hi,
For different reasons would like to strong name my web application, but am
unable to do so. When I try to build my project with the AssemlyKeyFile
attribute set in Assemblyinfo, I get a error message saying Unable to emit
assembly: Referenced assembly 'DateTextBox' does not have a strong name.
DateTextbox in this case is a thirdparty control that I am using in my
project (Have no source code for this). Is there any workaround to this ?
Regards
NiclasDateTextBox : is this managed code or unmanaged code. i mean r u doing any
interop here?
avnrao
"MS Newsgroups" <nospam.lindblom_niclas@.hotmail.com> wrote in message
news:u7rGC8bLEHA.1264@.TK2MSFTNGP12.phx.gbl...
> Hi,
> For different reasons would like to strong name my web application, but am
> unable to do so. When I try to build my project with the AssemlyKeyFile
> attribute set in Assemblyinfo, I get a error message saying Unable to emit
> assembly: Referenced assembly 'DateTextBox' does not have a strong name.
> DateTextbox in this case is a thirdparty control that I am using in my
> project (Have no source code for this). Is there any workaround to this ?
> Regards
> Niclas
>

Strong Name Assembly

I have a strong named assembly. It installs fine on my XP Pro Machine via
the .net configuration tool. When I use the same tool to install it on a
W2003 machine it says it isn't strongly named.
As I don't have vs.net. Ihave been compliling my vb file as a module and
then using al.exe to sign it with a strong name. It seems to work on my
machine. When I copy the dll to the 2003 machine it doesn't. Does it need
any additional files than the dll. Also the W2003 machine is .net v2 whereas
my machine is .net v1. Any ideas? Regards, Chris.Get .NET 2.0 SDK (FREE) for you dev box and try it again

--
Daniel Fisher(lennybacon)
http://www.lennybacon.com

"Chris" <123@.123.com> wrote in message
news:uZ6CKud7FHA.444@.TK2MSFTNGP11.phx.gbl...
>I have a strong named assembly. It installs fine on my XP Pro Machine via
> the .net configuration tool. When I use the same tool to install it on a
> W2003 machine it says it isn't strongly named.
> As I don't have vs.net. Ihave been compliling my vb file as a module and
> then using al.exe to sign it with a strong name. It seems to work on my
> machine. When I copy the dll to the 2003 machine it doesn't. Does it need
> any additional files than the dll. Also the W2003 machine is .net v2
> whereas
> my machine is .net v1. Any ideas? Regards, Chris.

Strong name assembly

Hi,

For different reasons would like to strong name my web application, but am
unable to do so. When I try to build my project with the AssemlyKeyFile
attribute set in Assemblyinfo, I get a error message saying Unable to emit
assembly: Referenced assembly 'DateTextBox' does not have a strong name.
DateTextbox in this case is a thirdparty control that I am using in my
project (Have no source code for this). Is there any workaround to this ?

Regards

NiclasDateTextBox : is this managed code or unmanaged code. i mean r u doing any
interop here?
avnrao
"MS Newsgroups" <nospam.lindblom_niclas@.hotmail.com> wrote in message
news:u7rGC8bLEHA.1264@.TK2MSFTNGP12.phx.gbl...
> Hi,
> For different reasons would like to strong name my web application, but am
> unable to do so. When I try to build my project with the AssemlyKeyFile
> attribute set in Assemblyinfo, I get a error message saying Unable to emit
> assembly: Referenced assembly 'DateTextBox' does not have a strong name.
> DateTextbox in this case is a thirdparty control that I am using in my
> project (Have no source code for this). Is there any workaround to this ?
> Regards
> Niclas

Strong Name Assembly

I have a strong named assembly. It installs fine on my XP Pro Machine via
the .net configuration tool. When I use the same tool to install it on a
W2003 machine it says it isn't strongly named.
As I don't have vs.net. Ihave been compliling my vb file as a module and
then using al.exe to sign it with a strong name. It seems to work on my
machine. When I copy the dll to the 2003 machine it doesn't. Does it need
any additional files than the dll. Also the W2003 machine is .net v2 whereas
my machine is .net v1. Any ideas? Regards, Chris.Get .NET 2.0 SDK (FREE) for you dev box and try it again
Daniel Fisher(lennybacon)
http://www.lennybacon.com
"Chris" <123@.123.com> wrote in message
news:uZ6CKud7FHA.444@.TK2MSFTNGP11.phx.gbl...
>I have a strong named assembly. It installs fine on my XP Pro Machine via
> the .net configuration tool. When I use the same tool to install it on a
> W2003 machine it says it isn't strongly named.
> As I don't have vs.net. Ihave been compliling my vb file as a module and
> then using al.exe to sign it with a strong name. It seems to work on my
> machine. When I copy the dll to the 2003 machine it doesn't. Does it need
> any additional files than the dll. Also the W2003 machine is .net v2
> whereas
> my machine is .net v1. Any ideas? Regards, Chris.
>

Strong name for dll??

Heya,
I'm trying to create a strong name for a dll that I purchased. The dll is simply a PDF Merge dll. This dll is not something that I created. I want to know is it possible to give it a strong name? I've tried using al.exe (which comes with .net) and sn.exe. But I dont think I'm doing it right? Could someone please help me out. I'm using XP with .net 2003. Framework is v1.1.
The reason why I need this dll as a strong name is becuase I'm using Telstra as my web host and they support a hosted trust level. The only way I can use third party dll's is to give them a strong name...

Thankx in advance
Karl
:)Have you referred to MSDN yet?

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconAssigningAssemblyStrongName.asp
Yes I have... And thankx for your reply... All help is appreciated...
I believe that the article is refering to creating strong names for dll's that you have created via code. I dont have the code for this dll. I purchased it. I only have the dll. So my question is can I give it a strong name still or do I have to have the code as well?

Thankx again in advance
Karl
You should have Code for Giving it a Strong Name.
Yes, I've tried to create a strong name once for a third-party DLL, but simply couldn't because I didn't have all parameters ready.
So any ideas on what I should do? Or what I could do?

Thankx again...
Karl
:)
Ask your web hosts to install it for you?
Thankx for your help... I will see if my web host will agree to that...
Thankx again
Karl
:)

Strong name signature could not be verified

Hi,

I've downloaded a set of C++ files written by someone else (a wrapper for the ImageMagick object called MagickNet), created an snk file using sn -k and figured out how to add this reference to the assembly (I'm not a C++ programmer, but I figured out to use assembly:AssemblyKeyFileAttribute in AssemblyInfo.cpp). The result seems to compile fine.

However, when I add a reference to the dll in VS2005 and try to compile my project there, I get:

Error 4 Could not load file or assembly 'MagickNet' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)

I get something similar trying to use gacyutil to add the dll to the GAC.

Does anyone know what on earth is going on here? I've googled this and it looks like a pretty rare error message, certainly no-one else out there seems able to shed any light on it.

Can anyone assist?

Cheers,

Matt

Sorted it eventually, thought I'd post here with the solution in case anyone else came across the problem.

The issue turns out to be with the way you assign the key file to the build in C++. In older versions of Visual Studio the solution I adopted (adding a line to AssemblyInfo.cpp) was apparently the correct one but it's not correct in Visual Studio 2005, although it won't give you an error if you build with it. Instead you need to go to project properties, then linker, then advanced and edit the entry for key file in there. This will build a correctly signed assembly.

This is really poorly documented. Astonishingly, I only found the answer on a generic page about file building focused on C# and VB ... there's nothing about this I can see in the equivalent C++ pages!

http://msdn2.microsoft.com/en-us/library/6f05ezxy(VS.80).aspx

Cheers,

Matt

Strong Naming

Hi,

I have an ASP.NET app.

I wrote some assemblies in VB.NET which my ASP app calls.

I want to Strong Name these assemblies.

Anyone know any good sites that goes throughhow to do this
step by step?

Thanks,
CSure, here's a useful link straight from the horse's mouth:
http://msdn.microsoft.com/library/d...ystrongname.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"C" <anonymous@.discussions.microsoft.com> wrote in message
news:020001c3a3bb$f526d300$a101280a@.phx.gbl...
> Hi,
> I have an ASP.NET app.
> I wrote some assemblies in VB.NET which my ASP app calls.
> I want to Strong Name these assemblies.
> Anyone know any good sites that goes throughhow to do this
> step by step?
> Thanks,
> C
http://msdn.microsoft.com/library/d...ystrongname.asp

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows XP
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

"C" <anonymous@.discussions.microsoft.com> wrote in message
news:020001c3a3bb$f526d300$a101280a@.phx.gbl...
> Hi,
> I have an ASP.NET app.
> I wrote some assemblies in VB.NET which my ASP app calls.
> I want to Strong Name these assemblies.
> Anyone know any good sites that goes throughhow to do this
> step by step?
> Thanks,
> C
Search for al.exe on your hard drive.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"C" <anonymous@.discussions.microsoft.com> wrote in message
news:02a501c3a3c0$dbc03140$a101280a@.phx.gbl...
> Thanks for taht.
> I cane across thsi allright.
> How do I access teh Assembly linker whichj I use to create
> my stong name?
> C
> >--Original Message--
> >Sure, here's a useful link straight from the horse's
> mouth:
> >http://msdn.microsoft.com/library/default.asp?
> url=/library/en-
> us/cpguide/html/cpconassigningassemblystrongname.asp
> >--
> >I hope this helps,
> >Steve C. Orr, MCSD, MVP
> >http://Steve.Orr.net
> >Hire top-notch developers at http://www.able-
> consulting.com
> >"C" <anonymous@.discussions.microsoft.com> wrote in message
> >news:020001c3a3bb$f526d300$a101280a@.phx.gbl...
> >> Hi,
> >>
> >> I have an ASP.NET app.
> >>
> >> I wrote some assemblies in VB.NET which my ASP app
> calls.
> >>
> >> I want to Strong Name these assemblies.
> >>
> >> Anyone know any good sites that goes throughhow to do
> this
> >> step by step?
> >>
> >> Thanks,
> >> C
> >.

Strong Naming an ASP.Net Project

Hello,

I have a Web Project (UserControls.dll) with some user controls that
is shared by many asp.net web applicattions.

What we do is copy UserControls.dll to all the applications bin
folders an this works correctly.

We want to have this shared code in the GAC.

Wit other non-web projects we create a snk file, add it to the project
and compile. Later we register this dll manually in the GAC.

I have been trying to do this with a web project , and all the time I
get an error saying that it cannot read the snk file.

Is it possible to strong name the generated dll of a web project?

Thanks in Advance.

ManuelYes it is, but with ASP.NET there are two places where a binary is built.
You may have to put the strong name in the temporary directory where things
are built:

c:\documents and
settings\<userName>\VSWebCache\<machineName>\<applicationName
--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

"Manuel Lopez" <mcpollo@.terra.es> wrote in message
news:cd080612.0312010830.45b95557@.posting.google.c om...
> Hello,
> I have a Web Project (UserControls.dll) with some user controls that
> is shared by many asp.net web applicattions.
> What we do is copy UserControls.dll to all the applications bin
> folders an this works correctly.
> We want to have this shared code in the GAC.
> Wit other non-web projects we create a snk file, add it to the project
> and compile. Later we register this dll manually in the GAC.
> I have been trying to do this with a web project , and all the time I
> get an error saying that it cannot read the snk file.
> Is it possible to strong name the generated dll of a web project?
> Thanks in Advance.
> Manuel
Hello Chris,

Thanks for the reply.

Our problem is that we cannot compile our web project with
the user controls when we add a snk file and reference it
from Assembly file.

It seems as if you cannot use then with web projects.

>--Original Message--
>Yes it is, but with ASP.NET there are two places where a
binary is built.
>You may have to put the strong name in the temporary
directory where things
>are built:
>c:\documents and
>settings\<userName>\VSWebCache\<machineName>\<applicationN
ame>
>
>--
>Chris Jackson
>Software Engineer
>Microsoft MVP - Windows Client
>Windows XP Associate Expert
>--
>More people read the newsgroups than read my email.
>Reply to the newsgroup for a faster response.
>(Control-G using Outlook Express)
>--
>"Manuel Lopez" <mcpollo@.terra.es> wrote in message
>news:cd080612.0312010830.45b95557@.posting.google.c om...
>> Hello,
>>
>> I have a Web Project (UserControls.dll) with some user
controls that
>> is shared by many asp.net web applicattions.
>>
>> What we do is copy UserControls.dll to all the
applications bin
>> folders an this works correctly.
>>
>> We want to have this shared code in the GAC.
>>
>> Wit other non-web projects we create a snk file, add it
to the project
>> and compile. Later we register this dll manually in the
GAC.
>>
>> I have been trying to do this with a web project , and
all the time I
>> get an error saying that it cannot read the snk file.
>>
>> Is it possible to strong name the generated dll of a
web project?
>>
>> Thanks in Advance.
>>
>> Manuel
>
>.
I may be missing what you are asking here. Are you trying to compile the
project you are strong naming and failing? If that is the case, then you
need to move the SNK file. The error that is generated should tell you the
directory it is searching in and failing to find it. Have you compiled and
strong named an assembly, and having trouble referencing it? You should
definitely be able to reference a strong named file - that also works. You
just need to make sure it is in the search path. What is the error that you
are seeing?

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

"Manuel Lopez" <anonymous@.discussions.microsoft.com> wrote in message
news:0ae201c3b833$8a338160$a501280a@.phx.gbl...
> Hello Chris,
> Thanks for the reply.
> Our problem is that we cannot compile our web project with
> the user controls when we add a snk file and reference it
> from Assembly file.
> It seems as if you cannot use then with web projects.
>
> >--Original Message--
> >Yes it is, but with ASP.NET there are two places where a
> binary is built.
> >You may have to put the strong name in the temporary
> directory where things
> >are built:
> >c:\documents and
> >settings\<userName>\VSWebCache\<machineName>\<applicationN
> ame>
> >--
> >Chris Jackson
> >Software Engineer
> >Microsoft MVP - Windows Client
> >Windows XP Associate Expert
> >--
> >More people read the newsgroups than read my email.
> >Reply to the newsgroup for a faster response.
> >(Control-G using Outlook Express)
> >--
> >"Manuel Lopez" <mcpollo@.terra.es> wrote in message
> >news:cd080612.0312010830.45b95557@.posting.google.c om...
> >> Hello,
> >>
> >> I have a Web Project (UserControls.dll) with some user
> controls that
> >> is shared by many asp.net web applicattions.
> >>
> >> What we do is copy UserControls.dll to all the
> applications bin
> >> folders an this works correctly.
> >>
> >> We want to have this shared code in the GAC.
> >>
> >> Wit other non-web projects we create a snk file, add it
> to the project
> >> and compile. Later we register this dll manually in the
> GAC.
> >>
> >> I have been trying to do this with a web project , and
> all the time I
> >> get an error saying that it cannot read the snk file.
> >>
> >> Is it possible to strong name the generated dll of a
> web project?
> >>
> >> Thanks in Advance.
> >>
> >> Manuel
> >.
Hello Again Chris,

My problem is that i cant generate the strong name "web"
project.

The snk file is the at the same level of of vbproj file,
and in assembly i have :

<Assembly: AssemblyKeyFile("..\..\Keys.snk")>

I have tried copying the snk file to the bin directory,
changing the path and it just doesnt work for a "Web"
project.

Maybe you just cant strong name a "Web" through Visual
Studio.

Thanks

>--Original Message--
>I may be missing what you are asking here. Are you trying
to compile the
>project you are strong naming and failing? If that is the
case, then you
>need to move the SNK file. The error that is generated
should tell you the
>directory it is searching in and failing to find it. Have
you compiled and
>strong named an assembly, and having trouble referencing
it? You should
>definitely be able to reference a strong named file -
that also works. You
>just need to make sure it is in the search path. What is
the error that you
>are seeing?
>--
>Chris Jackson
>Software Engineer
>Microsoft MVP - Windows Client
>Windows XP Associate Expert
>--
>More people read the newsgroups than read my email.
>Reply to the newsgroup for a faster response.
>(Control-G using Outlook Express)
>--
>"Manuel Lopez" <anonymous@.discussions.microsoft.com>
wrote in message
>news:0ae201c3b833$8a338160$a501280a@.phx.gbl...
>> Hello Chris,
>>
>> Thanks for the reply.
>>
>> Our problem is that we cannot compile our web project
with
>> the user controls when we add a snk file and reference
it
>> from Assembly file.
>>
>> It seems as if you cannot use then with web projects.
>>
>>
>> >--Original Message--
>> >Yes it is, but with ASP.NET there are two places where
a
>> binary is built.
>> >You may have to put the strong name in the temporary
>> directory where things
>> >are built:
>>> >c:\documents and
>>
>settings\<userName>\VSWebCache\<machineName>\<applicationN
>> ame>
>>>> >--
>> >Chris Jackson
>> >Software Engineer
>> >Microsoft MVP - Windows Client
>> >Windows XP Associate Expert
>> >--
>> >More people read the newsgroups than read my email.
>> >Reply to the newsgroup for a faster response.
>> >(Control-G using Outlook Express)
>> >--
>>> >"Manuel Lopez" <mcpollo@.terra.es> wrote in message
>> >news:cd080612.0312010830.45b95557@.posting.google.c om...
>> >> Hello,
>> >>
>> >> I have a Web Project (UserControls.dll) with some
user
>> controls that
>> >> is shared by many asp.net web applicattions.
>> >>
>> >> What we do is copy UserControls.dll to all the
>> applications bin
>> >> folders an this works correctly.
>> >>
>> >> We want to have this shared code in the GAC.
>> >>
>> >> Wit other non-web projects we create a snk file, add
it
>> to the project
>> >> and compile. Later we register this dll manually in
the
>> GAC.
>> >>
>> >> I have been trying to do this with a web project ,
and
>> all the time I
>> >> get an error saying that it cannot read the snk file.
>> >>
>> >> Is it possible to strong name the generated dll of a
>> web project?
>> >>
>> >> Thanks in Advance.
>> >>
>> >> Manuel
>>>> >.
>>
>.
You can strong name it, you just have to manually drag the SNK file to the
VSWebCache folder (as indicated in my first post). VS.NET does not provide
the mechanisms, though the error message should help you locate the proper
directory. The folder in inetpub is NOT where it goes. I have done it
before, I just don't have any on this machine to give you the exact
location, but I promise you that it works.

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

"Manuel Lopez" <anonymous@.discussions.microsoft.com> wrote in message
news:afa901c3b8b6$b56a0a10$a601280a@.phx.gbl...
Hello Again Chris,

My problem is that i cant generate the strong name "web"
project.

The snk file is the at the same level of of vbproj file,
and in assembly i have :

<Assembly: AssemblyKeyFile("..\..\Keys.snk")
I have tried copying the snk file to the bin directory,
changing the path and it just doesnt work for a "Web"
project.

Maybe you just cant strong name a "Web" through Visual
Studio.

Thanks

>--Original Message--
>I may be missing what you are asking here. Are you trying
to compile the
>project you are strong naming and failing? If that is the
case, then you
>need to move the SNK file. The error that is generated
should tell you the
>directory it is searching in and failing to find it. Have
you compiled and
>strong named an assembly, and having trouble referencing
it? You should
>definitely be able to reference a strong named file -
that also works. You
>just need to make sure it is in the search path. What is
the error that you
>are seeing?
>--
>Chris Jackson
>Software Engineer
>Microsoft MVP - Windows Client
>Windows XP Associate Expert
>--
>More people read the newsgroups than read my email.
>Reply to the newsgroup for a faster response.
>(Control-G using Outlook Express)
>--
>"Manuel Lopez" <anonymous@.discussions.microsoft.com>
wrote in message
>news:0ae201c3b833$8a338160$a501280a@.phx.gbl...
>> Hello Chris,
>>
>> Thanks for the reply.
>>
>> Our problem is that we cannot compile our web project
with
>> the user controls when we add a snk file and reference
it
>> from Assembly file.
>>
>> It seems as if you cannot use then with web projects.
>>
>>
>> >--Original Message--
>> >Yes it is, but with ASP.NET there are two places where
a
>> binary is built.
>> >You may have to put the strong name in the temporary
>> directory where things
>> >are built:
>>> >c:\documents and
>>
>settings\<userName>\VSWebCache\<machineName>\<applicationN
>> ame>
>>>> >--
>> >Chris Jackson
>> >Software Engineer
>> >Microsoft MVP - Windows Client
>> >Windows XP Associate Expert
>> >--
>> >More people read the newsgroups than read my email.
>> >Reply to the newsgroup for a faster response.
>> >(Control-G using Outlook Express)
>> >--
>>> >"Manuel Lopez" <mcpollo@.terra.es> wrote in message
>> >news:cd080612.0312010830.45b95557@.posting.google.c om...
>> >> Hello,
>> >>
>> >> I have a Web Project (UserControls.dll) with some
user
>> controls that
>> >> is shared by many asp.net web applicattions.
>> >>
>> >> What we do is copy UserControls.dll to all the
>> applications bin
>> >> folders an this works correctly.
>> >>
>> >> We want to have this shared code in the GAC.
>> >>
>> >> Wit other non-web projects we create a snk file, add
it
>> to the project
>> >> and compile. Later we register this dll manually in
the
>> GAC.
>> >>
>> >> I have been trying to do this with a web project ,
and
>> all the time I
>> >> get an error saying that it cannot read the snk file.
>> >>
>> >> Is it possible to strong name the generated dll of a
>> web project?
>> >>
>> >> Thanks in Advance.
>> >>
>> >> Manuel
>>>> >.
>>
>.
I guess I should point out, for the sake of completeness, that this may not
be the best idea. The reason I have strong named ASP.NET assemblies is
basically just to see if it can be done. (Well, FXCop was barking...)
However, note that the model for ASP.NET is not *complete* compilation, but
rather compilation of the code behind, followed by JIT compilation of the
declarative ASPX page. So, your derived forms won't actually exist in the
strong named assembly. What you should consider is developing a class
library of classes that derive from the UserControl class to provide the
basic functionality that you need, and then provide declarative pages whose
code behind inherits from this. This just occurred to me, so I figured I
would add this appendix...

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

"Chris Jackson" <chrisjATmvpsDOTorgNOSPAM> wrote in message
news:%23RN%23aIPuDHA.3256@.TK2MSFTNGP11.phx.gbl...
> You can strong name it, you just have to manually drag the SNK file to the
> VSWebCache folder (as indicated in my first post). VS.NET does not provide
> the mechanisms, though the error message should help you locate the proper
> directory. The folder in inetpub is NOT where it goes. I have done it
> before, I just don't have any on this machine to give you the exact
> location, but I promise you that it works.
> --
> Chris Jackson
> Software Engineer
> Microsoft MVP - Windows Client
> Windows XP Associate Expert
> --
> More people read the newsgroups than read my email.
> Reply to the newsgroup for a faster response.
> (Control-G using Outlook Express)
> --
> "Manuel Lopez" <anonymous@.discussions.microsoft.com> wrote in message
> news:afa901c3b8b6$b56a0a10$a601280a@.phx.gbl...
> Hello Again Chris,
> My problem is that i cant generate the strong name "web"
> project.
> The snk file is the at the same level of of vbproj file,
> and in assembly i have :
> <Assembly: AssemblyKeyFile("..\..\Keys.snk")>
> I have tried copying the snk file to the bin directory,
> changing the path and it just doesnt work for a "Web"
> project.
> Maybe you just cant strong name a "Web" through Visual
> Studio.
> Thanks
> >--Original Message--
> >I may be missing what you are asking here. Are you trying
> to compile the
> >project you are strong naming and failing? If that is the
> case, then you
> >need to move the SNK file. The error that is generated
> should tell you the
> >directory it is searching in and failing to find it. Have
> you compiled and
> >strong named an assembly, and having trouble referencing
> it? You should
> >definitely be able to reference a strong named file -
> that also works. You
> >just need to make sure it is in the search path. What is
> the error that you
> >are seeing?
> >--
> >Chris Jackson
> >Software Engineer
> >Microsoft MVP - Windows Client
> >Windows XP Associate Expert
> >--
> >More people read the newsgroups than read my email.
> >Reply to the newsgroup for a faster response.
> >(Control-G using Outlook Express)
> >--
> >"Manuel Lopez" <anonymous@.discussions.microsoft.com>
> wrote in message
> >news:0ae201c3b833$8a338160$a501280a@.phx.gbl...
> >> Hello Chris,
> >>
> >> Thanks for the reply.
> >>
> >> Our problem is that we cannot compile our web project
> with
> >> the user controls when we add a snk file and reference
> it
> >> from Assembly file.
> >>
> >> It seems as if you cannot use then with web projects.
> >>
> >>
> >> >--Original Message--
> >> >Yes it is, but with ASP.NET there are two places where
> a
> >> binary is built.
> >> >You may have to put the strong name in the temporary
> >> directory where things
> >> >are built:
> >> >> >c:\documents and
> >>
> >settings\<userName>\VSWebCache\<machineName>\<applicationN
> >> ame>
> >> >> >> >--
> >> >Chris Jackson
> >> >Software Engineer
> >> >Microsoft MVP - Windows Client
> >> >Windows XP Associate Expert
> >> >--
> >> >More people read the newsgroups than read my email.
> >> >Reply to the newsgroup for a faster response.
> >> >(Control-G using Outlook Express)
> >> >--
> >> >> >"Manuel Lopez" <mcpollo@.terra.es> wrote in message
> >> >news:cd080612.0312010830.45b95557@.posting.google.c om...
> >> >> Hello,
> >> >>
> >> >> I have a Web Project (UserControls.dll) with some
> user
> >> controls that
> >> >> is shared by many asp.net web applicattions.
> >> >>
> >> >> What we do is copy UserControls.dll to all the
> >> applications bin
> >> >> folders an this works correctly.
> >> >>
> >> >> We want to have this shared code in the GAC.
> >> >>
> >> >> Wit other non-web projects we create a snk file, add
> it
> >> to the project
> >> >> and compile. Later we register this dll manually in
> the
> >> GAC.
> >> >>
> >> >> I have been trying to do this with a web project ,
> and
> >> all the time I
> >> >> get an error saying that it cannot read the snk file.
> >> >>
> >> >> Is it possible to strong name the generated dll of a
> >> web project?
> >> >>
> >> >> Thanks in Advance.
> >> >>
> >> >> Manuel
> >> >> >> >.
> >> >.

Strong Naming a dll and registering in GAC

Hi,

I am working with Microsoft Configuration Application Blocks and whenever I
create a new app and have to use it, I have to reference it and it makes a
local copy in the bin directory.
so if i created 4 apps then there are local copies of these blocks...

I tried to use GACUtil to register these dlls but it gives me an error
saying that its not having a strong name, i tried sn tool but unsuccessful.
I have tried to strong name a dll but the way i did it was in an app where I
first created a strong name and then referenced it in the app before
compiling the dll and then used GAC to register it...
but this is some external dll...

I mean is my thought process right or I am totally off base...
Please advice,
Stephenstephen,
You cannot install an assembly in the GAC without a strong name so you need
to solve this problem first.
After that, you can put copies of strong named, GAC-ed assemblies in a
single folder and reference these from your various apps; you can turn off
the copy local feature, and the copy in the GAC will be automatically used.
Hope that helps,
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"stephen" wrote:

Quote:

Originally Posted by

>
Hi,
>
I am working with Microsoft Configuration Application Blocks and whenever I
create a new app and have to use it, I have to reference it and it makes a
local copy in the bin directory.
so if i created 4 apps then there are local copies of these blocks...
>
I tried to use GACUtil to register these dlls but it gives me an error
saying that its not having a strong name, i tried sn tool but unsuccessful.
I have tried to strong name a dll but the way i did it was in an app where I
first created a strong name and then referenced it in the app before
compiling the dll and then used GAC to register it...
but this is some external dll...
>
I mean is my thought process right or I am totally off base...
Please advice,
Stephen
>
>
>

Strong naming assembly in an vb aspx project

I put my StrongNameKey.snk in my root foler.
in my assemblyinfo.vb I have:
<Assembly: AssemblyKeyFileAttribute("StrongNameKey.snk")>
I get the error "Error creating assembly manifest: Error reading key
file 'StrongNameKey.snk' -- The system cannot find the file
specified."
?
/MHi,
The placement of key depends on what mode are you compiling your vb project
with i.e. Debug or Release.
This is a VB issue cause the build directory for VB.NET assemblies is not
the same as the output directory, which usually is \bin (relative to the
project). If the solution configuration is in the default Debug mode, the
output directory is \obj\Debug. If in Release mode, it's \obj\Release. This
is where the strong
name key file must be placed.
HTH,
Piyush
<job@.bla.com> wrote in message
news:2hkd12t1gb8ic7v3tsmrc2eehdou99okpq@.
4ax.com...
> I put my StrongNameKey.snk in my root foler.
> in my assemblyinfo.vb I have:
> <Assembly: AssemblyKeyFileAttribute("StrongNameKey.snk")>
> I get the error "Error creating assembly manifest: Error reading key
> file 'StrongNameKey.snk' -- The system cannot find the file
> specified."
> ?
> /M
Hmm. my project is a web project and I only have a bin output folder.
Even in my unittest class project in the same solution, I have the
same error. Strange.
On Tue, 14 Mar 2006 10:07:02 -0500, "Piyush Daiya"
<pdaiya@.primeassociates.com> wrote:

>Hi,
>The placement of key depends on what mode are you compiling your vb project
>with i.e. Debug or Release.
>This is a VB issue cause the build directory for VB.NET assemblies is not
>the same as the output directory, which usually is \bin (relative to the
>project). If the solution configuration is in the default Debug mode, the
>output directory is \obj\Debug. If in Release mode, it's \obj\Release. Thi
s
>is where the strong
>name key file must be placed.
>HTH,
>Piyush
><job@.bla.com> wrote in message
> news:2hkd12t1gb8ic7v3tsmrc2eehdou99okpq@.
4ax.com...
>

Strong naming assembly in an vb aspx project

I put my StrongNameKey.snk in my root foler.

in my assemblyinfo.vb I have:
<Assembly: AssemblyKeyFileAttribute("StrongNameKey.snk")
I get the error "Error creating assembly manifest: Error reading key
file 'StrongNameKey.snk' -- The system cannot find the file
specified."

?

/MHi,

The placement of key depends on what mode are you compiling your vb project
with i.e. Debug or Release.
This is a VB issue cause the build directory for VB.NET assemblies is not
the same as the output directory, which usually is \bin (relative to the
project). If the solution configuration is in the default Debug mode, the
output directory is \obj\Debug. If in Release mode, it's \obj\Release. This
is where the strong
name key file must be placed.

HTH,

Piyush
<job@.bla.com> wrote in message
news:2hkd12t1gb8ic7v3tsmrc2eehdou99okpq@.4ax.com...
> I put my StrongNameKey.snk in my root foler.
> in my assemblyinfo.vb I have:
> <Assembly: AssemblyKeyFileAttribute("StrongNameKey.snk")>
> I get the error "Error creating assembly manifest: Error reading key
> file 'StrongNameKey.snk' -- The system cannot find the file
> specified."
> ?
> /M
Hmm. my project is a web project and I only have a bin output folder.
Even in my unittest class project in the same solution, I have the
same error. Strange.

On Tue, 14 Mar 2006 10:07:02 -0500, "Piyush Daiya"
<pdaiya@.primeassociates.com> wrote:

>Hi,
>The placement of key depends on what mode are you compiling your vb project
>with i.e. Debug or Release.
>This is a VB issue cause the build directory for VB.NET assemblies is not
>the same as the output directory, which usually is \bin (relative to the
>project). If the solution configuration is in the default Debug mode, the
>output directory is \obj\Debug. If in Release mode, it's \obj\Release. This
>is where the strong
>name key file must be placed.
>HTH,
>Piyush
><job@.bla.com> wrote in message
>news:2hkd12t1gb8ic7v3tsmrc2eehdou99okpq@.4ax.com...
>> I put my StrongNameKey.snk in my root foler.
>>
>> in my assemblyinfo.vb I have:
>> <Assembly: AssemblyKeyFileAttribute("StrongNameKey.snk")>
>>
>> I get the error "Error creating assembly manifest: Error reading key
>> file 'StrongNameKey.snk' -- The system cannot find the file
>> specified."
>>
>> ?
>>
>> /M

Thursday, March 22, 2012

strong naming assembly

I am attempting trying to create an assembly with strong name
Here is what I have done:
called sn -k Tesstkey.snk
placed this code in my class:
using System.Reflection;
[assembly:AssemblyKeyFileAttribute("TestKey.snk")]
I am getting an error saying it cannot read the key file
First, Where should that .snk file go?
Second, What could cause that error?
DerrickHi,
You can give absolute path also for the .snk file.
I believe VS.NET IDE looks for the .snk file in the devenv.exe folder
itself.
"Derrick" <Derrick_no_spam@.geostrategies.ca> wrote in message
news:9LfOc.137615$ek5.83297@.pd7tw2no...
I am attempting trying to create an assembly with strong name
Here is what I have done:
called sn -k Tesstkey.snk
placed this code in my class:
using System.Reflection;
[assembly:AssemblyKeyFileAttribute("TestKey.snk")]
I am getting an error saying it cannot read the key file
First, Where should that .snk file go?
Second, What could cause that error?
Derrick
Hi Derrick,
As for the making stong-named asembly issue, I think you Shiva's suggestion
that use the full absolutte path of the key file is reasonable. Since
you're using the relative path of the file(haven't specify the full path),
I'm not sure whether the problem is cause by this. Anyway, please have a
try and if you have anyother findings, please also feel free to post here.
Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Derrick,
You can use a relative path for this, but it should be relative to the
compiled assembly, not the project file. For example, if you keep the key
file in the project root folder and your assemblies get compiled to <project
root>\bin\debug or <project root>\bin\release, then your relative path must
point up two directories. e.g.:
[assembly: AssemblyKeyFile(@."..\..\TestKey.snk")]
HTH,
Nicole
"Derrick" <Derrick_no_spam@.geostrategies.ca> wrote in message
news:9LfOc.137615$ek5.83297@.pd7tw2no...
>I am attempting trying to create an assembly with strong name
> Here is what I have done:
> called sn -k Tesstkey.snk
> placed this code in my class:
> using System.Reflection;
> [assembly:AssemblyKeyFileAttribute("TestKey.snk")]
> I am getting an error saying it cannot read the key file
> First, Where should that .snk file go?
> Second, What could cause that error?
> Derrick
>
>
>
Thanks for the help.
physical path wouldn't work because I have to move the projects between
machines. I used Nicole's suggestion to use the relative path of
"..\..\file.snk", and that worked. I had the file in the \bin\release\
folder, so that should have worked, but I can work with the relative path
approach.
Derrick
"Steven Cheng[MSFT]" <v-schang@.online.microsoft.com> wrote in message
news:Ic7VahfdEHA.2932@.cpmsftngxa10.phx.gbl...
> Hi Derrick,
> As for the making stong-named asembly issue, I think you Shiva's
suggestion
> that use the full absolutte path of the key file is reasonable. Since
> you're using the relative path of the file(haven't specify the full path),
> I'm not sure whether the problem is cause by this. Anyway, please have a
> try and if you have anyother findings, please also feel free to post here.
> Thanks.
> Regards,
> Steven Cheng
> Microsoft Online Support
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
> Get Preview at ASP.NET whidbey
> http://msdn.microsoft.com/asp.net/whidbey/default.aspx
>
Thanks, Nicole
That worked
Derrick
"Nicole Calinoiu" <nicolec@.somewhere.net> wrote in message
news:OJjcaIkdEHA.3704@.TK2MSFTNGP09.phx.gbl...
> Derrick,
> You can use a relative path for this, but it should be relative to the
> compiled assembly, not the project file. For example, if you keep the key
> file in the project root folder and your assemblies get compiled to
<project
> root>\bin\debug or <project root>\bin\release, then your relative path
must
> point up two directories. e.g.:
> [assembly: AssemblyKeyFile(@."..\..\TestKey.snk")]
> HTH,
> Nicole
>
> "Derrick" <Derrick_no_spam@.geostrategies.ca> wrote in message
> news:9LfOc.137615$ek5.83297@.pd7tw2no...
>

strong naming assembly

I am attempting trying to create an assembly with strong name

Here is what I have done:
called sn -k Tesstkey.snk
placed this code in my class:
using System.Reflection;

[assembly:AssemblyKeyFileAttribute("TestKey.snk")]

I am getting an error saying it cannot read the key file

First, Where should that .snk file go?
Second, What could cause that error?

DerrickHi,

You can give absolute path also for the .snk file.

I believe VS.NET IDE looks for the .snk file in the devenv.exe folder
itself.

"Derrick" <Derrick_no_spam@.geostrategies.ca> wrote in message
news:9LfOc.137615$ek5.83297@.pd7tw2no...
I am attempting trying to create an assembly with strong name

Here is what I have done:
called sn -k Tesstkey.snk
placed this code in my class:
using System.Reflection;

[assembly:AssemblyKeyFileAttribute("TestKey.snk")]

I am getting an error saying it cannot read the key file

First, Where should that .snk file go?
Second, What could cause that error?

Derrick
Hi Derrick,

As for the making stong-named asembly issue, I think you Shiva's suggestion
that use the full absolutte path of the key file is reasonable. Since
you're using the relative path of the file(haven't specify the full path),
I'm not sure whether the problem is cause by this. Anyway, please have a
try and if you have anyother findings, please also feel free to post here.
Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Derrick,

You can use a relative path for this, but it should be relative to the
compiled assembly, not the project file. For example, if you keep the key
file in the project root folder and your assemblies get compiled to <project
root>\bin\debug or <project root>\bin\release, then your relative path must
point up two directories. e.g.:

[assembly: AssemblyKeyFile(@."..\..\TestKey.snk")]

HTH,
Nicole

"Derrick" <Derrick_no_spam@.geostrategies.ca> wrote in message
news:9LfOc.137615$ek5.83297@.pd7tw2no...
>I am attempting trying to create an assembly with strong name
> Here is what I have done:
> called sn -k Tesstkey.snk
> placed this code in my class:
> using System.Reflection;
> [assembly:AssemblyKeyFileAttribute("TestKey.snk")]
> I am getting an error saying it cannot read the key file
> First, Where should that .snk file go?
> Second, What could cause that error?
> Derrick
>
Thanks for the help.

physical path wouldn't work because I have to move the projects between
machines. I used Nicole's suggestion to use the relative path of
"..\..\file.snk", and that worked. I had the file in the \bin\release\
folder, so that should have worked, but I can work with the relative path
approach.

Derrick

"Steven Cheng[MSFT]" <v-schang@.online.microsoft.com> wrote in message
news:Ic7VahfdEHA.2932@.cpmsftngxa10.phx.gbl...
> Hi Derrick,
> As for the making stong-named asembly issue, I think you Shiva's
suggestion
> that use the full absolutte path of the key file is reasonable. Since
> you're using the relative path of the file(haven't specify the full path),
> I'm not sure whether the problem is cause by this. Anyway, please have a
> try and if you have anyother findings, please also feel free to post here.
> Thanks.
> Regards,
> Steven Cheng
> Microsoft Online Support
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
> Get Preview at ASP.NET whidbey
> http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Thanks, Nicole

That worked

Derrick
"Nicole Calinoiu" <nicolec@.somewhere.net> wrote in message
news:OJjcaIkdEHA.3704@.TK2MSFTNGP09.phx.gbl...
> Derrick,
> You can use a relative path for this, but it should be relative to the
> compiled assembly, not the project file. For example, if you keep the key
> file in the project root folder and your assemblies get compiled to
<project
> root>\bin\debug or <project root>\bin\release, then your relative path
must
> point up two directories. e.g.:
> [assembly: AssemblyKeyFile(@."..\..\TestKey.snk")]
> HTH,
> Nicole
>
> "Derrick" <Derrick_no_spam@.geostrategies.ca> wrote in message
> news:9LfOc.137615$ek5.83297@.pd7tw2no...
> >I am attempting trying to create an assembly with strong name
> > Here is what I have done:
> > called sn -k Tesstkey.snk
> > placed this code in my class:
> > using System.Reflection;
> > [assembly:AssemblyKeyFileAttribute("TestKey.snk")]
> > I am getting an error saying it cannot read the key file
> > First, Where should that .snk file go?
> > Second, What could cause that error?
> > Derrick

Strong Password encryption program?

I have a web-based program that will be going to an external web server and
want to create a logon process. I am using forms authentication, passing
encryption with salt, but want to force the user to create passwords with
rules: combinations of numbers & letters, at least one character caps,
things like that, like we would on a a network, and to change the password
every x amount of months. Can anyone point me in the right direction as to
any articles that may help me do this, or the correct process?

Thanks for your help.This is handled at multiple places:

1) Forms authentication allows a user to login into the system for a
session or for a certain amount of time. The way you are handling is
good enough.
2) To have a set of rules for a password, you may use regular
expressions on ASP.NET password textboxes. Search google.
Alternatively, you can write your own logic to validate in code-behind
file or have a trigger in the database of password field, that verifies
the requirement.
3) Password expiry should be maintained by your database logic.
Whenever, a password is updated, update the last updated date and
whenever user login, check if the last updated date is beyond the valid
date time frame. If so, force user to create a new password.

If there are any other ways, please contribute. I'll love to know more
varieties.

Thanks,
Aru
Hello KatMagic,

If you haven't already, take a look at the SqlMembershipProvider api in
ASP.NET 2.0. It has some of what you want built in:

> Configurable password strength
> Automatic lockout
> Minimum number of non-alphanumeric
> Security question/answer
> ...

The membership data are stored in SQL so you have access to the tables,
stored procedures, and functions if you want to customize.

--
enjoy - brians
http://www.limbertech.com

Strong Password encryption program?

I have a web-based program that will be going to an external web server and
want to create a logon process. I am using forms authentication, passing
encryption with salt, but want to force the user to create passwords with
rules: combinations of numbers & letters, at least one character caps,
things like that, like we would on a a network, and to change the password
every x amount of months. Can anyone point me in the right direction as to
any articles that may help me do this, or the correct process?
Thanks for your help.This is handled at multiple places:
1) Forms authentication allows a user to login into the system for a
session or for a certain amount of time. The way you are handling is
good enough.
2) To have a set of rules for a password, you may use regular
expressions on ASP.NET password textboxes. Search google.
Alternatively, you can write your own logic to validate in code-behind
file or have a trigger in the database of password field, that verifies
the requirement.
3) Password expiry should be maintained by your database logic.
Whenever, a password is updated, update the last updated date and
whenever user login, check if the last updated date is beyond the valid
date time frame. If so, force user to create a new password.
If there are any other ways, please contribute. I'll love to know more
varieties.
Thanks,
Aru
Hello KatMagic,
If you haven't already, take a look at the SqlMembershipProvider api in
ASP.NET 2.0. It has some of what you want built in:

> Configurable password strength
> Automatic lockout
> Minimum number of non-alphanumeric
> Security question/answer
> ...
The membership data are stored in SQL so you have access to the tables,
stored procedures, and functions if you want to customize.
enjoy - brians
http://www.limbertech.com

Strong Type DLL

Please advise what "Strong Type" has to do with compiling an DLL in .NET. Thanks.

Hi,

I think you're referring to strong naming an assembly. Take a look here:sn.exe,strong-named assemblies.

Grz, Kris.


Hey thuhue,

Here's a handy link for you to have
http://www.google.com/

NC...


NC01:

http://www.google.com/.

Since a couple of months I replaced that one withhttp://search.live.com/ as my startup page in IE. Man, I dig that AJAX style scrolling.

Grz, Kris.