O
OsamaBG
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.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
}
}
===================
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.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
}
}
===================