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

Call from VB6 program to .NET assembly on network drive.

P: n/a
Hi!

We built VB6 application to work with Reporting Services server. To connect
to reporting server has been created a special assembly with .NET VS2003.
While we execute our program on local machine, every thing works. But when we
put the whole program on network drive, the VB6 program could not create
required object from .NET assembly.
Nothing we done were not useful to help to solve the problem.

Does anybody have idea?

Thanks!

Best regards.
Igor.
Nov 20 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
You need to have strong sighed assembly ant increase assembly trust
http://groups.google.com/group/micro...264d3d9af9ee92

For other details look through there
http://groups.google.com/groups/sear...ly+trust+level

--
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche


"Igor" wrote:
Hi!

We built VB6 application to work with Reporting Services server. To connect
to reporting server has been created a special assembly with .NET VS2003.
While we execute our program on local machine, every thing works. But when we
put the whole program on network drive, the VB6 program could not create
required object from .NET assembly.
Nothing we done were not useful to help to solve the problem.

Does anybody have idea?

Thanks!

Best regards.
Igor.
Nov 20 '06 #2

P: n/a
Michael,

Thanks for your response!

The assembly we created already has a strong name as required.
We also registered it with RegAsm utility.

We produced all steps as you offer, but stile have the same problem.
We have VB6 executable program and .NET Dll assembly.
But if we replace VB6 exe application with small .NET exe application, just
in case to test our assembly Dll, everything works fine.
Just like we have a problem to call only from VB6 executable to .NET Dll
assembly,
and no Security Policy change makes any different.

Of cause on local disk everything works fine.

Thanks!
Igor.
"Michael Nemtsev" wrote:
You need to have strong sighed assembly ant increase assembly trust
http://groups.google.com/group/micro...264d3d9af9ee92

For other details look through there
http://groups.google.com/groups/sear...ly+trust+level

--
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche


"Igor" wrote:
Hi!

We built VB6 application to work with Reporting Services server. To connect
to reporting server has been created a special assembly with .NET VS2003.
While we execute our program on local machine, every thing works. But when we
put the whole program on network drive, the VB6 program could not create
required object from .NET assembly.
Nothing we done were not useful to help to solve the problem.

Does anybody have idea?

Thanks!

Best regards.
Igor.
Nov 20 '06 #3

P: n/a
Hello Igor,

IThe assembly we created already has a strong name as required. We
Ialso registered it with RegAsm utility.

to the network path?

IWe produced all steps as you offer, but stile have the same problem.
IWe have VB6 executable program and .NET Dll assembly.
IBut if we replace VB6 exe application with small .NET exe
Iapplication, just
Iin case to test our assembly Dll, everything works fine.
IJust like we have a problem to call only from VB6 executable to .NET
IDll
Iassembly,

How do u call it, and what the error is?
I"Michael Nemtsev" wrote:
I>
>You need to have strong sighed assembly ant increase assembly trust
http://groups.google.com/group/micro...vjsharp/browse
_thread/thread/996b37a9a9205fd9/b3264d3d9af9ee92

For other details look through there
http://groups.google.com/groups/sear...8&q=network+as
sembly+trust+level

-- WBR, Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents
do not cease to be insipid." (c) Friedrich Nietzsche

"Igor" wrote:
>>Hi!

We built VB6 application to work with Reporting Services server. To
connect
to reporting server has been created a special assembly with .NET
VS2003.
While we execute our program on local machine, every thing works.
But when we
put the whole program on network drive, the VB6 program could not
create
required object from .NET assembly.
Nothing we done were not useful to help to solve the problem.
Does anybody have idea?

Thanks!

