.exe从本地但不是网络驱动器抛出异常 [英] .exe throws exception from local, but not network drive

查看:56
本文介绍了.exe从本地但不是网络驱动器抛出异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用VB.NET(在我的客户端PC上)将VB6可执行文件

转换为.NET可执行文件。将.exe文件放在我的服务器上的网络驱动器

上。从客户端,运行.NET Wizards" Trust an

Assembly"制作.exe(在网络驱动器上,在

服务器上)完全信任。从客户端,双击

..exe(在网络驱动器上,在服务器上),它运行正常。


到目前为止,很好,但是......


在服务器上,我安装的不是VB.NET而是.NET

Framework 1.1,运行Microsoft。 .NET Framework 1.1向导

信任程序集制作.exe(在服务器的本地硬盘上b $ b驱动器,而不是网络驱动器)完全信任,

棒,但当我双击.exe(在服务器上,

在本地硬盘上)时,CLR调试服务给出了

应用程序已生成一个例外情况,无法处理
。关于如何调试这个的任何建议,从没有安装VB.NET的

服务器,将不胜感激。


我怀疑异常是系统.Security.SecurityException

但不知道在哪里放置Try / Catch / End代码,因为在表单加载之前抛出

异常,并且不要''知道

如何调用服务器上的JIT调试器。


BTW服务器是Win2K Pro;客户端是XP Home。

有什么建议吗?我是.NET的新手,并没有找到.NET

安全性(好像你不能告诉。)VB6版本

of .exe运行正常,无论我放在哪里,本地硬盘或网络

驱动器。该应用程序使用文件系统对象,如果这是一个线索。


- frosty

Used VB.NET (on my client PC) to convert VB6 executable
to .NET executable. Placed the .exe file on a network drive
on my server. From client, ran .NET Wizards "Trust an
Assembly" to make the .exe (on the network drive, on the
server) "Full Trust." From the client, double-click on the
..exe (on the network drive, on the server) and it runs fine.

So far, so good, but...

On the server, where I''ve installed not VB.NET but .NET
Framework 1.1, ran Microsoft .NET Framework 1.1 Wizards
"Trust an Assembly" to make the .exe (on the local hard
drive of the server, not a network drive) "Full Trust," which
sticks, but when I double-click on the .exe (on the server,
on the local hard drive) CLR Debugging Services gives
"Application has generated an exception that could not
be handled." Any advice on how to debug this, from the
server, where VB.NET is not installed, would be appreciated.

I suspect the exception is System.Security.SecurityException
but don''t know where to put Try/Catch/End code, as the
exception is thrown before the form loads, and don''t know
how to invoke the JIT debugger on the server.

BTW Server is Win2K Pro; client is XP Home.
Any suggestions? I''m new to .NET and haven''t got .NET
security figured out (as if you couldn''t tell.) The VB6 version
of the .exe ran fine, wherever I put it, local hard drive or network
drive. The application uses File System Object, if that''s a clue.

-- frosty

推荐答案

在该服务器上拥有足够的权限?尝试使用管理员帐户运行.exe


-

Ceers,

Crirus

------------------------------

如果工作是好事,老板会从你那里拿走这一切


------------------------------


" frostalicious" < FR ***** @ nospam.com>在消息中写道

news:vr ************ @ corp.supernews.com ...
Have enough rights on that server? Try with an admin account to run the .exe

--
Ceers,
Crirus

------------------------------
If work were a good thing, the boss would take it all from you

------------------------------

"frostalicious" <fr*****@nospam.com> wrote in message
news:vr************@corp.supernews.com...
使用VB.NET(在我身上)客户端PC)将VB6可执行文件转换为.NET可执行文件。将.exe文件放在我的服务器上的网络驱动器上。从客户端,运行.NET WizardsTrust a
Assembly制作.exe(在网络驱动器上,在
服务器上)完全信任。从客户端,双击
.exe(在网络驱动器上,在服务器上)它运行正常。

