-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: Senthil-Maverick
Message 1 in Discussion
HI
i am in the process of converting all my codebehind files in to dll's ,Assembly.
The application was working fine, when i just used the codebehind .vb file.
now that when i Converted in to assembly , placed in Gac i am not able to get the
reference from the GAC to the aspx pages. i just did the following steps.
1.converting all the business logic in to a Code Behind .vb file
2.assigning a strong name to this .vb file using the sn.exe
my .vb file name is testgac.vb go created a sn name like : sn.exe -k
C:\ASP.NET\ZEN\tut\dataset\gac.snk 3.added this strong name to the existing .vb file.
4.used the vbc.exe command like : vbc.exe @vbc.rsp /t:library
c:\asp.net\zen\tut\dataset\testgac.vb /out:c:\asp.net\zen\tut\dataset\testgac
.dll /verbose in the vbc.rsp file i just kept all the references to be added to the
dll
file for compilation. 5.Used the gacutil.exe /i c:\asp.net\zen\tut\dataset\testgac.dll
to place the
dll in the GAC. til now everything was fine . after this i tried tp use the namespace
in dll in one of my aspx page. i just imported the newly created namespace :<%@
import namespace= "gac" %>
and in one of the click event in the aspx page i just gave onclick ="method
name " when i accessd the page there was an error... here was my error.::
Compiler Error Message: BC30002: Type 'gac.GACTEST' is not defined.
first and formost am NOT USING vs.net i am using notepad and compiling the
dll's. ok now the probable mistakes might be : 1. the The entry in the gac is not
accessible in the aspx pape. but when yu use VS.net this is working so what is the
difference??
2. whats is the reference i must give code ,that referece which VS.net gives
automatically ,when yu just add a reference for the GAC entris? so must i add
something else also in the aspx page?? am just specifying a simple code so that yu can
help me better .
my code: testgac.vb
-----------
Imports system
imports system.web
imports system.web.ui
imports system.web.ui.webcontrols
Imports System.Reflection <assembly:AssemblyKeyFile("gac.snk")>
<assembly:Assemblyversion("1.1.1.1")>
namespace gac
Public class GACTEST
Inherits System.web.UI.Page
Protected btngetname as Button
Protected btnclearname as Button Protected lblname as Label
Public shared function getname ()as string
Return "TESTING GAC "
end Function
Public Shared function clearname () as string
Return ""
end Function
end class
end namespace my aspx page:
------------
<[EMAIL PROTECTED] language="vb" %>
<%@ import namespace= "gac" %>
<script runat="server">
</script> <form runat="server">
<asp:label id="lbltext" text="CLICK ON THE BUTTONS BELOW TO GET THE
LABEL TEXT AND TO CLEAR IT" runat="server"/>
<br><br>
<asp:label id="lblname" text="" runat="server"/>
<br><br>
<asp:button id="btngetname" text="GETNAME" Onclick ="gac.getname"
runat="server"/>
<br><br>
<asp:button id="btnclearname" text="CLEARNAME" Onclick
="gac.clearname" runat="server"/>
</form> --------------- So can yu help me in identifying where i went wrong?where am
i supposed to get the reference for the GAC entry when am NOT USING VS.Net .??
with regards
Senthil
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/BDOTNET/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]