473,383 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Running VB.NET app from network

Hi everyone,
My coworker has a simple desktop app created in VB.NET.

He compiled it and posted on the network drive. When we try to run it from
it's network location, it generates unhandled exception error.
When we run it from local machine it runs fine.

Two things I want to get clarified.
1. Does VB.NET requires any specific namespace to be imported to run the exe
over network?

2. I can run other apps from network (Not VB.NET exe apps). Is it just the
..NET issue or more related to permissions on the network?

Any help is greatly appreciated.
Thanks,
Uday
Nov 21 '05 #1
3 6525
guy
assuming the .NET framework is on the server all you need to do is set up the
local pc to Trust the server

have a look at caspol.exe or mscorcfg.msc

and look for "trusted assemblies" in the online help

hth

guy
"Uday Deo" wrote:
Hi everyone,
My coworker has a simple desktop app created in VB.NET.

He compiled it and posted on the network drive. When we try to run it from
it's network location, it generates unhandled exception error.
When we run it from local machine it runs fine.

Two things I want to get clarified.
1. Does VB.NET requires any specific namespace to be imported to run the exe
over network?

2. I can run other apps from network (Not VB.NET exe apps). Is it just the
.NET issue or more related to permissions on the network?

Any help is greatly appreciated.
Thanks,
Uday

Nov 21 '05 #2
Toss something like this in the Main() method

Try
' Demand full trust as this application needs to be run from
' a network location
Dim fullTrust As New
PermissionSet(Permissions.PermissionState.Unrestri cted)
fullTrust.Demand()
SecondaryMain() ' some other method which does other startup functions
Catch ex As SecurityException
MessageBox.Show( _
"Your .NET Framework permissions will need to be adjusted before you can
" & _
"run this application." & Environment.NewLine & _
"Please have an administrator modify your .NET Security Wizard to set "
& _
"'Local Intranet' to Full Trust.", _
"Security Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
and in at the top of your class
Imports System.Security

This will at least handle the exception instead of leaving it unhandled. In
the Admin tools of the control panel, find the DNF wizard, click Adjust .NET
security, Next, click local intranet, and change the permissions to full
trust.

hth
Eric


Uday Deo wrote:
Hi everyone,
My coworker has a simple desktop app created in VB.NET.

He compiled it and posted on the network drive. When we try to run it
from it's network location, it generates unhandled exception error.
When we run it from local machine it runs fine.

Two things I want to get clarified.
1. Does VB.NET requires any specific namespace to be imported to run
the exe over network?

2. I can run other apps from network (Not VB.NET exe apps). Is it
just the .NET issue or more related to permissions on the network?

Any help is greatly appreciated.
Thanks,
Uday

Nov 21 '05 #3
Bob
Just as an aside to what the other said, I find it better to have the
executable launched locally. You can give users a shortcut to a batch file
on the server, which could copy the file locally (perhaps checking to see if
that particular version is already there first) and then launch it on the
client machine instead.

Bob

"Uday Deo" <Ud*****@discussions.microsoft.com> wrote in message
news:50**********************************@microsof t.com...
Hi everyone,
My coworker has a simple desktop app created in VB.NET.

He compiled it and posted on the network drive. When we try to run it from
it's network location, it generates unhandled exception error.
When we run it from local machine it runs fine.

Two things I want to get clarified.
1. Does VB.NET requires any specific namespace to be imported to run the exe over network?

2. I can run other apps from network (Not VB.NET exe apps). Is it just the
.NET issue or more related to permissions on the network?

Any help is greatly appreciated.
Thanks,
Uday

Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John Finch | last post by:
We are running SQL 7 on a Windows NT Server. If you copy a 25Mb file from this machine to a W2K server, the file copy takes over 5 minutes on a 100Mpbs switched network. Copying the same file to...
1
by: TomCullen | last post by:
I am trying to connect a new LBM Laptop to an SQL server on the network and I get "test connection failed because of an error in initializing provider, SQL server does not exist or access...
2
by: MF | last post by:
In visual basic 6 I can write an application and toss it up on a shared network drive for the company to access. Works like a champ. In .NET my C# application runs fine on anyones machine, but...
1
by: Gacu | last post by:
Hi! Have you met any problems with running C# program from network mapped drive? Of course I have .net framework installed on both machines. When I copy program file to local disk it works...
13
by: David Lozzi | last post by:
Howdy My following script is not processing at all! <script runat="server"> Sub Page_Load(sender as Object, e as EventArgs) lblWelcome.text = "hello" End Sub </script>
3
by: cj | last post by:
I have a program (soap client that also uses sql server stored procs) that I built and tested on my c: and it works great. It was decided it should be put on the network drive. I copied...
4
by: Jeremy S. | last post by:
We're in the process of writing a new Windows Forms app and the desktop support folks want for it to be run from a network share. I know it's possible (i.e., just have the framework on the clients...
2
by: Mike | last post by:
Can a vb program running as a serice not use network paths to do file/io? I can't seem to get my program to work with network paths and files. When I use local disk it works fine. When I run it...
1
by: utpal | last post by:
Hi, My CSharp program, when I run from the local drive it can create/modify registry. However running the program from a network drive, gives RegistryPremission error. I don't belive that just by...
2
by: giddy | last post by:
hi, I've heard its possible!? Is it? : preventing an application from running over a network. Or it would even be great if i could know if someone from a networked computer tried to run my...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.