By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,101 Members | 1,394 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,101 IT Pros & Developers. It's quick & easy.

System.TypeInitializationException

P: n/a
Jm
Hi all

I just finished converting a program from vb6 to vb.net by rewriting it bit
by bit. The program uses a dll which contains a servername and domain name
in it. Under vb6 all i had to was have this file registered by using
regsvr32 and no matter where it existed the program would work as long as it
was registered. Now ive made a new dll and compiled it and made a refernce
to it in the software as i did under vb6. The problem is first off if i try
to register it with regsvr32 in the usual spot i was putting it
(%WINDIR%\System32) i get a strange error saying the dllregisterserver entry
point is not found ? If i try to run the software i get a the exception. So
im guessing ive done something wrong along the way and need a bit of help to
get back on track. The .EXE file normally runs of a mapped network drive and
the DLL file is registered on the local machines. Tell me this is still
possible to do. Any help is greatly appreciated

Thanks
Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Jm
Hi all

Well i half solved my problem, i found that i had to assign a strong name to
my dll and put in the assembly directory on the machine. Which it now runs
from local hard drive ok but not from network, what else am i doing wrong ?

"Jm" <ja*****@ihug.com.au> wrote in message
news:cr**********@lust.ihug.co.nz...
Hi all

I just finished converting a program from vb6 to vb.net by rewriting it bit by bit. The program uses a dll which contains a servername and domain name
in it. Under vb6 all i had to was have this file registered by using
regsvr32 and no matter where it existed the program would work as long as it was registered. Now ive made a new dll and compiled it and made a refernce
to it in the software as i did under vb6. The problem is first off if i try to register it with regsvr32 in the usual spot i was putting it
(%WINDIR%\System32) i get a strange error saying the dllregisterserver entry point is not found ? If i try to run the software i get a the exception. So im guessing ive done something wrong along the way and need a bit of help to get back on track. The .EXE file normally runs of a mapped network drive and the DLL file is registered on the local machines. Tell me this is still
possible to do. Any help is greatly appreciated

Thanks

Nov 21 '05 #2

P: n/a
>Which it now runs
from local hard drive ok but not from network, what else am i doing wrong
?
Is security the issue here?

http://tinyurl.com/48z5l

I usually just run the wizard and chose "Adjust .Net Security" and grant the
computer Full Trust for intranet zone. Probably not the safest thing to do,
but it works and I only got to do it once.

Greg

"Jm" <ja*****@ihug.com.au> wrote in message
news:cr**********@lust.ihug.co.nz... Hi all

Well i half solved my problem, i found that i had to assign a strong name
to
my dll and put in the assembly directory on the machine. Which it now runs
from local hard drive ok but not from network, what else am i doing wrong
?

"Jm" <ja*****@ihug.com.au> wrote in message
news:cr**********@lust.ihug.co.nz...
Hi all

I just finished converting a program from vb6 to vb.net by rewriting it

bit
by bit. The program uses a dll which contains a servername and domain
name
in it. Under vb6 all i had to was have this file registered by using
regsvr32 and no matter where it existed the program would work as long as

it
was registered. Now ive made a new dll and compiled it and made a
refernce
to it in the software as i did under vb6. The problem is first off if i

try
to register it with regsvr32 in the usual spot i was putting it
(%WINDIR%\System32) i get a strange error saying the dllregisterserver

entry
point is not found ? If i try to run the software i get a the exception.

So
im guessing ive done something wrong along the way and need a bit of help

to
get back on track. The .EXE file normally runs of a mapped network drive

and
the DLL file is registered on the local machines. Tell me this is still
possible to do. Any help is greatly appreciated

Thanks


Nov 21 '05 #3

P: n/a
Jm
Hi greg

Yep, was a security issue, all fixed now. Thanks

"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:Og**************@tk2msftngp13.phx.gbl...
Which it now runs
from local hard drive ok but not from network, what else am i doing wrong ?
Is security the issue here?

http://tinyurl.com/48z5l

I usually just run the wizard and chose "Adjust .Net Security" and grant

the computer Full Trust for intranet zone. Probably not the safest thing to do, but it works and I only got to do it once.

Greg

"Jm" <ja*****@ihug.com.au> wrote in message
news:cr**********@lust.ihug.co.nz...
Hi all

Well i half solved my problem, i found that i had to assign a strong name to
my dll and put in the assembly directory on the machine. Which it now runs from local hard drive ok but not from network, what else am i doing wrong ?

"Jm" <ja*****@ihug.com.au> wrote in message
news:cr**********@lust.ihug.co.nz...
Hi all

I just finished converting a program from vb6 to vb.net by rewriting it

bit
by bit. The program uses a dll which contains a servername and domain
name
in it. Under vb6 all i had to was have this file registered by using
regsvr32 and no matter where it existed the program would work as long
as it
was registered. Now ive made a new dll and compiled it and made a
refernce
to it in the software as i did under vb6. The problem is first off if i

try
to register it with regsvr32 in the usual spot i was putting it
(%WINDIR%\System32) i get a strange error saying the dllregisterserver

entry
point is not found ? If i try to run the software i get a the
exception. So
im guessing ive done something wrong along the way and need a bit of
help to
get back on track. The .EXE file normally runs of a mapped network
drive and
the DLL file is registered on the local machines. Tell me this is still
possible to do. Any help is greatly appreciated

Thanks



Nov 21 '05 #4

P: n/a
Jm
Hi all

Is it possible to trap this error (the error being that a referenced dll has
not been added to the assembly cache on the machine) ?

Thanks

"Jm" <ja*****@ihug.com.au> wrote in message
news:cr**********@lust.ihug.co.nz...
Hi all

I just finished converting a program from vb6 to vb.net by rewriting it bit by bit. The program uses a dll which contains a servername and domain name
in it. Under vb6 all i had to was have this file registered by using
regsvr32 and no matter where it existed the program would work as long as it was registered. Now ive made a new dll and compiled it and made a refernce
to it in the software as i did under vb6. The problem is first off if i try to register it with regsvr32 in the usual spot i was putting it
(%WINDIR%\System32) i get a strange error saying the dllregisterserver entry point is not found ? If i try to run the software i get a the exception. So im guessing ive done something wrong along the way and need a bit of help to get back on track. The .EXE file normally runs of a mapped network drive and the DLL file is registered on the local machines. Tell me this is still
possible to do. Any help is greatly appreciated

Thanks

Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.