Hi all
i made a web service but when i tried to use it i faced some troubles, an error
msg from the IExplorer :
Parser Error Message: Could not create type 'MyGolfMart.WebServices.ccService'.
Source Error:
Line 1: <%@ WebService Language="c#" Codebehind="ccService.asmx.cs"
Class="MyGolfMart.WebServices.ccService" %>
Source File: c:\inetpub\wwwroot\MyGolfMart\WebServices\ccService.asmx Line:
1
so pls can u take a closer look to my code and tell me what is the error?
thanx alot
here is my code:
===================
namespace MyGolfMart.WebServices
{
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;
public class ccService : System.Web.Services.WebService
{
public ccService()
{
InitializeComponent();
}
[WebMethod(Description="The OrderItem method enables a remote client to
programmatically place an order using a WebService.", EnableSession=false)]
public bool LundCheck( string ccNum )
{
int iSum = 0;
int iLength = ccNum.Length;
int iOddEven = iLength & 1;
char[] sCardNumber = ccNum.ToCharArray();
for(int i = 0; i < iLength; i ++)
{
int iDigit = System.Int32.Parse(sCardNumber[i].ToString());
if (!(((i & 1) ^ iOddEven)==0))
{
iDigit *= 2;
if(iDigit > 9)
{
iDigit -= 9;
}
}
iSum += iDigit;
}
if (iSum % 10 == 0)
return true;
else
return false;
}
[WebMethod(Description="The OrderItem method enables a remote client to
programmatically place an order using a WebService.", EnableSession=false)]
public string GetAuthorization(string ccNum)
{
if( LundCheck( ccNum ) )
{
return "APPROVED";
}
else
{
return "DECLINED";
}
}
#region Component Designer generated code
private IContainer components = null;
private void InitializeComponent()
{
}
protected override void Dispose( bool disposing )
{
if(disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
#endregion
}
}
===================
---------------------------------
Start your day with Yahoo! - make it your home page
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/