I have written a web service for my computing class which basically does the following:
An admin department can input various events that are happening in a football match. These events are inputted through a webservice and inserted into a database.
There is a client-side aspx page that refreshes and informs the user of any goals etc..
Basically the coding has gone ok I just have a couple of questions you guys might be able to help me out with with respect to how it's constructed. I have constructed it in Visual Studio 2005 and running the application works fine. The program has to be handed in on a CD with instructions on how it works. What I was thinking was:
Hand the code in on a CD with instructions on how to access the system through my webspace. My webspace supports ASP.NET so I assume that this would also work with my web service. Simple, I though and uploaded the files onto my webspace. I attempt to access the index.aspx page and get the following error:
Football is name of my class that I have created and in the past working with notepad I have encountered this and read that I may need a proxy class. I then discovered that one of the super duper features of VS2005 is that it creates one for you. Therefore I am a bit concerned that it wont work on demo/hand-in date and was wondering if you guys could point out any glaringly obvious problems with the setup:
File: football.asmx
This page links to a code behind page shown below:
File: football.vb (found in App_Code)
File: index.aspx (I have added a method example just so you can check how it accesses the webmethods)
Finally i have a file called index.aspx.vb which contains the following:
Does this look like a typical setup to you? I can imagine I have made a schoolboy error somewhere.
Thanks for your time
An admin department can input various events that are happening in a football match. These events are inputted through a webservice and inserted into a database.
There is a client-side aspx page that refreshes and informs the user of any goals etc..
Basically the coding has gone ok I just have a couple of questions you guys might be able to help me out with with respect to how it's constructed. I have constructed it in Visual Studio 2005 and running the application works fine. The program has to be handed in on a CD with instructions on how it works. What I was thinking was:
Hand the code in on a CD with instructions on how to access the system through my webspace. My webspace supports ASP.NET so I assume that this would also work with my web service. Simple, I though and uploaded the files onto my webspace. I attempt to access the index.aspx page and get the following error:
Code:
Compiler Error Message: BC30002: Type 'football' is not defined.
Football is name of my class that I have created and in the past working with notepad I have encountered this and read that I may need a proxy class. I then discovered that one of the super duper features of VS2005 is that it creates one for you. Therefore I am a bit concerned that it wont work on demo/hand-in date and was wondering if you guys could point out any glaringly obvious problems with the setup:
File: football.asmx
This page links to a code behind page shown below:
Code:
<%@ WebService Language="VB" CodeBehind="~/App_Code/football.vb" Class="football" %>
File: football.vb (found in App_Code)
Code:
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Data
Imports System.Data.OleDb
<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class football
Inherits System.Web.Services.WebService
'Database variables
Dim objCmd As New OleDbCommand
Dim objConn As New OleDbConnection(ConfigurationSettings.AppSettings("DSN"))
Dim objRdr As OleDbDataReader
File: index.aspx (I have added a method example just so you can check how it accesses the webmethods)
Code:
<%@ Page Language="VB" Debug="true"%>
<%@ import Namespace="System.Data.OleDb"%>
Sub getDates()
Dim objService As New football()
dateDropDown.DataSource = objService.getDate()
dateDropDown.DataValueField = "date"
dateDropDown.DataTextField = "date"
dateDropDown.DataBind()
End Sub
Finally i have a file called index.aspx.vb which contains the following:
Code:
Partial Class _Default
Inherits System.Web.UI.Page
End Class
Does this look like a typical setup to you? I can imagine I have made a schoolboy error somewhere.
Thanks for your time