到目前为止,这么好,但是......在服务器上,我安装的不是VB.NET而是.NET
Framework 1.1,运行Microsoft .NET Framework 1.1向导
信任程序集。制作.exe(在服务器的本地硬盘驱动器上,而不是网络驱动器上)完全信任,哪个坚持,但当我双击.exe(在服务器上,在本地硬盘上)时,CLR调试服务给出了
应用程序已生成异常,但无法
待办理。关于如何从未安装VB.NET的
服务器进行调试的任何建议都将不胜感激。

我怀疑异常是System.Security.SecurityException
但是不知道在哪里放置Try / Catch / End代码,因为在表单加载之前抛出了
异常,并且不知道如何在服务器上调用JIT调试器。

BTW服务器是Win2K Pro;客户端是XP Home。
有什么建议吗?我是.NET的新手,并没有找到.NET安全性(就好像你无法分辨。).exe的VB6版本运行良好,无论我在哪里把它,本地硬盘或网络驱动器。该应用程序使用文件系统对象,如果这是一个线索。

- frosty
Used VB.NET (on my client PC) to convert VB6 executable
to .NET executable. Placed the .exe file on a network drive
on my server. From client, ran .NET Wizards "Trust an
Assembly" to make the .exe (on the network drive, on the
server) "Full Trust." From the client, double-click on the
.exe (on the network drive, on the server) and it runs fine.

So far, so good, but...

On the server, where I''ve installed not VB.NET but .NET
Framework 1.1, ran Microsoft .NET Framework 1.1 Wizards
"Trust an Assembly" to make the .exe (on the local hard
drive of the server, not a network drive) "Full Trust," which
sticks, but when I double-click on the .exe (on the server,
on the local hard drive) CLR Debugging Services gives
"Application has generated an exception that could not
be handled." Any advice on how to debug this, from the
server, where VB.NET is not installed, would be appreciated.

I suspect the exception is System.Security.SecurityException
but don''t know where to put Try/Catch/End code, as the
exception is thrown before the form loads, and don''t know
how to invoke the JIT debugger on the server.

BTW Server is Win2K Pro; client is XP Home.
Any suggestions? I''m new to .NET and haven''t got .NET
security figured out (as if you couldn''t tell.) The VB6 version
of the .exe ran fine, wherever I put it, local hard drive or network
drive. The application uses File System Object, if that''s a clue.

-- frosty



> " frostalicious" < FR ***** @ nospam.com>在消息中写道
> "frostalicious" <fr*****@nospam.com> wrote in message
news:vr ************ @ corp.supernews.com ...
news:vr************@corp.supernews.com...
使用VB.NET(在我的身上)客户端PC)将VB6可执行文件转换为.NET可执行文件。将.exe文件放在我的服务器上的网络驱动器上。从客户端,运行.NET WizardsTrust a
Assembly制作.exe(在网络驱动器上,在
服务器上)完全信任。从客户端,双击
.exe(在网络驱动器上,在服务器上)它运行正常。

到目前为止,这么好,但是......在服务器上,我安装的不是VB.NET而是.NET
Framework 1.1,运行Microsoft .NET Framework 1.1向导
信任程序集。制作.exe(在服务器的本地硬盘驱动器上,而不是网络驱动器上)完全信任,哪个坚持,但当我双击.exe(在服务器上,在本地硬盘上)时,CLR调试服务给出了
应用程序已生成异常,但无法
待办理。关于如何从未安装VB.NET的
服务器进行调试的任何建议都将不胜感激。

我怀疑异常是System.Security.SecurityException
但是不知道在哪里放置Try / Catch / End代码,因为在表单加载之前抛出了
异常,并且不知道如何在服务器上调用JIT调试器。

BTW服务器是Win2K Pro;客户端是XP Home。
有什么建议吗?我是.NET的新手,并没有找到.NET安全性(就好像你无法分辨。).exe的VB6版本运行良好,无论我在哪里把它,本地硬盘或网络驱动器。该应用程序使用文件系统对象,如果这是一个线索。

- frosty
Used VB.NET (on my client PC) to convert VB6 executable
to .NET executable. Placed the .exe file on a network drive
on my server. From client, ran .NET Wizards "Trust an
Assembly" to make the .exe (on the network drive, on the
server) "Full Trust." From the client, double-click on the
.exe (on the network drive, on the server) and it runs fine.

