W
WhiskyRomeo
When my web service and web application are on the same server (Windows 2003
Standare), everything work fine. When the web application is on a different
server (Windows 2003 Web Server), the application fails giving the error
message I have posted below the code. Any help is appreciated.
Again the web service is working with the web application on the same box.
Additionally, the web service is working across the LAN because a Windows
..Net application is accessing it from the LAN client machines.
WRL
************Code*****************
(I put a fake IP address here. The case "Laser" is being invoked)
(The very last line of code is where it blows up)
Private Sub SetAppData()
Dim ds As New DataSet
Dim rw As DataRow
Dim strServerName As String = "Laser"
With Me
Select Case strServerName
Case "Laser"
.wsCommonURL =
"http://55.55.55.555/DMSDataWS/wsCommon.asmx"
.wsOrgEventURL =
"http://55.55.55.555/DMSDataWS/wsOrgEvent.asmx"
.wsOfferURL = "http://55.55.55.555/DMSDataWS/wsOffer.asmx"
Case "NEWDELL"
.wsCommonURL = "http://Server1/DMSDataWS/wsCommon.asmx"
.wsOrgEventURL =
"http://Server1/DMSDataWS/wsOrgEvent.asmx"
.wsOfferURL = "http://Server1/DMSDataWS/wsOffer.asmx"
Case "DMSSRVR"
.wsCommonURL = "http://Server2/DMSDataWS/wsCommon.asmx"
.wsOrgEventURL =
"http://Server2/DMSDataWS/wsOrgEvent.asmx"
.wsOfferURL = "http://Server2/DMSDataWS/wsOffer.asmx"
Case "GFWEB"
.wsCommonURL = "http://Server3/DMSDataWS/wsCommon.asmx"
.wsOrgEventURL =
"http://Server3/DMSDataWS/wsOrgEvent.asmx"
.wsOfferURL = "http://Server3/DMSDataWS/wsOffer.asmx"
End Select
End With
wsCommon.Credentials = System.Net.CredentialCache.DefaultCredentials
wsCommon.Url = Me.wsCommonURL
ds.Merge(wsCommon.GetAppData) 'BLOWS UP HERE
************Error Message***********
Server Error in '/DMSWeb' Application.
--------------------------------------------------------------------------------
The request failed with HTTP status 404: Not Found.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.
Exception Details: System.Net.WebException: The request failed with HTTP
status 404: Not Found.
Source Error:
Line 241:
<System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DMSDataWS/wsCommon/GetAppData",
RequestNamespace:="http://tempuri.org/DMSDataWS/wsCommon",
ResponseNamespace:="http://tempuri.org/DMSDataWS/wsCommon",
Use:=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _
Line 242: Public Function GetAppData() As System.Data.DataSet
Line 243: Dim results() As Object = Me.Invoke("GetAppData", New
Object(-1) {})
Line 244: Return CType(results(0),System.Data.DataSet)
Line 245: End Function
Source File: D:\WebProjects\DMSWeb\Web References\wsCommon\Reference.vb
Line: 243
Stack Trace:
[WebException: The request failed with HTTP status 404: Not Found.]
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
DMSWeb.wsCommon.wsCommon.GetAppData() in D:\WebProjects\DMSWeb\Web
References\wsCommon\Reference.vb:243
DMSWeb.AppData.SetAppData() in D:\WebProjects\DMSWeb\AppData.vb:257
DMSWeb.AppData..ctor() in D:\WebProjects\DMSWeb\AppData.vb:226
DMSWeb.Start1..ctor() in D:\WebProjects\DMSWeb\Start.aspx.vb:80
ASP.Start_aspx..ctor()
[TargetInvocationException: Exception has been thrown by the target of an
invocation.]
System.RuntimeType.CreateInstanceImpl(Boolean publicOnly) +0
System.Activator.CreateInstance(Type type, Boolean nonPublic) +66
System.Activator.CreateInstance(Type type) +7
System.Web.HttpRuntime.CreatePublicInstance(Type type)
System.Web.UI.TemplateControlParser.GetCompiledInstance(String
virtualPath, String inputFile, HttpContext context)
[HttpException (0x80004005): Failed to create page of type 'ASP.Start_aspx'.]
System.Web.UI.TemplateControlParser.GetCompiledInstance(String
virtualPath, String inputFile, HttpContext context)
System.Web.UI.PageParser.GetCompiledPageInstanceInternal(String
virtualPath, String inputFile, HttpContext context)
System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String
requestType, String url, String path)
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String
requestType, String path, String pathTranslated, Boolean useAppConfig)
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)
Standare), everything work fine. When the web application is on a different
server (Windows 2003 Web Server), the application fails giving the error
message I have posted below the code. Any help is appreciated.
Again the web service is working with the web application on the same box.
Additionally, the web service is working across the LAN because a Windows
..Net application is accessing it from the LAN client machines.
WRL
************Code*****************
(I put a fake IP address here. The case "Laser" is being invoked)
(The very last line of code is where it blows up)
Private Sub SetAppData()
Dim ds As New DataSet
Dim rw As DataRow
Dim strServerName As String = "Laser"
With Me
Select Case strServerName
Case "Laser"
.wsCommonURL =
"http://55.55.55.555/DMSDataWS/wsCommon.asmx"
.wsOrgEventURL =
"http://55.55.55.555/DMSDataWS/wsOrgEvent.asmx"
.wsOfferURL = "http://55.55.55.555/DMSDataWS/wsOffer.asmx"
Case "NEWDELL"
.wsCommonURL = "http://Server1/DMSDataWS/wsCommon.asmx"
.wsOrgEventURL =
"http://Server1/DMSDataWS/wsOrgEvent.asmx"
.wsOfferURL = "http://Server1/DMSDataWS/wsOffer.asmx"
Case "DMSSRVR"
.wsCommonURL = "http://Server2/DMSDataWS/wsCommon.asmx"
.wsOrgEventURL =
"http://Server2/DMSDataWS/wsOrgEvent.asmx"
.wsOfferURL = "http://Server2/DMSDataWS/wsOffer.asmx"
Case "GFWEB"
.wsCommonURL = "http://Server3/DMSDataWS/wsCommon.asmx"
.wsOrgEventURL =
"http://Server3/DMSDataWS/wsOrgEvent.asmx"
.wsOfferURL = "http://Server3/DMSDataWS/wsOffer.asmx"
End Select
End With
wsCommon.Credentials = System.Net.CredentialCache.DefaultCredentials
wsCommon.Url = Me.wsCommonURL
ds.Merge(wsCommon.GetAppData) 'BLOWS UP HERE
************Error Message***********
Server Error in '/DMSWeb' Application.
--------------------------------------------------------------------------------
The request failed with HTTP status 404: Not Found.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.
Exception Details: System.Net.WebException: The request failed with HTTP
status 404: Not Found.
Source Error:
Line 241:
<System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DMSDataWS/wsCommon/GetAppData",
RequestNamespace:="http://tempuri.org/DMSDataWS/wsCommon",
ResponseNamespace:="http://tempuri.org/DMSDataWS/wsCommon",
Use:=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _
Line 242: Public Function GetAppData() As System.Data.DataSet
Line 243: Dim results() As Object = Me.Invoke("GetAppData", New
Object(-1) {})
Line 244: Return CType(results(0),System.Data.DataSet)
Line 245: End Function
Source File: D:\WebProjects\DMSWeb\Web References\wsCommon\Reference.vb
Line: 243
Stack Trace:
[WebException: The request failed with HTTP status 404: Not Found.]
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
DMSWeb.wsCommon.wsCommon.GetAppData() in D:\WebProjects\DMSWeb\Web
References\wsCommon\Reference.vb:243
DMSWeb.AppData.SetAppData() in D:\WebProjects\DMSWeb\AppData.vb:257
DMSWeb.AppData..ctor() in D:\WebProjects\DMSWeb\AppData.vb:226
DMSWeb.Start1..ctor() in D:\WebProjects\DMSWeb\Start.aspx.vb:80
ASP.Start_aspx..ctor()
[TargetInvocationException: Exception has been thrown by the target of an
invocation.]
System.RuntimeType.CreateInstanceImpl(Boolean publicOnly) +0
System.Activator.CreateInstance(Type type, Boolean nonPublic) +66
System.Activator.CreateInstance(Type type) +7
System.Web.HttpRuntime.CreatePublicInstance(Type type)
System.Web.UI.TemplateControlParser.GetCompiledInstance(String
virtualPath, String inputFile, HttpContext context)
[HttpException (0x80004005): Failed to create page of type 'ASP.Start_aspx'.]
System.Web.UI.TemplateControlParser.GetCompiledInstance(String
virtualPath, String inputFile, HttpContext context)
System.Web.UI.PageParser.GetCompiledPageInstanceInternal(String
virtualPath, String inputFile, HttpContext context)
System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String
requestType, String url, String path)
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String
requestType, String path, String pathTranslated, Boolean useAppConfig)
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)