Click here to Skip to main content
15,901,853 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Call VB program with a parm [modifed] Pin
Scott Serl19-May-06 11:13
Scott Serl19-May-06 11:13 
GeneralRe: Call VB program with a parm [modifed] Pin
Joshua Quick19-May-06 12:06
Joshua Quick19-May-06 12:06 
QuestionHow track and step out of recursive method Pin
erikkl200018-May-06 8:29
erikkl200018-May-06 8:29 
QuestionWindows Service issue!!! Pin
alexvw18-May-06 7:48
alexvw18-May-06 7:48 
AnswerRe: Windows Service issue!!! Pin
Rizwan Bashir19-May-06 5:05
Rizwan Bashir19-May-06 5:05 
GeneralThanks... Pin
alexvw19-May-06 6:29
alexvw19-May-06 6:29 
Questionerror while running from a network machine Pin
Paps218-May-06 6:19
Paps218-May-06 6:19 
AnswerRe: error while running from a network machine Pin
Dave Bacher18-May-06 7:58
Dave Bacher18-May-06 7:58 
Programs run from a network share run with a lower permission than applications run from the local machine. This is because the network share could be a WebDav drive out on the internet, etc.

The first thing is, the connection string won't work from your machine. When your machine runs the code, it will see "Data Source=(local)," and it will attempt to attach to your machine and not the networked machine. Presumably, you want to run against the databse on the network machine. So your connection string needs to look like:
Data Source=SERVER\.;Initial Catalog=Rsch1;Integrated Security=SSPI

Additionally both your machine and the server must be members of mutually trusted domains, or SSPI will fail. If you are in a workgroup, you probably can't use integrated security (SSPI) reliably, but your milage may vary.

Of course, in my version of the connect string, SERVER needs to be either the IP Address of your SQL Server or its machine name -- it shouldn't be the word SERVER unless that happens to be what its name is. Also, you need to make sure that SQL Server is configured to allow remote connections (Surface Area Manager in newer versions configures it for connections from the same machine only by default -- you can change this in your management tool).

Additionally, when you are running from a network share, you lose permissions from the .NET framework. When you run from your local drive, you run at full trust. When you run from a network share, you don't run at full trust. This is a defense mechanism against Worm programs and other attacks.

In control panel, you can use the .NET Configuration Assistance to trust the assembly or publisher. If you are on a corporate network, you want to have a domain administrator update the group policy to allow the executable the necessary permissions. If you are using .NET 2.0, the SDK provides a program that can tell you the exact permissions your application requires.

The tool is named SecUtil, and it usually is in C:\Program Files\Microsoft.NET\SDK\v2.0\bin\secutil -- depending on your install order versus mine, it may be in a different location (I install the SDK, then install Visual Studio -- if you install the SDK as part of Visual Studio, then it ends up under Visual Studio somewhere). There is documentation on the tool on Microsoft's site.

Note that you'll have to adjust the machine configuration or user configuration to trust the assembly -- there is nothing you can do on the network share to trust it. This is a defense mechanism. The best bet, if you are the developer, is to sign the application, and trust that publisher -- that way your network people can push that trust to all your machines that want to run the app, and when you write additional apps, you can just sign them versus having to go through this whole process again.
QuestionWhat is the Select Case syntax for Radio Buttons / textboxes in a GroupBox Control? Pin
Rashar18-May-06 5:55
Rashar18-May-06 5:55 
AnswerRe: What is the Select Case syntax for Radio Buttons / textboxes in a GroupBox Control? Pin
Raistlin21_4519-May-06 4:54
Raistlin21_4519-May-06 4:54 
QuestionWindows hook help Pin
Member 296885118-May-06 5:10
Member 296885118-May-06 5:10 
AnswerRe: Windows hook help Pin
MohammadAmiry18-May-06 5:19
MohammadAmiry18-May-06 5:19 
QuestionWebbrowser control help Pin
Member 296885118-May-06 5:06
Member 296885118-May-06 5:06 
QuestionMAPI Pin
cj433118-May-06 5:03
cj433118-May-06 5:03 
AnswerRe: MAPI Pin
Dave Bacher18-May-06 7:41
Dave Bacher18-May-06 7:41 
GeneralRe: MAPI Pin
cj433118-May-06 8:04
cj433118-May-06 8:04 
GeneralRe: MAPI Pin
cj433118-May-06 8:24
cj433118-May-06 8:24 
GeneralRe: MAPI Pin
cj433119-May-06 4:56
cj433119-May-06 4:56 
QuestionApplication.Undo Method Pin
slw1234@sbcglobal.net18-May-06 4:28
slw1234@sbcglobal.net18-May-06 4:28 
Questionproble in landscape and portrait images in asp.net 1.1 Pin
amaneet18-May-06 3:00
amaneet18-May-06 3:00 
AnswerRe: proble in landscape and portrait images in asp.net 1.1 Pin
_AK_18-May-06 19:55
_AK_18-May-06 19:55 
Questionproblem Pin
amaneet18-May-06 2:50
amaneet18-May-06 2:50 
AnswerRe: problem Pin
Colin Angus Mackay18-May-06 4:32
Colin Angus Mackay18-May-06 4:32 
GeneralRe: problem Pin
amaneet18-May-06 20:05
amaneet18-May-06 20:05 
QuestionHow to embed the dll in my project? Pin
cylix200018-May-06 1:49
cylix200018-May-06 1:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.