?
Solved

VB.Net App Runs On Most Client Networks But Will Not Run On One Network

Posted on 2006-04-07
13
Medium Priority
?
353 Views
Last Modified: 2010-04-23
I have a very simple VB.Net app that does a query on a remote SQL Server 2005
database and displays query results in a grid and prints a Crystal report.  I
have installed it on several different clients on various networks, but it
wil not execute on one of my client's networks - the one where the SQL Server
and the subject database is located and which is running Windows 2003 Server.

In the failing app, I have a logon function that displays a login form,
accepts user ID and password, validates them against an SQL Server table,
displays login errors and then displays a menu form if the login is valid.  
The login form is displayed and accepted, the SQL Server lookup works
correctly, the error messages boxes display correctly, but the menu form
display code spawns a CLR "exception has occurred that cannot be handled"
dialog box.

I access the SQL Server database using a UDL file.

The same app installed on most networks/workstations works correctly.

However, it will not run on any workstation in the same domain as the SQL Server that manages the database (the one pointed to by the UDL) is located.  All of the failing workstations are running Windows XP Pro and VB.Net Framework 1.1 with
a service pack.

The setup/installation for this app was generated by Visual Studio .Net 2003.

Any clues?
0
Comment
Question by:portdata
  • 6
  • 5
12 Comments
 
LVL 6

Expert Comment

by:carmodyk
ID: 16408285
Is it SQL 2000 instead of SQL 2005 running?  One issue that I've come across is the naming convention.  The database name for a SQL 2000 database needs to be all one word instead of being broken up.  For example "My Database" Wrong, "MyDatabase" Correct.

Another could be the security settings for the network.  I don't know how locked down they are, but I've seen issues with security before especially in a 2003 environment.

Try this, install the program locally on the server with the database and see the type of error messages you might get.  Are you placing Try statements in your code to catch messages?  Example:

        Try
'Your code here along with any SQL Scripts

        Catch Exp As SQLException
            MsgBox(Exp.Message, MsgBoxStyle.Critical, "SQL Error")

        Catch Exp As Exception
            MsgBox(Exp.Message, MsgBoxStyle.Critical, "General Error")
        End Try

I'm just spouting off some general ideas, hopefully they help.
0
 

Author Comment

by:portdata
ID: 16409649
No, it is SQL Server 2005.

They have other Visual Studio .Net apps running on their workstations accessing the same database.

Our program was written to supplement a system they already have which cannot do queries the way they want them to be run - by multiple selection criteria (like customer name, product ID and date received" in a single query.  So, we are trying to run our query ontheir existing workstations to give them the additional capability.

I am running that same query from my PC at my office (I am on my own SBS 2003 domain 60 miles away from them), connected to their SQL Server remotely using a UDL over a VPN link, and it works just fine.

I install the same app on one of their domain-connected PC's and it refuses to run.

SQL Server is not the problem.  The first thing my app does is give them a login screen to enter user ID and password (which are validated against the same SQL Server database and it works just fine.  If the user ID or password are invalid, I see the msg box that I am displaying to show them the error.  If they are valid, andI try to display the query menu, then I get a common language runtime dialog box with an error tellingme to use the JIT debugger (which is not installed on those PC's.)

We are attempting to run the compiled runtime code on the server with the database - that is the only place that the error occurs.  On any other network connected remotely to them, it works just fine.

They do not have VB.Net or Visual Studio.Net installed.  We are developing at our own offices.

Just FYI, I am a Microsoft Certified Partner and an MCP/Small Business Specialist.  I have been a software developer for 35 years and I write VB.Net code every day of the week.

This is just plain bizarre!



0
 
LVL 6

Expert Comment

by:carmodyk
ID: 16409675
Cool.   I don't know what to tell you; you really do have a winner here for the record books.  Especially since you can run the login query with no problem, but the complex query comes back and sticks it's tongue at you.  My thinking is some wacky security settings or at least the environment is somehow affecting this.  I don't think this is a coding issue, but probably an environment issue.  As a certified Partner with Microsoft, try to use the Partner Source to contact someone from the "mother ship" and pose the question to them.   I'm sorry I couldn't be more help.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 6

Expert Comment

by:carmodyk
ID: 16411617
I don't know if this is something you want to do, but when I know there is a problem and I think it's an environment issue, I sometimes make a "test compiled program" and place messageboxes between steps of functions, so I can narrow it down where the problem is and what value is causing the issue.   It might help you in figuring out where and what part of the program is being effected by the domain.
0
 

Author Comment

by:portdata
ID: 16411711
I did that.

The error is being raised on a ShowDialog command - just trying to display a menu form.  Nothing unusual - just a bunch of labels.
0
 
LVL 6

Expert Comment

by:carmodyk
ID: 16411738
Hmm.....you really really do have a winner here. I'm betting this is causing some hair being pulled out.  I know the felling.  ;) Another thought that might help narrow the issue; give any values that are being passed a default value.  For example if you are setting the label.text value to equal something, give it a "this is a default" string value first before passing the variable value, or setup an if then statement where if the object value is nothing or is Null, etc it will equal the default value instead.  There might be one rouge label out there that might be the wrench in the system; how I don't know.  
0
 

Author Comment

by:portdata
ID: 16411774
Keep one thing in mind.

This app works on lots of other computers - only fails on workstations attached to this server, in this domain.

I even tried stripping out individual labels on the menu and sending a much simpler menu form - still got the error.

I am now considering reinstalling .Net Framework on one of those PC's to se if that helps in any way.

All this work for three or four days of consulting billing.
0
 
LVL 6

Expert Comment

by:carmodyk
ID: 16411891
"This app works on lots of other computers - only fails on workstations attached to this server, in this domain." - Yeah, that's the kicker isn't it?  No problems anywhere else but within the domian.  

Dude, bummer. Worse part is, it's their environment (domain) that's probably causing the issue.  Since it is SQL 2005 (being sort of new and all), and it fails only within the domain, but not outside, it may require a different type of connection string for inside the domain... but you did say the login query works, so that may not be it.  Just for laughs and giggles check out www.connectionstrings.com for maybe a different connection string to use.  Are the users logging in via Windows Authentication mode to the SQL server or are you using a Users table within the database to authenticate them to use the program? If you are using a Users table, then I'm back to scratching my head again.  
0
 

Author Comment

by:portdata
ID: 16563824
I am requesting that this question be closed.

I appreciate carmdoyk's efforts.

I recoded the app in VB 6 and it worked.

The original problem is still a mystery and is destined to remain so, at least for now.
0
 

Author Comment

by:portdata
ID: 16565890
carmodyk, FYI, the user security was set up properly and users log in with a userID and password, there was no explicit connection string because we use UDL's as the original question stated.  The user ID and password are supplied in the UDL.  The UDL connects to the database correctly- Test Connection works fine.  The app has no problem with the SQL database - it validates the user against the database properly.  The problem here is not likely to be SQL Server access, it is more likely a problem in the VB.Net app and the common language runtime.

GranMod, as for the points, I do not really care.  I have unlimited points.  I just do not believe that anyone earned them.
0
 
LVL 6

Expert Comment

by:carmodyk
ID: 16565986
Sorry to hear the program was re-coded in 6.0.  You truly have an oddity on your hands, which is a shame with all that work having to be redone.  I feel your pain.  
0
 

Accepted Solution

by:
GranMod earned 0 total points
ID: 16589003
Closed, 500 points refunded.
GranMod
The Experts Exchange
Community Support Moderator of all Ages
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses
Course of the Month14 days, 1 hour left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question