Middle Tier issue (SOLVED)

For complex topics that regular users would not be interested in. For power users and database administrators.
Post Reply
User avatar
wjstarck
Posts: 934
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Middle Tier issue (SOLVED)

Post by wjstarck » Thu May 25, 2023 7:14 pm

I had Middle Tier working on a Amazon lightsail server, but I recently upgraded that install to 23.1.x

Now I can't seem to be able to login. The error I get is

Code: Select all

Server Error in '/OpenDentalServer' Application.
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 'OpenDentalServer.ServiceMain'.

Source Error:


Line 1:  <%@ WebService Language="C#" CodeBehind="ServiceMain.asmx.cs" Class="OpenDentalServer.ServiceMain" %>

Source File: /OpenDentalServer/ServiceMain.asmx    Line: 1
Everything seems to be setup OK, and the application pool is set to Enable 32 bit applications.

Ideas?
Last edited by wjstarck on Mon Jun 05, 2023 4:46 pm, edited 2 times in total.
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA

User avatar
wjstarck
Posts: 934
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Re: Middle Tier issue

Post by wjstarck » Sat May 27, 2023 8:22 am

Here are the contents of ServiceMain.asmx.cs:

Code: Select all

using System.ComponentModel;
using System.Web.Services;
using OpenDentBusiness;

namespace OpenDentalServer {
	/// <summary></summary>
	[WebService(Namespace="http://localhost/OpenDentalServer")]
	[WebServiceBinding(ConformsTo=WsiProfiles.BasicProfile1_1)]
	[ToolboxItem(false)]
	public class ServiceMain:System.Web.Services.WebService {

		///<summary>Pass in a serialized dto.  It returns a dto which must be deserialized by the client.</summary>
		[WebMethod]
		public string ProcessRequest(string dtoString) {
			return DtoProcessor.ProcessDto(dtoString,Server.MapPath("."));
		}

	}
}
ServiceMain.asmx:

Code: Select all

<%@ WebService Language="C#" CodeBehind="ServiceMain.asmx.cs" Class="OpenDentalServer.ServiceMain" %>
Web.Config:

Code: Select all

<?xml version="1.0"?>
<configuration>
  <appSettings/>
  <connectionStrings/>
  <!--
    For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367.

    The following attributes can be set on the <httpRuntime> tag.
      <system.Web>
        <httpRuntime targetFramework="4.5" />
      </system.Web>
  -->
  <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" targetFramework="4.7.2"/>
    <!--
            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="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
    <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
    <httpRuntime maxRequestLength="1048576" executionTimeout="3600" />
  </system.web>
  <system.webServer>
    <security>
      <requestFiltering>
        <requestLimits maxAllowedContentLength="1073741824" />
      </requestFiltering>
    </security>
  </system.webServer>
</configuration>
And the error as it shows up in EventViewer:

Code: Select all

Event code: 3006 
Event message: A parser error has occurred. 
Event time: 5/27/2023 12:05:42 PM 
Event time (UTC): 5/27/2023 5:05:42 PM 
Event ID: 5a7199bf3da746ab8860cbc99c186e20 
Event sequence: 6 
Event occurrence: 1 
Event detail code: 0 
 
Application information: 
    Application domain: /LM/W3SVC/1/ROOT/OpenDentalServer-1-133296807385914083 
    Trust level: Full 
    Application Virtual Path: /OpenDentalServer 
    Application Path: C:\Program Files (x86)\Open Dental\ 
    Machine name: EC2AMAZ-4TQV2KR 
 
Process information: 
    Process ID: 1184 
    Process name: w3wp.exe 
    Account name: IIS APPPOOL\Default Pool 
 
Exception information: 
    Exception type: HttpParseException 
    Exception message: Could not create type 'OpenDentalServer.ServiceMain'.
   at System.Web.UI.SimpleWebHandlerParser.GetType(String typeName)
   at System.Web.UI.SimpleWebHandlerParser.GetTypeToCache(Assembly builtAssembly)
   at System.Web.Compilation.SimpleHandlerBuildProvider.GetGeneratedType(CompilerResults results)
   at System.Web.Compilation.BuildProvider.CreateBuildResult(CompilerResults results)
   at System.Web.Compilation.BuildProvider.GetBuildResult(CompilerResults results)
   at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate)
   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath)
   at System.Web.UI.WebServiceParser.GetCompiledType(String inputFile, HttpContext context)
   at System.Web.Services.Protocols.WebServiceHandlerFactory.GetCompiledType(String url, HttpContext context)
   at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath)
   at System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated)
   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

 
 
Request information: 
    Request URL: http://localhost/OpenDentalServer/ServiceMain.asmx 
    Request path: /OpenDentalServer/ServiceMain.asmx 
    User host address: ::1 
    User:  
    Is authenticated: False 
    Authentication Type:  
    Thread account name: EC2AMAZ-4TQV2KR\Administrator 
 
Thread information: 
    Thread ID: 6 
    Thread account name: EC2AMAZ-4TQV2KR\Administrator 
    Is impersonating: False 
    Stack trace:    at System.Web.UI.SimpleWebHandlerParser.GetType(String typeName)
   at System.Web.UI.SimpleWebHandlerParser.GetTypeToCache(Assembly builtAssembly)
   at System.Web.Compilation.SimpleHandlerBuildProvider.GetGeneratedType(CompilerResults results)
   at System.Web.Compilation.BuildProvider.CreateBuildResult(CompilerResults results)
   at System.Web.Compilation.BuildProvider.GetBuildResult(CompilerResults results)
   at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate)
   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath)
   at System.Web.UI.WebServiceParser.GetCompiledType(String inputFile, HttpContext context)
   at System.Web.Services.Protocols.WebServiceHandlerFactory.GetCompiledType(String url, HttpContext context)
   at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath)
   at System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated)
   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
 
 
Custom event details: 
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA

User avatar
wjstarck
Posts: 934
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Re: Middle Tier issue

Post by wjstarck » Mon May 29, 2023 1:53 pm

Looks like I've had this issue once before:

https://www.opendentalsoft.com:8085/for ... ier#p32040

I have checked and rechecked my config multiple times after following the Middle Tier installation instructions.

1) I have my Open Dental program folder present on the Middle Tier server
2) I've copied the contents of the /bin folder in the OpenDentalServer project to the /OpenDental/bin folder on the Middle Tier server
3) I notice that there are ServiceMain.asmx and ServiceMain.asmx.cs files in both the Open Dental program folder *and the /bin folder. IIS loads the ServiceMain.asmx from the Open Dental program folder. Is this correct? What about Web.Config (there's one in each location as well)?
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA

User avatar
wjstarck
Posts: 934
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Re: Middle Tier issue

Post by wjstarck » Fri Jun 02, 2023 11:12 am

OK fixed.

I had to uninstall and reinstall IIS to get it to work.

Thanks to the Middle Tier Support team for taking a look at it yesterday.
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA

Post Reply