|
 |
asp_components thread: recompile
Message #1 by shah_kashyap@r... on Fri, 2 Mar 2001 16:40:18
|
|
Hi to all
I am asking a very stupid question.
I have created a dll called string2.dll using Binary Compatibility
I tested it is working fine.
Now I modified the code by 2 lines
How do I recompile string2.dll using Binary Compatibility ?
If I do by File -- Make string2.dll.
I get an error permission denied
This dll is used as an component in COM+ (windows 2000).
How do I recompile string2.dll
Thanks in advance
Message #2 by John Pirkey <mailjohnny101@y...> on Fri, 2 Mar 2001 08:48:54 -0800 (PST)
|
|
you have to stop the package in COM+, then remove the component from COM+, you can
leave the package there, but it will not contain your component. Then, recompile
your dll, then add it back to the COM+ package.
tedious process, but it works and ensures no old version are hanging around in COM+.
hope this helps,
john
--- shah_kashyap@r... wrote:
> Hi to all
>
> I am asking a very stupid question.
> I have created a dll called string2.dll using Binary Compatibility
> I tested it is working fine.
> Now I modified the code by 2 lines
> How do I recompile string2.dll using Binary Compatibility ?
>
> If I do by File -- Make string2.dll.
> I get an error permission denied
> This dll is used as an component in COM+ (windows 2000).
>
>
> How do I recompile string2.dll
>
> Thanks in advance
>
>
John Pirkey
MCSD
John@S...
http://www.stlvbug.org
Message #3 by "Peter Lanoie" <planoie@e...> on Fri, 2 Mar 2001 11:55:40 -0500
|
|
I'm not sure about this answer (I've haven't worked with COM+) but...
You might try shutting down all web services and closing interdev if you use
it. Both will lock the DLL and cause that error. Once services and apps
that lock it are unloaded, you should be able to recompile. Compatibility
shouldn't make a difference.
One thing I have noticed when making DLLs. If you have a project group with
the DLL as one and a test project as the other, double check the test
project reference to the DLL. If it's referencing the DLL FILE (vs the DLL
Project) VB itself will lock the DLL and you can't recompile.
If the DLL is in MTS, I believe you don't have this problem. You can just
rebuild the component and MTS handles the details. Haven't actually worked
with this myself though.
Good luck.
Peter
-----Original Message-----
From: shah_kashyap@r... [mailto:shah_kashyap@r...]
Sent: Friday, March 02, 2001 11:40 AM
To: ASP components
Subject: [asp_components] recompile
Hi to all
I am asking a very stupid question.
I have created a dll called string2.dll using Binary Compatibility
I tested it is working fine.
Now I modified the code by 2 lines
How do I recompile string2.dll using Binary Compatibility ?
If I do by File -- Make string2.dll.
I get an error permission denied
This dll is used as an component in COM+ (windows 2000).
How do I recompile string2.dll
Thanks in advance
Message #4 by Robert Chartier <rchartierh@a...> on Fri, 02 Mar 2001 11:59:58 -0500
|
|
if you change the interface (getters/setters/public methods) you will have
to remove it form the package
but if you only change the implementation of the interface, and not the
interface itself (code within the methods, etc..) then you shouldnt need to
remove it from the package, only right-click the package, shut down. and
then just rebuild the dll
if you still have problems on the second instance, do the first.
At 11:48 AM 3/2/01, you wrote:
>you have to stop the package in COM+, then remove the component from COM+,
>you can
>leave the package there, but it will not contain your component. Then,
>recompile
>your dll, then add it back to the COM+ package.
>
>tedious process, but it works and ensures no old version are hanging
>around in COM+.
>
>hope this helps,
>
>john
>
>--- shah_kashyap@r... wrote:
> > Hi to all
> >
> > I am asking a very stupid question.
> > I have created a dll called string2.dll using Binary Compatibility
> > I tested it is working fine.
> > Now I modified the code by 2 lines
> > How do I recompile string2.dll using Binary Compatibility ?
> >
> > If I do by File -- Make string2.dll.
> > I get an error permission denied
> > This dll is used as an component in COM+ (windows 2000).
> >
> >
> > How do I recompile string2.dll
> >
> > Thanks in advance
> >
> >
>
>John Pirkey
>MCSD
>John@S...
>http://www.stlvbug.org
>
Robert Chartier
Author, AspFree.com
xxx-xxx-xxxx
rchartierh@a...
http://www.aspfree.com/devlinks
http://www.aspfree.com/authors/robert
http://www.aspalliance.com/nothingmn
Message #5 by Quang Tran <qtran@i...> on Fri, 2 Mar 2001 12:22:21 -0500
|
|
I think you unregister first before compiling again
-----Original Message-----
From: shah_kashyap@r... [mailto:shah_kashyap@r...]
Sent: Friday, March 02, 2001 11:40 AM
To: ASP components
Subject: [asp_components] recompile
Hi to all
I am asking a very stupid question.
I have created a dll called string2.dll using Binary Compatibility
I tested it is working fine.
Now I modified the code by 2 lines
How do I recompile string2.dll using Binary Compatibility ?
If I do by File -- Make string2.dll.
I get an error permission denied
This dll is used as an component in COM+ (windows 2000).
How do I recompile string2.dll
Thanks in advance
Message #6 by Craig Shields <cmorganshields@y...> on Fri, 2 Mar 2001 09:58:35 -0800 (PST)
|
|
This is a good question. I thought that Quang Tran
was right - you need to unregister (unregsvr /u
<path>) the dll before recompiling. If you don't,
won't it create multiple GUIDs in the registry
referencing the same path to a dll? Any other
thoughts?
Craig Shields
Message #7 by Imar Spaanjaars <Imar@S...> on Fri, 02 Mar 2001 19:10:15 +0100
|
|
Move you DLL inside an MTS / COM+ package:
This is easier than it sounds:
Here's how to do it (I'll describe it for Win 2K, but it's about the same
for NT4)
1. Open up COM+ Services in Start | Programs | Administrator Tools (It's
called MTS in NT 4)
2. Expand Component Services | Computers | My computer
3. Expand COM+ applications
4. Right click COM+ applications and choose New | Application
5. Click next and choose "Empty application"
6. Enter a (arbitrary) name and click next
7. Enter the details for a user account you want the component to run
under. Leaving it to interactive can be dangerous. Suppose somebody without
rights logs in, then your component will no longer work. It's better to
specify a user you created for this purpose with just enough rights..
8. Click finish
9. Expand your newly created package and right click Components and choose
New | Component
10. Click Next, then choose "Install new components"
11. Click add and browse for your DLL
12 Click next again and click finish.
Now your component is inside a package, which you can easily shutdown. When
you have compiled your DLL and tested it in your ASP page it will be
locked. Simply return to COM+ Services, right click the package (with the
name you gave in step 6) and choose Shut down. This will release the lock
on your DLL and you can recompile it again.
Even then, the DLL might still be locked every now and then. This can be
caused by Visual Interdev. Whenever you invoke the Intelli Sense dropdown
on a component, in an ASP page Interdev locks the DLL. In that case, simply
close the ASP page and recompile.
Using this method will save you lots of time. Shutting down an MTS / COM+
package is a matter of seconds, while on slower machines, restarting IIS
can take up to several minutes. Besides, on a (semi) production machine,
not your complete webserver goes down, but only the current package.
When ever you make changes to the interface of your component, you have to
reinstall the package. However, this is likely to happen way less frequent
than recompiling.
HtH
Imar
At 04:40 PM 3/2/2001 +0000, you wrote:
>Hi to all
>
>I am asking a very stupid question.
>I have created a dll called string2.dll using Binary Compatibility
>I tested it is working fine.
>Now I modified the code by 2 lines
>How do I recompile string2.dll using Binary Compatibility ?
>
>If I do by File -- Make string2.dll.
>I get an error permission denied
>This dll is used as an component in COM+ (windows 2000).
>
>
>How do I recompile string2.dll
>
>Thanks in advance
Message #8 by "Julian Eduardo de Anquin" <jdeanquin@1...> on Fri, 2 Mar 2001 12:27:23 -0600
|
|
If you are using COM+ services in Win2K you do not have to register your
dlls, you just add it as a new component
when you want to recompile your dll you just stop your application, in com+,
you replace your dll and thatīs it.
_____________________________________________
Julian Eduardo de Anquin -jdeanquin@i...
Grupo IPP - www.ipp.com.ar
|
|
 |