Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 28th, 2004, 12:39 PM
Authorized User
 
Join Date: Jun 2004
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Default Web service Compilation error


Hi all,
Can u guys see an error on line 26 ( in the web method). I have got an eeror on that line.
Thank U

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC32035: Attribute specifier is not a complete statement. Use a line continuation to apply the attribute to the following statement.

Source Error:



Line 24: 'their Session to TRUE
Line 25:
Line 26: <WebMethod(EnableSession:=true),SoapHeader("sHeade r",Direction:=SoapHeaderDirection.InOut,Required:= true)> pubilc function SignIn() As boolean
Line 27: 'check the username and the password passed in the SOAPHeader
Line 28:

<WebMethod(EnableSession:=true),SoapHeader("sHeade r",Direction:=SoapHeaderDirection.InOut,Required:= true)> pubilc function SignIn() As boolean



The main code is:

<%@ WebService Language="VB" Class="Service1" %>

Imports System
Imports System.Data
Imports System.Data.OleDb
Imports System.Configuration
Imports System.Web.Services
Imports Microsoft.VisualBasic.ControlChars
Imports System.XML.Serialization
Imports System.Web.Services.Protocols

'1) Create the public class SOAPHeaders

public class SOAPAuthHeader:Inherits SoapHeader
       public parameter1 As String
       public Parameter2 As String
End Class

public class service1:Inherits WebService
       public sHeader As SOAPAuthHeader


'Checks that the username and password are good. If they pass the test then set their Session to TRUE

<WebMethod(EnableSession:=true),SoapHeader("sHeade r",Direction:=SoapHeaderDirection.InOut,Required:= true)> pubilc function SignIn() As boolean
'check the username and the password passed in the SOAPHeader

       If ((sHeader.Parameter1.ToString() = "admin") AND (sHeader.Parameter2.ToString() = "password") ) Then
           'HTTPContext.session("IsLoggedIn") =true
           'HTTPContext.Current.session("IsLoggedIn") = true

            Context.Session("IsLoggedIn") = true
            return true
       Else
           Context.Session("IsLoggedIn") = false
           return false
       End If

    End function


 
Old June 28th, 2004, 10:23 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Should that be posted in a dotnet forum? You can get this replied there soon than here.;)

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
Web service call error Tomi J2EE 0 February 1st, 2008 06:22 AM
Web Service Error aliirfan84 .NET Web Services 0 February 14th, 2007 01:01 AM
Error to Add Web Reference from a Web service jdjbarrios ASP.NET 2.0 Professional 0 July 18th, 2006 02:58 PM
web service error redwood_lin Classic ASP Basics 6 January 6th, 2006 07:06 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.