|
 |
aspx thread: Making Business Components
Message #1 by "Hugh McLaughlin" <hugh@k...> on Sat, 26 Jan 2002 02:59:39
|
|
Can someone tell me if you can create the same business component dll by
compiling it in Visual Studio as opposed to command line compile?
Message #2 by "Albert Davis" <albertdavis@h...> on Sat, 26 Jan 2002 06:28:06 -0500
|
|
Absolutely...
>From: "Hugh McLaughlin" <hugh@k...>
>Reply-To: "ASP+" <aspx@p...>
>To: "ASP+" <aspx@p...>
>Subject: [aspx] Making Business Components
>Date: Sat, 26 Jan 2002 02:59:39
>
>Can someone tell me if you can create the same business component dll by
>compiling it in Visual Studio as opposed to command line compile?
_________________________________________________________________
Join the world?s largest e-mail service with MSN Hotmail.
http://www.hotmail.com
Message #3 by "Hugh McLaughlin" <hugh@k...> on Sat, 26 Jan 2002 15:35:56
|
|
> Absolutely...
>
>
> >From: "Hugh McLaughlin" <hugh@k...>
> >Reply-To: "ASP+" <aspx@p...>
> >To: "ASP+" <aspx@p...>
> >Subject: [aspx] Making Business Components
> >Date: Sat, 26 Jan 2002 02:59:39
> >
> >Can someone tell me if you can create the same business component dll
by
> >compiling it in Visual Studio as opposed to command line compile?
>
>
>
>
> _________________________________________________________________
> Join the world?s largest e-mail service with MSN Hotmail.
> http://www.hotmail.com
>
Thank you Albert. Then if I understand this correctly, I simply compile
the object and thne place the dll in the webroot. Is that correct?
Message #4 by "Albert Davis" <albertdavis@h...> on Sun, 27 Jan 2002 13:57:20 -0500
|
|
Actually after you've developed and compiled your class library withing
VS.NET you can open up your web project and make a reference to your newly
developed assembly. Once you've made the reference and compiled your web
project VS.NET will take any referenced assemblies and put them in the bin
directory automatically for you. When you need to push out another version
of this component all you need to do is place the new version in the bin
directory overwritting the existing one. ASP.NET handles the creation of
another app domain for all new request's there after. No more taking the
IIS Process down - unregistering you old one - overwritting it with the new
one - registering the new one - and then starting back up the IIS Process...
Ah - the grace of self-describing component's...
Al
>From: "Hugh McLaughlin" <hugh@k...>
>Reply-To: "ASP+" <aspx@p...>
>To: "ASP+" <aspx@p...>
>Subject: [aspx] Re: Making Business Components
>Date: Sat, 26 Jan 2002 15:35:56
>
> > Absolutely...
> >
> >
> > >From: "Hugh McLaughlin" <hugh@k...>
> > >Reply-To: "ASP+" <aspx@p...>
> > >To: "ASP+" <aspx@p...>
> > >Subject: [aspx] Making Business Components
> > >Date: Sat, 26 Jan 2002 02:59:39
> > >
> > >Can someone tell me if you can create the same business component dll
>by
> > >compiling it in Visual Studio as opposed to command line compile?
> >
> >
> >
> >
> > _________________________________________________________________
> > Join the world?s largest e-mail service with MSN Hotmail.
> > http://www.hotmail.com
> >
>Thank you Albert. Then if I understand this correctly, I simply compile
>the object and thne place the dll in the webroot. Is that correct?
_________________________________________________________________
Join the world?s largest e-mail service with MSN Hotmail.
http://www.hotmail.com
Message #5 by "Hugh McLaughlin" <hugh@k...> on Mon, 28 Jan 2002 00:00:14
|
|
> Actually after you've developed and compiled your class library withing
> VS.NET you can open up your web project and make a reference to your
newly
> developed assembly. Once you've made the reference and compiled your
web
> project VS.NET will take any referenced assemblies and put them in the
bin
> directory automatically for you. When you need to push out another
version
> of this component all you need to do is place the new version in the bin
> directory overwritting the existing one. ASP.NET handles the creation
of
> another app domain for all new request's there after. No more taking
the
> IIS Process down - unregistering you old one - overwritting it with the
new
> one - registering the new one - and then starting back up the IIS
Process...
> Ah - the grace of self-describing component's...
>
> Al
>
>
> >From: "Hugh McLaughlin" <hugh@k...>
> >Reply-To: "ASP+" <aspx@p...>
> >To: "ASP+" <aspx@p...>
> >Subject: [aspx] Re: Making Business Components
> >Date: Sat, 26 Jan 2002 15:35:56
> >
> > > Absolutely...
> > >
> > >
> > > >From: "Hugh McLaughlin" <hugh@k...>
> > > >Reply-To: "ASP+" <aspx@p...>
> > > >To: "ASP+" <aspx@p...>
> > > >Subject: [aspx] Making Business Components
> > > >Date: Sat, 26 Jan 2002 02:59:39
> > > >
> > > >Can someone tell me if you can create the same business component
dll
> >by
> > > >compiling it in Visual Studio as opposed to command line compile?
> > >
> > >
> > >
> > >
> > > _________________________________________________________________
> > > Join the world?s largest e-mail service with MSN Hotmail.
> > > http://www.hotmail.com
> > >
> >Thank you Albert. Then if I understand this correctly, I simply compile
> >the object and thne place the dll in the webroot. Is that correct?
>
>
>
>
> _________________________________________________________________
> Join the world?s largest e-mail service with MSN Hotmail.
> http://www.hotmail.com
>
Al,
Thanks for your feedback and consideration. I am hoping that you can be
of assistance
as I am totally stuck on a problem. I am trying to create a simple
business component
for my own training and I cannot get it to work. The code for my component
named Component1VB.dll is:
Namespace HelloWorld
Public Class HelloVB
Public Function SayHello() As String
Return "Hello World - I'm a component"
End Function
End Class
End Namespace
The code appears to have compiled correctly (I used Visual Studion Beta 2)
and created the file Component1VB.dll. I created a folder in the webroot
named bin and copied this dll into it.
Within the webroot, I created the web.config file with this code:
<configuration>
<system.web>
<compilation>
<assemblies>
<add assembly="Component1VB"/>
</assemblies>
</compilation>
</system.web>
</configuration>
Finally, I created the file Component1.aspx with this code:
<%@ Import Namespace="HelloWorld" %>
<html>
<body>
Our component says: <br /> <br />
<asp:Label id="label1" runat="server" />
<script language="vb" runat="server">
Sub Page_Load(Source As Object, E As EventArgs)
Dim Component as new HelloVB()
label1.text=Component.SayHello()
End Sub
</script>
</body>
</html>
Both the Component1VB.aspx file and the web.config file are located
within the webroot. But when I run the page, I get the following error:
Compiler Error Message: BC30002: Type is not defined: 'HelloVB'
Which is thrown off from the line:
Line 14: Dim Component as new HelloVB()
Any help that you could lend would be enormously apprecited. Thanks.
|
|
 |