curiouswebster
asked on
Parser Error starting web service
Any ideas? Here's what gets displayed in my browser.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not create type 'WebService1.Service1'.
Source Error:
Line 1: <%@ WebService Language="C#" CodeBehind="Service1.asmx. cs" Class="WebService1.Service 1" %>
Source File: E:\web\mydomain\htdocs\Ser vice1.asmx Line: 1
-------------------------- ---------- ---------- ---------- ---------- ---------- ----
Version Information: Microsoft .NET Framework Version:1.1.4322.2407; ASP.NET Version:1.1.4322.2407
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not create type 'WebService1.Service1'.
Source Error:
Line 1: <%@ WebService Language="C#" CodeBehind="Service1.asmx.
Source File: E:\web\mydomain\htdocs\Ser
--------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2407; ASP.NET Version:1.1.4322.2407
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
does web.config look okay?
<?xml version="1.0"?>
<configuration>
<appSettings/>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true" />
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows" />
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericEr rorPage.ht m">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm " />
</customErrors>
-->
</system.web>
</configuration>
<?xml version="1.0"?>
<configuration>
<appSettings/>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true" />
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows" />
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericEr
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm
</customErrors>
-->
</system.web>
</configuration>
Update your asmx file with the changed namespace.
ASKER
Do you mean update the web reference? I do that in the program which uses it, but that generates an error too.
Please be more specific about "Update your asmx file".
Please be more specific about "Update your asmx file".
The asmx file of your web service should be changed .
Replace WebService1.Service1with the updated class and refresh your proxy
%@ WebService Language="C#" CodeBehind="Service1.asmx. cs" Class="WebService1.Service 1" %>
Replace WebService1.Service1with the updated class and refresh your proxy
%@ WebService Language="C#" CodeBehind="Service1.asmx.
ASKER
I recompile my web service and FTP the bin directory, the Service1.asmx and the web.config file to the root directory of my website.
Is this what you mean? Or were you describing something else?
Do I need to FTP my .cs file as well?
Is this what you mean? Or were you describing something else?
Do I need to FTP my .cs file as well?
>> Could not create type 'WebService1.Service1'.
This would occur only if this class isnt found or if there is something in the constructor of the class that is making it fail
This would occur only if this class isnt found or if there is something in the constructor of the class that is making it fail
ASKER
I need to simplify the constructor down its most simple form.
I'll send it momentarily.
I'll send it momentarily.
ASKER
The attached code still fails, even though nothing happens in the constructor.
using System;
using System.Data;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protoc ols;
using System.ComponentModel;
namespace WebService1
{
/// <summary>
/// Summary description for Service1
/// </summary>
[WebService(Namespace = "http://texselogic.com/")]
[WebServiceBinding(Conform sTo = WsiProfiles.BasicProfile1_ 1)]
[ToolboxItem(false)]
public class Service1 : System.Web.Services.WebSer vice
{
private Handles handles = null;
public Service1()
{
}
[WebMethod]
public string HelloWorld()
{
return "Hello World!";
}
[WebMethod]
public string GetVersion()
{
return "1.0.01";
}
[WebMethod]
public void Send()
{
}
}
}
using System;
using System.Data;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protoc
using System.ComponentModel;
namespace WebService1
{
/// <summary>
/// Summary description for Service1
/// </summary>
[WebService(Namespace = "http://texselogic.com/")]
[WebServiceBinding(Conform
[ToolboxItem(false)]
public class Service1 : System.Web.Services.WebSer
{
private Handles handles = null;
public Service1()
{
}
[WebMethod]
public string HelloWorld()
{
return "Hello World!";
}
[WebMethod]
public string GetVersion()
{
return "1.0.01";
}
[WebMethod]
public void Send()
{
}
}
}
What are you doing in your constructor?
What is the url to your asmx/ web service?
I pasted the same code in my solution in vs2005 after removing "private Handles handles = null;" and it worked perfectly fine :)
using System;
using System.Data;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protoc ols;
using System.ComponentModel;
namespace WebService1
{
/// <summary>
/// Summary description for Service1
/// </summary>
[WebService(Namespace = "http://texselogic.com/")]
[WebServiceBinding(Conform sTo = WsiProfiles.BasicProfile1_ 1)]
[ToolboxItem(false)]
public class Service1 : System.Web.Services.WebSer vice
{
public Service1()
{
}
[WebMethod]
public string HelloWorld()
{
return "Hello World!";
}
[WebMethod]
public string GetVersion()
{
return "1.0.01";
}
[WebMethod]
public void Send()
{
}
}
}
This is my ASMX file <%@ WebService Language="C#" CodeBehind="~/App_Code/Ser vice.cs" Class="WebService1.Service 1" %>
using System;
using System.Data;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protoc
using System.ComponentModel;
namespace WebService1
{
/// <summary>
/// Summary description for Service1
/// </summary>
[WebService(Namespace = "http://texselogic.com/")]
[WebServiceBinding(Conform
[ToolboxItem(false)]
public class Service1 : System.Web.Services.WebSer
{
public Service1()
{
}
[WebMethod]
public string HelloWorld()
{
return "Hello World!";
}
[WebMethod]
public string GetVersion()
{
return "1.0.01";
}
[WebMethod]
public void Send()
{
}
}
}
This is my ASMX file <%@ WebService Language="C#" CodeBehind="~/App_Code/Ser
ASKER
>> What are you doing in your constructor?
It's blank. I deleted the one object as a test, but it still fails.
public Service1()
{
}
>> What is the url to your asmx/ web service?
it's texselogic.com
am I missing something?
It's blank. I deleted the one object as a test, but it still fails.
public Service1()
{
}
>> What is the url to your asmx/ web service?
it's texselogic.com
am I missing something?
1) The same code worked for me like i have said in my previous post
2) Try deploying it in your local IIS instead of FTPing to ur website everytime
3) Generallty curious, are you trying to learn web services or trying to implement something ? If so what are u trying to implement"?
2) Try deploying it in your local IIS instead of FTPing to ur website everytime
3) Generallty curious, are you trying to learn web services or trying to implement something ? If so what are u trying to implement"?
ASKER
Mine still does not work, even with Handles removed.
Do I need to put the .cs file on the website? My ASMX file:
<%@ WebService Language="C#" CodeBehind="Service1.asmx. cs" Class="WebService1.Service 1" %>
Maybe I will get a new ISP. This is DiscountASP.Net and it's a website I have used many years as a testing site for web services. Could there be something residual? Is there anything else I should try before throwing in the towel?
Do I need to put the .cs file on the website? My ASMX file:
<%@ WebService Language="C#" CodeBehind="Service1.asmx.
Maybe I will get a new ISP. This is DiscountASP.Net and it's a website I have used many years as a testing site for web services. Could there be something residual? Is there anything else I should try before throwing in the towel?
ASKER
Do I need to update something on their end to associate my domain with the ASMX file?
Try deploying it in your local IIS instead of FTPing to ur website everytime
ASKER
Sounds like a good idea, but I have not done that before.
Could you help me?
Could you help me?
ASKER
I do run it in my Visual Studio 2005 environment, but you mean to deploy it so that the web service is hosted locally, right?
yes thats right. Try hosting it locally and heck if it works.
ASKER
Let me put this effort on hold. I just started with a new ISP and hope I can make it work right out of the box. Let me close this question and start a new one if my new ISP doesn't work.
thanks for all the help!
NBW
thanks for all the help!
NBW
ASKER
What else could it be?