ERROR: Could not create type 'SlidesService'...

  • Thread starter Thread starter AAaron123
  • Start date Start date
A

AAaron123

In file:

~/UserControls/SlidesService.asmx

I have:

<%@ WebService Language="VB" CodeBehind="~/UserControls/SlidesService.vb"
Class="SlidesService" %>





In file:

~/UserControls/SlidesService.vb

I have:

Imports System

Imports System.Web

Imports System.Collections

Imports System.Web.Services

Imports System.Web.Script.Services

Imports System.Web.Services.Protocols

Imports System.Configuration

Imports System.Web.UI.WebControls

Imports System.Web.UI

'/ <summary>

'/ Summary description for SlidesService

'/ </summary>

<WebService([Namespace]:="http://tempuri.org/"),
WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1),
System.Web.Script.Services.ScriptService()> _

Public Class SlidesService

Inherits System.Web.Services.WebService

Public Sub New()

End Sub 'New

<System.Web.Services.WebMethod()> _

Public Function GetSlides() As AjaxControlToolkit.Slide()

Dim slides(4) As AjaxControlToolkit.Slide

slides(0) = New AjaxControlToolkit.Slide("../images/Blue hills.jpg", "Blue
Hills", "Go Blue")

slides(1) = New AjaxControlToolkit.Slide("../images/Sunset.jpg", "Sunset",
"Setting sun")

slides(2) = New AjaxControlToolkit.Slide("../images/Winter.jpg", "Winter",
"Wintery...")

slides(3) = New AjaxControlToolkit.Slide("../images/Water lilies.jpg",
"Water lillies", "Lillies in the water")

slides(4) = New AjaxControlToolkit.Slide("../images/VerticalPicture.jpg",
"Sedona", "Portrait style picture")

Return slides

End Function 'GetSlides

End Class 'SlidesService





In file:

~/Default.aspx

I have:

snip...

<cc1:SlideShowExtender

ID="slideshowextend1" runat="server"

TargetControlID="Image1"

SlideShowServicePath="UserControls/SlidesService.asmx"

snip...



I get:

Error 1 Could not create type 'SlidesService'. I:\My Documents\Visual Studio
2008\WebSites\SlideShow\UserControls\SlidesService.asmx 1



I also tried

CodeBehind="SlidesService.vb"

Do you see my bug?



Thanks
 
Is it true that the web services .asmx file must be in the top (~) folder?

I can't find anything that says that but it might be implyed.



Thanks
 
Back
Top