Web App can't find web service

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)
 
W

WhiskyRomeo

Are you talking about something like . . .
Dim myCred As New
NetworkCredential(SecurelyStoredUserName,SecurelyStoredPassword,SecurelyStoredDomain )

wsCommon.Credentials = myCred

This may be basic to you but to me the credentials is a mystery to me since
if you had wanted to have a public webservice -- would you provide the
credentials to access it?

WRL
 
W

WhiskyRomeo

I always could see the web service via IE directly and yes it did present me
with a Windows login. For example wsCommon.asmx displays listing all its
methods.

I created credentials based on the same username, password, and domain as I
used in replying to the Windows login but I still get the same result.

WRL
 
W

WhiskyRomeo

Last night, your responses kept me working on it. I have this web service
on another server available to me over the internet. So I pointed my urls to
it and ran the project on my local development machine (don't know why I
didn't think of this before). It works perfectly. It was hitting a web
service over 1500 miles away. I was even surprised by the performance
because a prettly large dataset is returned.

So I installed this version of the project on the server where I am having
the problem and I still get the 404 error. It returns so fast, that there is
no way it went out across the internet and hit the web service. At this
point, I am suspecting a server/LAN configuration and have the LAN admins
looking at this now.

I appreciate the offer for help and may yet have to take advantage of it.
But, I am pretty sure everything with the web service itself is ok.

WR
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top