[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.9

how to call asp.net xml web service from asp page

Asked by ziorrinfotech in Active Server Pages (ASP), Web Services and WCF

Tags: asp, asp.net web service

I have created a web service in dot net. and a asp page to call this service.
if i test this on my local machine every thing works fine.

but when i upload my web service and try to use it from local hosted asp page then i am getting.
any one could help me out here.
the error is here

Server Error in '/' Application.
--------------------------------------------------------------------------------

Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".


<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>
 

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.


<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>
 
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
this is my asp page code
 
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<html>
<head>
<title>Calling a webservice from classic ASP</title>
</head>
<body>
<%
If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
Dim xmlhttp
Dim DataToSend
dim objDoc
dim xmlstring
DataToSend="val1="&Request.Form("text1")&"&val2="&Request.Form("text2")
Dim postUrl
If Request.Form.Item("Operation")="Sum" Then
postUrl = "http://www.test.clipcustomerportal.com/MailingListService.asmx/Sum"
elseIf Request.Form.Item("Operation")="Subtraction" Then
postUrl = "http://www.test.clipcustomerportal.com/MailingListService.asmx/Subtract"
elseIf Request.Form.Item("Operation")="MailingListOID" Then
DataToSend = "mailingListOID="&Request.Form("text3")
postUrl = "http://www.test.clipcustomerportal.com/MailingListService.asmx/GetMailingListFromOID"
elseIf Request.Form.Item("Operation")="MailingListStringOID" Then
DataToSend = "mailingListOID="&Request.Form("text3")
postUrl = "http://www.test.clipcustomerportal.com/MailingListService.asmx/GetMailingListStringFromOID"
end if
Set xmlhttp = server.Createobject("MSXML2.XMLHTTP")
xmlhttp.Open "POST",postUrl,false
xmlhttp.setRequestHeader "Content-Type","application/x-www-form-urlencoded"
xmlhttp.send DataToSend
Response.Write DataToSend & "<br>"
xmlstring = xmlhttp.responseText
Response.Write(xmlstring)
Else
Response.Write "Loading for first Time"
End If
%>
<FORM method=POST name="form1" ID="Form1">
Enter the two Values to perform Operation<BR>
<select name="Operation">Select Operation<option value="Sum">Sum</option>
<option value="Subtraction">Subtraction</option>
<option value="MailingListOID">MailingListOIDFunction</option>
<option value="MailingListStringOID">MailingListOIDStringFunction</option></select>
<INPUT type="text" name="text1" ID="Text1">
<INPUT type="text" name="text2" ID="Text2">
<BR><BR>
Enter MailingOID
<INPUT type="text" name="text3" ID="Text3" value="11280">
<BR><BR>
<INPUT type="submit" value="GO" name="submit1" ID="Submit1">
</form>
</body>
</html>
 
 
[+][-]09/15/09 10:51 AM, ID: 25337425Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Active Server Pages (ASP), Web Services and WCF
Tags: asp, asp.net web service
Sign Up Now!
Solution Provided By: apeter
Participating Experts: 1
Solution Grade: A
 
 
Loading Advertisement...
20091111-EE-VQP-89 - Hierarchy / EE_QW_3_20080625