Web Service Stumper - Throws A NullReferenceException Error When Trying To Access The Data

Feb 7, 2011

I have created a very basic web service in vb.net using vs 2008. When I run the service within visual studio debugger, the service runs fine and gives me the expected results. When I deploy the service to the server and invoke it from a client, it always throws a NullReferenceException error when trying to access the data. More specifically when I call the DbConnection open() method within a dbhelper executeScalar method.

I'm using a custom dbhelper class I found on the web here: [URL] The only thing I've changed is the _factory at the top points to Providers.Odbc (since I'm using a ODBC connection). Like I said previously, the service (and the dbhelper class) work as expected within VS- it's only once I deploy it that it seems to bomb out. I've even tried hard coding the connection string in case it was having problems getting that but no difference there.

View 2 Replies


ADVERTISEMENT

Fill_Text Code Throws An Error : System.NullReferenceException:Object Reference Not Set To An Instance Of An Object

Apr 18, 2010

I got the following code from the demo code samples and just changed the textbox names. But it throws an error:

Private Sub Fill_TextBox()
Dim Num As Integer
Dim DSet As DataSet

[code]....

The error is:

System.NullReferenceException:Object reference not set to an instance of an object.

View 1 Replies

Xml - Getting InnerText From XmlDocument Throws NullReferenceException

Oct 28, 2011

Whenever I try and get the InnerText of an element using an XmlDocument, it throws a NullReferenceException. Here is the code below:

Dim SetDoc As New XmlDocument
Dim xmlString As String = "<upload><links><bananas>apple</bananas><original>thirteen</original></links></upload>"

[Code].....

The same happens when I load exactly the same XML from file.

View 1 Replies

Atagridview.readonly = True Throws Nullreferenceexception?

Mar 30, 2009

I have a project that I am working on which requires my datagridview to have certain columns set as readonly according to the user authentication results. But, almost every time I set readonly = true I get a nullreference exception.I have added ALL the datagridview events trying to see where I can handle this problem. The only event it calls into after I say readonly = "true" is my cell validation event. And that event always passes fine. It is after I hit f11 to continue past the "End Sub" of my validate event that I return to the calling code and all of the sudden have an exception too.

I've looked around and can't figure out how to debug this one so I am asking for help here. I have seen other bugs about scrolling content in columns and turning off scrollbars to fix random datagridview bugs but I dont know about this one. I can't find the same problem anywhere else yet.

-my admin timer elapses and I call a timeout routine which sets the grids back to readonly = true. One of my grids (one bound by datatable/bindingsource) almost always throws a nullreference when I set the readonly = true.

-when authenticating my user if their credentials pass I want to set the whole grid to readonly = false, and then individually set two columns to readonly = true so they cannot be modified while the rest of the grid is editable. I throw my nullreference here after my first individual column call to readonly = true.

I'm using multiple grids on my project, but the timeout nullreference exception seems to be tied directly to only one of my grids. In particular, this problem grid has the least complicated queries and barely any cell validation. I dont understand how it could be the cause of so much frustration. However, it seems that when changing readonly property on individual columns that both my main grids for my project will exhibit the same behaviors with the nullreference exception.

It's important to note that usually I can just drag the debugger back into the failure statement and it will actually succeed.By figuring this out I was able to set a flag if I wasn't able to change the status of the grid and recall it. Usually that fixes most things, but when it comes to doing the individual columns I cannot code my project to try/catch/recurse for each individual column.

I've got source and a test DB available if needed.I am not sure what is relevant out of my project to post? But I can offer some compensation via Paypal if someone on this board actually helps me fix my problem in a way that I can understand and troubleshoot for future projects. This is the last bit of functionality for my requirements and I have about 48 hours to get it bug free and working as designed or I will have to revert to some older spaghetti code and do a lot of this over.

View 9 Replies

VS 2010 A Real Stumper - DLL & Imagelist

Jan 19, 2011

I am working on a DLL to do PDF manipulation. In my DLL I reference the itextsharp DLL. (ie. a DLL in a DLL) In my DLL I have a form with an imagelist on it. Now here's the strange part. if I put an image in the imagelist in design mode & run the program I get this error:

Error1Could not load file or assembly 'file:{full path}/itextsharp.dll' or one of its dependencies. The system cannot find the file specified. Line 141, position 5. Error2Unable to open file 'D:VBProjectsDLL_DemoMyDLLobjReleaseMyDLL.Form1.resources': The system cannot find the file specified.

[Code]...

View 1 Replies

Service Error Cannot Open <service Name> Service On Computer '.'

Feb 3, 2010

I have a VB2008 application which can control a windows service i.e. start, stop, pause etc. This runs ok on a Windows XP machine but not on a Win 7 machine (message is - Service error cannot open <service name> service on computer '.') ( if I stop the UAC then it runs ok ). It seems to be a rights issue,

View 3 Replies

HTTP 404 Not Found Error On Web Service Call, Only With Large Amount Of Data

Sep 2, 2011

I have a vb.net Windows application that calls a vb.net Web Service function. Both the vb.net application and Web Service have been in use for over 5 years and have worked well. The Windows App builds a text file consisting of a number of inserts into an Oracle table, followed by a call to an Oracle package. The Web Service call uploads the text file to the Web Server, loops through the statements in the text files and executes them. It then does a Select statement to put the resultant data in a string which is passed back to the calling program. We have both people on our local area network as well as external users where the call to the Web Server is over the internet.

The data string returned is the pricing for each of the lines inserted in the text file, separated by asterisks. Normal use of this call has anywhere from 1 to a few dozen lines, and the program works fine for this for both internal and external users.

Our problem right now is one external person is attempting to price a job with 491 individual line items. At first it would not price, whether the job was priced from a computer at the customers site or one of our internal people on the LAN. The problem turned out to be the timeout value was not long enough (it was set at 2 minutes, this job takes 5 minutes) so changing both the Timeout value in the Web Service call as well the httpRuntime executionTimeout value in the web.config file on the web server addressed the problem, but only for our internal users on the LAN. Our external customer wants to be able to price jobs of this size going forward, and I am at a loss as to why it errors on internet connected machines but not locally connected machines. Our customer is in New York, We are in Wisconsin, and I am able to recreate the error condition from my home computer.

The other thing is, if I create a VPN connection to our server from my computer at home, this job will price (again, it takes about 5 minutes) but if I disconnect the VPN connection, it gets an error after approximately 3 minutes, http 404: Not Found.The customer can otherwise price all of his other jobs with no problems, it's only this one, very large job that gets the error.

View 4 Replies

GlutInit() Throws An Error - Cannot Find DLL?

Jan 17, 2011

I'm currently building an application in C#, using a basic design I came up with in VB.net for applications involving openGL. Using the Tao framework in VB, I have the following method:

Private Sub checkForGlutInit()
If glut_initialized = False Then
Glut.glutInit()

[code].....

View 1 Replies

.net - App Works In IDE But Throws An Error When Compiled And Run On Another Machine?

Nov 15, 2009

I have created an application using VB.NET in VS2008. When I run the app in the IDE on my development machine it works fine. It also works fine when I build it and run it as an exe on any machine that also has Visual Studio installed (at least 2005 and 2008 anyway) However, when I try to run the compiled executable on any machine without Visual Studio it throws up an error "[program name] has encountered a problem and will close..."

View 5 Replies

Call A Function Everytime It Throws An Error?

Apr 2, 2011

Is there a way to call a function everytime it throws an error? I could use try catch, but I need to do it with unexpected errors.

View 8 Replies

Code Change Throws Object Error

Sep 16, 2010

I have a piece of code that I believe is the culprit in a "Object reference not set to an instance of an object" error being thrown.[code]

View 4 Replies

DB/Reporting :: DataGridView Throws An Error When Remove A Row

Mar 16, 2012

Yes its me again with yet another problem Ok so I've now gotten round to trying to display some data from my database and displaying it in a DataGridView Heres the critical part

[Code]...

View 1 Replies

Function Returns Nothing, Yet Throws An Error During Comparison?

Mar 21, 2012

In our code base there is a function which should return either an object or nothing. The exact code is this : Return NothingThe calling method looks something like thismyObj = theClass.function()if myObj <> nothing then // fails

View 1 Replies

Getting Selected Rows From Listview Always Throws Out Error

Feb 8, 2012

I am trying to get the selected rows from a listview. To achieve this, I did this:

Dim numsel As Integer
numsel = Me.ListView1.Items.Count
For countme As Integer = 0 To numsel

[Code]....

It does count the selected rows, but it always throws out the error saying "ArgumentOutOfRange Exception", or something along those lines. For example, if I selected a row, it will output the results of that row. But the loop goes on. I tried everything I can but to no avail. I specifically want to select multiple rows, and I can achieve that if someone can assist me with this simple "problem" I have.

View 1 Replies

Valid Number Throws Overflow Error

Oct 6, 2010

I have a major problem. Things were going great until I came across this little bug(?) which has thrown a stick in my spokes. As I will demonstrate below, it seems that when defining certain numbers Visual Studio will throw an overflow error.
Dim T As ULong = 14774537964905701134 'Overflow error in the IDE
Dim M As ULong = ULong.MaxValue '(18446744073709551615) we are below the maximum value so it should work, right?

The one solution I have found is that we can use the following declaration instead.
Dim T As ULong = ULong.Parse("14774537964905701134")
However, to make matters even more complicated the value in question is unknown and must be compiled using CodeDOM so using the Parse method isn't an option. Unless there is some way I can determine if that value in particular will give me an overflow error.

View 4 Replies

Webbrowser.navigate To Tif Throws Browser Error?

Oct 27, 2009

I recently upgrade a project from vb 6 to 2008. Most of the code runs fine.I have a webbrowser form control that I use to navigate local files and display them with. (i have a file list box that you click which calls the navigate of the browser control). Most file types i have test work fine and display just as they would in a real browser window. Excel, PDFs, etc... so examples of files that utilize "plugins" like acrobat reader inside the browser work great. Tiff files are the exception. No error is thrown in vb, but the browser throws 2 runtime errors, included at the end here. After the browser errors are ignored the program continues execution but will just not display the file.

i can type the path to the file (eg c: estfielsfilename.tif) in a regular browser window and it displays just like it should, inside IE, using a plugin.Prior to upgrading, depending on what was installed on the computer, navigating to a tif would open the tif with picture and fax viewer, or display it with a tif viewer plugin.

Line:1
Error: Invalid Character

when click NO to debug it goes to

Line:0
Error:object expected

View 4 Replies

NullReferenceException Error?

Nov 21, 2009

Okay after searching two listbox's on a form I am trying to put a number as a string in a label setup for that but keep exgetting a NullReferenceexception error on the label. Label being "shippingDataLabel.text".e is my code;

Public Class MainForm
Dim fifteenShipping As Integer = 15
Dim twentyShipping As Integer = 20

[code].....

View 2 Replies

2010 On Windows 7 Throws FIPS Error On Compile

Apr 20, 2011

I'm trying to compile a brand new 2010 windows forms application with a form and a single button that should display a msgbox with "hello" in it.When I try to compile I get the error message:

Unable to write to output file <filename>: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.

View 3 Replies

Asp.net - DropDownList Throws An Error When A ListItem Is Not Present Anymore?

Mar 3, 2012

The application that I am working on is a Service Desk App. I have a form there that uses a DropDownList that contains employees names coming from the Active Directory. Any employee can make a request and save it. Problem arises when an employee leaves the company and consequently his account is deleted from the Active Directory. When some other employee searches the DB to finds a relevant Service Ticket that could be of his use, when tries to open it an error is thrown that indicates that the name does not exist in the DropDownList items.

UPDATE:I am adding some code so that it can be more clear.

<asp:FormView ID="FormView1" runat="server" DataSourceID="SqlDataSource1"
DataKeyNames="ITRequestId">
<EditItemTemplate>

[code]....

View 2 Replies

Excel.Close(SaveChanges:=False) Throws An Error?

Jun 17, 2010

VB.Net MyExcel.Close(SaveChanges:=False) throws an Error

View 7 Replies

FTP Download Throws 550 Error But Not If I Manually Step Through The Debugger?

Apr 23, 2012

I am attempting to list files within a folder on an FTP site. When I run the debugger, I get a clean run the first time with no problems. Subsequent attempts lead to a 550 error: "The remote server returned an error: (550) File unavailable (e.g., file not found, no access)." However, If I step through the process in debugger, It works fine. I'm thinking this is a timeout issue because there are many files within the folder. Any suggestions?

Private Sub ListFTP(ByVal Directory As String)
Dim Req As FtpWebRequest = Nothing
Dim Response As FtpWebResponse = Nothing

[code]....

View 5 Replies

IDE :: GlobalMemoryStatusEx And MEMORYSTATUSEX Usage Throws Compliation Error

Oct 14, 2009

The application was previously using GlobalMemoryStatus() and MEMORYSTATUS structure to retrieve memory information. But since, the Physical memory of the hardware in which the application runs is more than 2GB, the code was changed to use GlobalMemoryStatusEx() and MEMORYSTATUSEX structure. When this function was implemented and the struture was used its thrown compilation error: "error C2501: 'MEMORYSTATUSEX' : missing storage-class or type specifiers"How to solve this issue???

View 1 Replies

XML With Periods In Element Names Throws ArgumentException Error

Sep 6, 2011

I have an XML file where some of the elements have periods in their names. Using the code below, I receive the error:

"System.ArgumentException: Child list for field Stock cannot be created"It successfully reads the file if the periods are removed( i.e. StockAdjustment instead of Stock.Adjustment)

Dim myXMLfile As String = "C:file.xml"
Dim ds As New DataSet()
Dim fsReadXml As New System.IO.FileStream(myXMLfile, System.IO.FileMode.Open)
Try

[code]....

Is there a way to handle elements with periods in their names?

View 4 Replies

C# - Error "Settings To Access Printer 'printername' Are Not Valid" When Printing From Windows Service?

Apr 27, 2010

I get the error mentioned when printing to a network printer.The error does not occur when run under XP/Win2003, in a WinForm app or when a local printer is used.The error does only occur when run as a Windows Service under Vista/Win7/Win2008 and printing to a network printer.The Windows service runs under a network user that has access to the network printer. Before I print I check if the printername (including network path) is ok by looping through the available printers.

View 1 Replies

Error - NullReferenceException Was Unhandled

Jun 3, 2009

I have made a tic tac toe board and when i go to debug the application i get a "NullReferenceException was unhandled".
this happens diring this part of the code:

Dim x As Integer = Val(index.Chars(0))

View 22 Replies

Getting A NullReferenceException Was Unhandled Error

Jun 3, 2009

I am getting a NullReferenceException was unhandled error when i run my debugging in this part of my code: Dim x As Integer = Val(index.Chars(0))

what can i do so this will stop and my program will work?

View 1 Replies

NullReferenceException Error In VB Application?

Apr 11, 2011

I'm building a voting system for calls, and have tried to build it in VB. So far this is what I have:

Dim con As New OleDb.OleDbConnection
Dim dbProvider As String
Dim dbSource As String

[code]....

This code is contained within a "Record Call" button. On the form, there are four radio buttons, all with different text values which should be entered in to the "voting" table.My problem is that when I select a radio button and click on "Record Button" it then displays this error:

NullReferenceException: Object reference not set to an instance of an object.

This error is displayed on the line

dsNewRow = ds.Tables("voting").NewRow()

View 3 Replies

.NET Application Receiving 503 Service Unavailable Error When Calling Web Service?

Apr 28, 2009

This is a bit of unusual problem that I'm experiencing, but recently one of the users of a production application started reporting errors in the system. These were traced to a 503 Service Unavailable error when making a call to a web service used by the application.

Now here's the odd part, only the one user is affected by this issue. Other users of the application have not reported any errors. When the user logged on to a different machine that worked for another user, they still received the error.

View 1 Replies

Delete Node From Xml File Throws An Object Reference Error

Jun 13, 2012

I have an XML file that looks like

[Code]....

I am trying to delete the song node from the xml file but i can't figure out the cause of the error I'm getting. I'm still learning visual basics. Error: Object reference not set to an instance of an object. This is my code

[Code]....

View 1 Replies

Designer Generated Lookup Throws Error On Form Close

Jan 17, 2011

I have a project with multiple forms that are used to edit tables in a project data source (access DB). All the forms work fine, except the ones that use designer generated lookups.

When I am editing a row in a bound DGV on the lookup forms, they function fine, and the save button works fine. However, once I go to close the form it starts throwing "System.ArgumentException: DataGridViewComboBoxCell value is not valid." multiple times.

I've created applications similar to this in VS2008 without any issues.

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved