473,722 Members | 2,458 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HTTP 500 iNTERNAL SERVER ERROR

Hi folks

I have been designing a web service that is intended to extract information
from a SQL server DB using parameterised SP's. So far I have 2 web methods.

1 GetPostCodeForS uburb(ByVal intSuburb As Int64) As postcode1
2 GetSuburbIDAndN ameForSuburbSta rt(ByVal vchSuburb_Start As Char) As
dsSuburbIDAndNa me

The 1st web method GetPostCodeForS uburb is working OK, but the 2nd one
GetSuburbIDAndN ameForSuburbSta rt has a bug.

''''''''''''''' ''''''''''''''' ''''
When I press F5 a web page comes up with two hyperlinks for the two web
methods. When I choose the 2nd one, a web page pops up quoting "HTTP 500
Internal Server Error". In the body of the page the following message
appears "The page cannot be displayed".

Clicking on the localhost link brings up the following page:
http://localhost/localstart.asp that has the following message in the body:

''''''''''''''' ''''''''''''''
Your Web service is now running.
You do not currently have a default Web page established for your users. Any
users attempting to connect to your Web site from another machine are
currently receiving an Under Construction page. Your Web server lists the
following files as possible default Web pages:
default.htm,def ault.asp,index. htm,iisstart.as p,default.aspx. Currently, only
iisstart.asp exists.

To add documents to your default Web site, save files in c:\inetpub\wwwr oot\.

The code for the Web method is as follows:

''''''''''''''' ''''''''''''''' '''''

<WebMethod()> Public Function GetSuburbIDAndN ameForSuburbSta rt(ByVal
vchSuburb_Start As Char) As dsSuburbIDAndNa me

Dim dsSuburb As New dsSuburbIDAndNa me
Dim cn As SqlConnection
Dim strConnInfo As String
Dim cmd As SqlCommand
Dim pmTemp As SqlParameter
Dim adSuburb As SqlDataAdapter

adSuburb = New SqlDataAdapter

strConnInfo = "server=USE R-LMZWW8DZJO;Inte grated
Security=SSPI;u id=dbo;pwd=;dat abase=Australia nPostCodes"
Try
cn = New SqlConnection
cn.ConnectionSt ring = strConnInfo
cn.Open()

Try
cmd = New SqlCommand
cmd.CommandType = CommandType.Sto redProcedure
cmd.CommandText = "procGetSuburbI DAndNameForSubu rbStart"
cmd.Connection = cn

pmTemp = cmd.Parameters. Add(New
SqlParameter("@ suburb_start", SqlDbType.VarCh ar))
pmTemp.Directio n = ParameterDirect ion.Input
pmTemp.Value = vchSuburb_Start

adSuburb.Select Command = cmd
adSuburb.Fill(d sSuburb)
Return dsSuburb

Catch ex As Exception

End Try

Catch exc As SqlException
Dim errorMessages As String
Dim i As Integer

For i = 0 To exc.Errors.Coun t - 1
errorMessages += "Index #" & i.ToString() &
ControlChars.Ne wLine _
& "Message: " & exc.Errors(i).M essage &
ControlChars.Ne wLine _
& "LineNumber : " & exc.Errors(i).L ineNumber &
ControlChars.Ne wLine _
& "Source: " & exc.Errors(i).S ource &
ControlChars.Ne wLine _
& "Procedure: " & exc.Errors(i).P rocedure &
ControlChars.Ne wLine
Next i

Dim log As System.Diagnost ics.EventLog = New
System.Diagnost ics.EventLog
log.Source = "My Application"
log.WriteEntry( errorMessages)
Console.WriteLi ne("An exception occurred. Please contact your
system administrator." )

Finally

If cn.State = ConnectionState .Open Then
cn.Close()
End If

End Try

End Function

''''''''''''''' ''''''''''''''' '''

Quite frankly, I cannot understand this - hope somebody can help

Kind regards

Ross Petersen
Nov 23 '05 #1
0 3275

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

Similar topics

2
5445
by: Ralph | last post by:
HTTP 500 - Internal server error ASP pages I am running Windows 2K with IIS 5.1 and I started having problems accessing ASP databases shortly after applying the MS patch Windows 2000 Hotfix KB824146. I also started getting DCOM errors in the Server System log just after the reboot. When anyone goes to open an ASP based page they get : HTTP 500 - Internal server error We are just using ASP and not .NET. All other webserver...
10
10819
by: | last post by:
I am accessing the same error-containing ASP page on an ISP server using w2k IE6 but with different effect. On the first computer I get several line of HTML outputed by ASP, shown correctly by the browser, followed by a descriptive error message: Microsoft VBScript runtime error '800a000b' Division by zero followed by the number of the error-making line
1
1834
by: weiwei | last post by:
Hi, I am having trouble with http 500 internal error. I have develope several dynamic pages, it works fine on our intranet server, however, when I migrated into our external IIS server, most of asp pages cann't display with error message of http 500 internal error does anyone have idea on what is going on? please any ideas or clues are welcome, thanks in advance
2
3236
by: Anton van der Merwe | last post by:
I'm getting the foolowing error when trying to view an asp page on a windows2003 server. On our previous IIS server (Windows 2000) the error was described in detail. Windows 2003 ------------ The page cannot be displayed There is a problem with the page you are trying to reach and it cannot be displayed.
1
5104
by: errorQuest | last post by:
Hi There, I have a problem with the IIS running. Whenever I try to ru http://localhost/aaa.asp i got this error "HTTP 500-Internal Serve Error". I use very simple code in aaa.asp. I try to look for the Sho Friendly http error messages, but it doesn't give me another othe error beside "HTTP 500-Internal Server Error". Does anyone know what i happening here? I use Window XP with IIS 5.1 -
1
1951
by: vighneswar | last post by:
Hi All I am working on a project in which i have to upload files to an remote server via HTTPS. For that i have written the following lines of code,but when i execute it I am getting an HTTP:500 Internal Server Error.Please let me know where went wrong in it. 1.The client has given the credentials(username & password) using those i got conneted to the server successfully,but when i run the below code to upload files
9
3921
by: Trint Smith | last post by:
I have tried everything...aspreg -i and modifying machine.config and running the fileupdate...deleting and reinstalling framework 1.1... It only happens when I do a 'Copy Project' to the webserver...it loads into vs.net and runs locally just fine... Any help is appreciated...I'd like to get rid of this forever...I had this problem on a previous computer at another company last summer and never did figure out the answer. Thanks, Trint
8
10012
by: Rod | last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some reason, opening some ASP.NET applications we wrote is producing the following error message: "The Web server reported the following error when attempting to create or open the Web project located at the following URL: 'http://localhost/WebApplication1'. 'HTTP/1.1 500 Internal Server Error'."
11
12314
by: Lieven | last post by:
Hey, I had a hard disc problem last week on my server. I replaced the disc and copied al the files to the new hard disc, everything works fine again except some php scripts that are using the mail() function. When executing these scripts I get this error: "500 Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request.
16
27901
Frinavale
by: Frinavale | last post by:
The following article is directed at people who are experiencing an HTTP/1.1 500 Internal Server Error while using Visual Studio 2003. The error message typically sounds something like: The web server reported the following error when attempting to create or open the Web Project located at the Following URL:http://localhost/Webapplication1’.HTTP/1.1 500 Internal Server Error’. This error tends to rear it's ugly head when you're creating...
0
9239
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9158
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9090
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8059
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6685
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5996
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4764
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3208
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2148
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.