So far, so good, but...

On the server, where I''ve installed not VB.NET but .NET
Framework 1.1, ran Microsoft .NET Framework 1.1 Wizards
"Trust an Assembly" to make the .exe (on the local hard
drive of the server, not a network drive) "Full Trust," which
sticks, but when I double-click on the .exe (on the server,
on the local hard drive) CLR Debugging Services gives
"Application has generated an exception that could not
be handled." Any advice on how to debug this, from the
server, where VB.NET is not installed, would be appreciated.

I suspect the exception is System.Security.SecurityException
but don''t know where to put Try/Catch/End code, as the
exception is thrown before the form loads, and don''t know
how to invoke the JIT debugger on the server.

BTW Server is Win2K Pro; client is XP Home.
Any suggestions? I''m new to .NET and haven''t got .NET
security figured out (as if you couldn''t tell.) The VB6 version
of the .exe ran fine, wherever I put it, local hard drive or network
drive. The application uses File System Object, if that''s a clue.

-- frosty



Crirus写道:在该服务器上有足够的权限吗?尝试使用管理员帐户运行


---------------------------- -
如果工作是件好事,那么老板就会把这一切都从你手中夺走

--------------------- ---------


Crirus wrote: Have enough rights on that server? Try with an admin account to run
the .exe

------------------------------
If work were a good thing, the boss would take it all from you

------------------------------




谢谢,但那不是问题。事实证明,例外情况与
无关。与System.Security.SecurityException无关。通过从客户端复制

DLL'到服务器,能够在命令提示符框中获得足够的

调试器信息,以确定它是另一个

缺少DLL,即Microsoft.VisualBasic.Compatibility.dll,当我将该DLL复制到服务器时,我的应用程序开始工作。

我肯定有更好的方法可以确保有问题的dll分发

与.exe这是我的应用程序。有人知道这应该怎么做?b
?可以在VB.NET中完成,还是需要VS.NET?


- frosty



Thanks, but that was not the problem. Turns out the exception had
nothing to do with System.Security.SecurityException. By copying
DLL''s from the client to the server, was able to get enough of the
debugger info, in a command prompt box, to determine it was another
missing DLL, namely Microsoft.VisualBasic.Compatibility.dll and when
I copied that DLL to the server, my app started to work.

I''m sure there''s a better way to assure the dll in question gets distributed
with the .exe that is my app. Anybody know how this is supposed to
be done? Can it be done in VB.NET or do I need VS.NET?

-- frosty


frostalicious,
frostalicious,
我确定有更好的方法可以确保有问题的dll与我的应用程序.exe一起分发
。有谁知道这应该怎么做?它可以在VB.NET中完成还是需要VS.NET?




框架中不包含Microsoft.VisualBasic.Compatibility.dll,您需要自己安装。


我的第一个建议是尽可能避免使用兼容性DLL。如果

不是一个选项,那么您可能需要考虑一个安装项目来确保所有组件都安装在正确的位置。


希望这有帮助

Jay

frostalicious < FR ***** @ nospam.com>在消息中写道

news:vr ************ @ corp.supernews.com ...
I''m sure there''s a better way to assure the dll in question gets distributed with the .exe that is my app. Anybody know how this is supposed to
be done? Can it be done in VB.NET or do I need VS.NET?
The Microsoft.VisualBasic.Compatibility.dll is not included with the
framework, you need to install it yourself.

My first advice is to avoid the Compatibility DLL if at all possible. If
that is not an option, then you may want to consider a Setup project to
ensure that all the components get installed, in the correct location.

Hope this helps
Jay
"frostalicious" <fr*****@nospam.com> wrote in message
news:vr************@corp.supernews.com...
霜冻 < FR ***** @ nospam.com>在消息中写道
新闻:vr ************ @ corp.supernews.com ...
"frostalicious" <fr*****@nospam.com> wrote in message
news:vr************@corp.supernews.com...
使用VB.NET(在我的客户端PC上)将VB6可执行文件转换为.NET可执行文件。将.exe文件放在我的服务器上的网络驱动器上。从客户端,运行.NET WizardsTrust a
Assembly制作.exe(在网络驱动器上,在
服务器上)完全信任。从客户端,双击
.exe(在网络驱动器上,在服务器上)它运行正常。

