Signing Web Application with StrongName

I want to Sign my Web Application with a StrongName. So that I want to assign some permissions to that application. I have followed the steps as found at

http://blogs.ugidotnet.org/markino/articles/24955.aspx

So, I have included compilerOptions in page directive, And my key file is c:\WebOffice.vb

<%@ Page Language="vb" compilerOptions="c:\WebOffice.vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="WebApp2.WebForm1" %>

But it is giving the error as follows

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC31007: Unable to open module file 'c:\WebOffice.vb': System Error &H80030302&

Source Error:

[No relevant source lines]

Source File: c:\WebOffice.vb : Line: 0

What is the problem I could not find. Otherwise, I want to know how to sign a Web Application.

Thanks in Advance.

Regards,

Santosh



Answer this question

Signing Web Application with StrongName

  • Charles Piche

    hey Optikal,

    I have tried with .snk also. As I followed the instructions in the link that have pasted in my posting, I have used .vb as extension.

    I have generated that file with "sn" tool of .NET and renamed to .vb.


  • MikeT1021

    In your codebehind file try adding the following attribute and I believe this should do it:

    <Assembly: AssemblyKeyFile("MyFile.snk")>


  • Andrew K.

    Uhh a key file shouldn't be a .vb file. I believe it should be a .snk file generated with some command-line utility that comes with .Net (I can't remember the name right now).
  • Signing Web Application with StrongName