Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB . NET EXE running over network utilizing ADO 1

Status
Not open for further replies.

arniec

Programmer
Jul 22, 2003
49
US
I have a Visual Basic .Net front-end to a Microsoft Access back-end. The Back-end is stored on a network share and during development, all of which took place on my desktop system, things went fine. The program uses an ADO connection to the database with the line

Dim conn As New OleDb.OleDbConnection( _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & _
"\\networkshare\mydb.mdb")

This worked just fine. Now, however, I want to distribute this EXE to the end users and enable them to run it over a network. When I run it from the network, however, I receive the error message:

JIT Debugging failed with the following error: 0x800405a6

Please check the documentation topic 'Just-in-time debugging errors' for more information.

Well, I did some digging on these very forums and found that it is a security issue and I was able to resolve this by going into Administrative Tools -> .NET Wizards -> Adjust .NET Security and setting Local Intranet to "Full". Now it runs fine on my system, but this doesn't fix my problem.

This application will be run on dozens of systems across several sites where the users' computer policy does not enable them to even view Administrative Tools in their Control Panels. Thus, they are locked out. Having all of them copy the EXE file to their desktops is equally not an option.

Can someone please show me a solution to this problem?

BTW, I'm certain the problem lies in my database access, as I have commented the lines out and executed and it goes just fine, so the breech of the security policy is directly linked to the ADO.

THANK YOU...PLEASE help me. I can't have wasted all this development time.
 
Code:
Dim conn As New SqlClient.SqlConnection("Data Source = D3HTT321; Initial Catalog = d_alt_lending")
        conn.Open()
        msgbox "It opened."
        conn.Close()
        msgbox "It closed."

 
Well, you're missing the line ';Integrated Security=True' from your SQLConnection string.
I'm not sure how to write a security-free .NET app - it's rather integral to the whole thing. Really, there's nothing unusual about your app and it should be a simple matter for the IT Support guys to deploy it. Presumably they were able to deploy the .NET Framework to every machine (unless you're using XP/2003). They will have some way of automatically deploying applications, so use Visual Studio to create a deployment package and tell them to deploy it. This will mean the exe is held in a folder on their hard disk though. If you wish to upgrade the app you could either get IT Support to do it (automatically upgrading overnight when you ask them to) or amend your app so that when it loads (from the hard disk) it checks to see if there is a newer version in a central network location. This could be done by using a simple calling app thus :

LaunchApp checks location for newer version in network folder.
If newer version exists, copies over local MainApp, then launches updated MainApp.
If not, just launch local MainApp

This should work fine for simple apps.
 
Yeah, even with the Integrated Security I get an error from the network, and it workes fine from the desktop.

I'm looking more into the "copy the file" solution. It may be the best/only way (packaging is not really an option)

One question: if I have A.EXE on someone's C drive and they launch A.EXE and it compares the date of A.EXE on their hard drive to A.EXE on the network, and if the network one is newer it copies the newer file over, will that work as A.EXE is currently in use?

or will I need A.EXE to be a "launcher" program which checks B.EXE local against B.EXE remote, copies the file if necessary, and then launches B.EXE?

Thanks,

Sorry for all the questions but I think I'm nearing a solution. I hope!
 
will I need A.EXE to be a "launcher" program which checks B.EXE local against B.EXE remote, copies the file if necessary, and then launches B.EXE?

Yes, this one.

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day! Ye has a choice: talk like a pira
 
Yeah, even with the Integrated Security I get an error from the network, and it workes fine from the desktop."

So you are trying to run your application off the network? If so, that is the problem, no if, ands, or buts about it. If you want to run a .Net application from a network share you need to have security configured to do so. I misunderstood your previous post, sorry for the confussion.

If you are trying to run your application from the desktop and access network resources, you should not need to alter security.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Personally, I look at it this way. If you've written an application that your users need, then it's the job of the network guys to deploy it. There's two real choices here. Either this is an application that is not needed, in which case you're really out of luck; or it's a needed app and it won't be hard to go over a cable jockey's head. You may have to get management involved to get the network guys to do their job.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top