到目前为止,这么好,但是......在服务器上,我安装的不是VB.NET而是.NET
Framework 1.1,运行Microsoft .NET Framework 1.1向导
信任程序集。制作.exe(在服务器的本地硬盘驱动器上,而不是网络驱动器上)完全信任,哪个坚持,但当我双击.exe(在服务器上,在本地硬盘上)时,CLR调试服务给出了
应用程序已生成异常,但无法
待办理。关于如何从未安装VB.NET的
服务器进行调试的任何建议都将不胜感激。

我怀疑异常是System.Security.SecurityException
但是不知道在哪里放置Try / Catch / End代码,因为在表单加载之前抛出了
异常,并且不知道如何在服务器上调用JIT调试器。

BTW服务器是Win2K Pro;客户端是XP Home。
有什么建议吗?我是.NET的新手,并没有找到.NET安全性(就好像你无法分辨。).exe的VB6版本运行良好,无论我在哪里把它,本地硬盘或网络驱动器。该应用程序使用文件系统对象,如果这是一个线索。

- frosty
Used VB.NET (on my client PC) to convert VB6 executable
to .NET executable. Placed the .exe file on a network drive
on my server. From client, ran .NET Wizards "Trust an
Assembly" to make the .exe (on the network drive, on the
server) "Full Trust." From the client, double-click on the
.exe (on the network drive, on the server) and it runs fine.

So far, so good, but...

On the server, where I''ve installed not VB.NET but .NET
Framework 1.1, ran Microsoft .NET Framework 1.1 Wizards
"Trust an Assembly" to make the .exe (on the local hard
drive of the server, not a network drive) "Full Trust," which
sticks, but when I double-click on the .exe (on the server,
on the local hard drive) CLR Debugging Services gives
"Application has generated an exception that could not
be handled." Any advice on how to debug this, from the
server, where VB.NET is not installed, would be appreciated.

I suspect the exception is System.Security.SecurityException
but don''t know where to put Try/Catch/End code, as the
exception is thrown before the form loads, and don''t know
how to invoke the JIT debugger on the server.

BTW Server is Win2K Pro; client is XP Home.
Any suggestions? I''m new to .NET and haven''t got .NET
security figured out (as if you couldn''t tell.) The VB6 version
of the .exe ran fine, wherever I put it, local hard drive or network
drive. The application uses File System Object, if that''s a clue.

-- frosty



Crirus写道:



Crirus wrote:

在该服务器上拥有足够的权限?尝试使用管理员帐户运行


---------------------------- -
如果工作是件好事,那么老板就会把这一切都从你手中夺走

--------------------- ---------
Have enough rights on that server? Try with an admin account to run
the .exe

------------------------------
If work were a good thing, the boss would take it all from you

------------------------------



谢谢,但那不是问题。结果是异常与System.Security.SecurityException无关。通过将DLL从客户端复制到服务器,能够在命令提示符框中获得足够的调试信息,以确定它是另一个缺少的DLL,即Microsoft.VisualBasic.Compatibility.dll当我将该DLL复制到服务器时,我的应用程序开始工作。

我相信有更好的方法可以确保dll问题得到



Thanks, but that was not the problem. Turns out the exception had
nothing to do with System.Security.SecurityException. By copying
DLL''s from the client to the server, was able to get enough of the
debugger info, in a command prompt box, to determine it was another
missing DLL, namely Microsoft.VisualBasic.Compatibility.dll and when
I copied that DLL to the server, my app started to work.

I''m sure there''s a better way to assure the dll in question gets



与我的应用程序.exe一起分发。有谁知道这应该怎么做?它可以在VB.NET中完成还是需要VS.NET?

- frosty


distributed with the .exe that is my app. Anybody know how this is supposed to
be done? Can it be done in VB.NET or do I need VS.NET?

-- frosty



这篇关于.exe从本地但不是网络驱动器抛出异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