Best regards.
Igor.
---
WBR,
Michael Nemtsev [C# MVP] :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Nov 20 '06 #4

P: n/a
Michael,

here is a .NET Dll assembly full code:
************************************************** *******
using System;

namespace TextRSAccess
{
public class CTextRSAccess
{
public CTextRSAccess()
{
}
public int ValueData
{
get { return 3; }
set { int iValue = value;}
}
}
}
************************************************** *******
It realy very simple, just for testing.
And here it is VB6 Command button click event function, that calls to this
..NER Dll.

************************************************** *******
Private Sub Command1_Click()
Dim oRSccess As TextRSAccess.CTextRSAccess
Dim iValue As Integer

On Error Resume Next

Set oRSccess = New TextRSAccess.CTextRSAccess
If (Err <0) Then
MsgBox "Error: Set oRSccess = New TextRSAccess.CTextRSAccess"
Else
iValue = oRSccess.ValueData
If (Err <0) Then
MsgBox "Error: iValue = oRSccess.ValueData"
Else
MsgBox Format$(iValue)
End If
End If

End Sub
************************************************** *******
The error occures on line: Set oRSccess = New TextRSAccess.CTextRSAccess

The error is:
Run-time error '430':
Class does not support Automation or does not support excepted interface.

Of cause, from local drive everything works fine.
We mapped network drive, but the same thing happens also without mapping.

No changes in Security policy makes any different.

What we are doing wrong?
"Michael Nemtsev" wrote:
Hello Igor,

IThe assembly we created already has a strong name as required. We
Ialso registered it with RegAsm utility.

to the network path?

IWe produced all steps as you offer, but stile have the same problem.
IWe have VB6 executable program and .NET Dll assembly.
IBut if we replace VB6 exe application with small .NET exe
Iapplication, just
Iin case to test our assembly Dll, everything works fine.
IJust like we have a problem to call only from VB6 executable to .NET
IDll
Iassembly,

How do u call it, and what the error is?
I"Michael Nemtsev" wrote:
I>
You need to have strong sighed assembly ant increase assembly trust
http://groups.google.com/group/micro...vjsharp/browse
_thread/thread/996b37a9a9205fd9/b3264d3d9af9ee92

For other details look through there
http://groups.google.com/groups/sear...8&q=network+as
sembly+trust+level

-- WBR, Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents
do not cease to be insipid." (c) Friedrich Nietzsche

"Igor" wrote:

Hi!

We built VB6 application to work with Reporting Services server. To
connect
to reporting server has been created a special assembly with .NET
VS2003.
While we execute our program on local machine, every thing works.
But when we
put the whole program on network drive, the VB6 program could not
create
required object from .NET assembly.
Nothing we done were not useful to help to solve the problem.
Does anybody have idea?

Thanks!

Best regards.
Igor.
---
WBR,
Michael Nemtsev [C# MVP] :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Nov 21 '06 #5

P: n/a
Ok, now it works!

It's really some strange behavior while both 1.1 and 2.0 frameworks
installed on the same machine.
Even the .NET Dll assembly created in VS2003 for framework 1.1, no changes
in Security policy of 1.1 applies to it. By if create full trust for this
assembly in 2.0 Security policy configurations, the program will run fine.
But on machine with only 1.1 frameworks installed the same changes in 1.1
Security policy configuration works well.

Thanks a lot!

Igor.
"Igor" wrote:
Michael,

here is a .NET Dll assembly full code:
************************************************** *******
using System;

namespace TextRSAccess
{
public class CTextRSAccess
{
public CTextRSAccess()
{
}
public int ValueData
{
get { return 3; }
set { int iValue = value;}
}
}
}
************************************************** *******
It realy very simple, just for testing.
And here it is VB6 Command button click event function, that calls to this
.NER Dll.

************************************************** *******
Private Sub Command1_Click()
Dim oRSccess As TextRSAccess.CTextRSAccess
Dim iValue As Integer

On Error Resume Next

Set oRSccess = New TextRSAccess.CTextRSAccess
If (Err <0) Then
MsgBox "Error: Set oRSccess = New TextRSAccess.CTextRSAccess"
Else
iValue = oRSccess.ValueData
If (Err <0) Then
MsgBox "Error: iValue = oRSccess.ValueData"
Else
MsgBox Format$(iValue)
End If
End If

End Sub
************************************************** *******
The error occures on line: Set oRSccess = New TextRSAccess.CTextRSAccess

The error is:
Run-time error '430':
Class does not support Automation or does not support excepted interface.

Of cause, from local drive everything works fine.
We mapped network drive, but the same thing happens also without mapping.

No changes in Security policy makes any different.

What we are doing wrong?
"Michael Nemtsev" wrote:
Hello Igor,

IThe assembly we created already has a strong name as required. We
Ialso registered it with RegAsm utility.

to the network path?

IWe produced all steps as you offer, but stile have the same problem.
IWe have VB6 executable program and .NET Dll assembly.
IBut if we replace VB6 exe application with small .NET exe
Iapplication, just
Iin case to test our assembly Dll, everything works fine.
IJust like we have a problem to call only from VB6 executable to .NET
IDll
Iassembly,

How do u call it, and what the error is?
I"Michael Nemtsev" wrote:
I>
>You need to have strong sighed assembly ant increase assembly trust
>http://groups.google.com/group/micro...vjsharp/browse
>_thread/thread/996b37a9a9205fd9/b3264d3d9af9ee92
>>
>For other details look through there
>http://groups.google.com/groups/sear...8&q=network+as
>sembly+trust+level
>>
>-- WBR, Michael Nemtsev :: blog: http://spaces.live.com/laflour
>>
>"At times one remains faithful to a cause only because its opponents
>do not cease to be insipid." (c) Friedrich Nietzsche
>>
>"Igor" wrote:
>>
>>Hi!
>>>
>>We built VB6 application to work with Reporting Services server. To
>>connect
>>to reporting server has been created a special assembly with .NET
>>VS2003.
>>While we execute our program on local machine, every thing works.
>>But when we
>>put the whole program on network drive, the VB6 program could not
>>create
>>required object from .NET assembly.
>>Nothing we done were not useful to help to solve the problem.
>>Does anybody have idea?
>>>
>>Thanks!
>>>
>>Best regards.
>>Igor.
---
WBR,
Michael Nemtsev [C# MVP] :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche

Nov 21 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.