Advertisement

04.28.2008 at 08:20AM PDT, ID: 23359012
[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!

How do I call a web service from ASP classic page

Hi I have code which i believe should work but it is coming back with operation timed out.  Below is the code.  The web service is on the same server as the asp code.
This same code seems to work for another asp app running on the server
The method I am calling is SendSingleUser and it requires an integer userId

    dim xmlhttp, httpReq, url
    httpReq = "userId=" & CStr(registrationId)    
    url = "http://services.myservices.org.uk/webservices.asmx/SendSingleUser"
    Set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP.4.0")
    xmlhttp.open "POST", Url, false
    xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
    xmlhttp.send httpReq
    set xmlhttp = nothing
Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: gbzhhu
Solution Provided By: TheLearnedOne
Participating Experts: 3
Solution Grade: A
Views: 0
Translate:
Loading Advertisement...
04.28.2008 at 08:51AM PDT, ID: 21455119

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.28.2008 at 09:34AM PDT, ID: 21455443

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.28.2008 at 02:34PM PDT, ID: 21457832

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.29.2008 at 02:13AM PDT, ID: 21460610

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.29.2008 at 02:25AM PDT, ID: 21460662

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.29.2008 at 01:29PM PDT, ID: 21465925

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.30.2008 at 09:38AM PDT, ID: 21472344

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.07.2008 at 05:51AM PDT, ID: 21515823

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.13.2008 at 04:05AM PDT, ID: 21553762

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.13.2008 at 04:09AM PDT, ID: 21553784

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.13.2008 at 04:55AM PDT, ID: 21554070

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.13.2008 at 05:19AM PDT, ID: 21554241

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.13.2008 at 05:21AM PDT, ID: 21554256

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.13.2008 at 05:48AM PDT, ID: 21554462

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.13.2008 at 07:18AM PDT, ID: 21555255

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.13.2008 at 07:24AM PDT, ID: 21555327

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.13.2008 at 07:50AM PDT, ID: 21555602

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.13.2008 at 07:55AM PDT, ID: 21555661

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.13.2008 at 08:09AM PDT, ID: 21555806

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.13.2008 at 08:16AM PDT, ID: 21555884

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.13.2008 at 08:30AM PDT, ID: 21556028

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.13.2008 at 08:30AM PDT, ID: 21556035

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.13.2008 at 08:36AM PDT, ID: 21556098

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.13.2008 at 09:25AM PDT, ID: 21556653

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.13.2008 at 05:13PM PDT, ID: 21560315

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.14.2008 at 01:30AM PDT, ID: 21562073

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.14.2008 at 04:06AM PDT, ID: 21562801

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.14.2008 at 04:35AM PDT, ID: 21562987

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • Automotive
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Displays / Monitors
  • Handhelds / PDAs
  • Components
  • Peripherals
  • Laptops/Notebooks
  • Servers
  • Misc
  • Apple
  • Embedded Hardware
  • Networking Hardware
  • Storage
  • Desktops
  • New Users
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMware
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Virtualization
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • Web Computing
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Consulting
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMware
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Automation
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Web Services
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Web Computing
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Lounge
  • Business Travel
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
  • Automotive
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
04.28.2008 at 08:51AM PDT, ID: 21455119
may be you need some more parameters......look at this

http://www.aspfree.com/c/a/ASP/Consuming-a-WSDL-Webservice-from-ASP/
 
04.28.2008 at 09:34AM PDT, ID: 21455443
Hi nsanga

I tried passing a true so we do not wait for web service execution.  My web page carries on as if everything is fine but my web service is not getting called.  I tried writing to eventlog at the beginning of the method.  It doesn't seem to be happening.  No errors on the eventlog either!  any ideas?
 
04.28.2008 at 02:34PM PDT, ID: 21457832
if I understand correctly........both asp applications and webservice are on the same machine.......and one asp application works and another does not work......

can you open the webservice method URL http://services.myservices.org.uk/webservices.asmx/SendSingleUser in IE....


does both the applications run under same user account........
 
04.29.2008 at 02:13AM PDT, ID: 21460610
If I type as you did it doesn't work and says "Request format is unrecognized" But if I list methods it does fine and then i can click on the method and it will display in IE but the url is http://services.myservices.org.uk/webservices.asmx?op=SendSingleUser.  I am using IE 7
 
04.29.2008 at 02:25AM PDT, ID: 21460662
And yes the two applications are running under the same user account
 
04.29.2008 at 01:29PM PDT, ID: 21465925
i am not sure whats the problem is...........

may be you can try both the web services with sample vb.net client application.

create a vb.net client application and add web references to both the webservices. and test whether both works.... if not then there is some problem with the webservice......


also compare the Namespace value ( see below line for ex ) for both the asmx files in both web services

<WebService(Namespace:="http://localhost/AdminToolService")> _
 
04.30.2008 at 09:38AM PDT, ID: 21472344
I created a test c# win forms app.  Initially I had a problem - Requested Registry Access Not Allowed. - This was not the cause however, as I have fixed that and the call to web service gets to the server and writes to the eventlog.  When  I call from the asp code, depending on whether I set the last parameter to true or false I get 2 different results

xmlhttp.open "POST", Url, true
I get the page run as expected and fast (return to web service call is not waited for) BUT no eventlog entry! thus service was not called.

xmlhttp.open "POST", Url, false
I get the page hang for awhile 20 secs or so then error - operation timed out

it is a bugger !!!

 
05.07.2008 at 05:51AM PDT, ID: 21515823
Hi nsanga,

I am still struggling with this issue and I think I missed something important.  The issue is likely to be on the server.  I have two servers  A and B and two webservice WS_A and WS_B.  WS_A runs on A and is called by ASP script on B and that works fine. WS_B runs on B and is called by ASP script on B (identical code, just url difference) BUT that doesn't work.  This seems to suggest that the issue is on server B.  However, I have code C# winforms that calls the webservice and that works fine!  This, then, points me to either MSXML SDK itself or some IE, IIS setting/patch/SP required.

So far that is my findings.  Can you add anything to help me get to the end of this please.

Cheers
H
 
05.13.2008 at 04:05AM PDT, ID: 21553762
Current situation.

I ignored the  web service I was using before as it was an old one.  I created a brand new web service with 1 method called Test that returns string.  All it does is return "hello world".  This is on C# .NET 2.0.  I placed this on the server that has another .NET 1.1 webservice working with asp calls.  I made the call from ASP as follows but still get the same old error

      Dim objXMLHTTP
      Set objXMLHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP.4.0")
      With objXMLHTTP
            .Open "POST", "http://dataexport.britishpotatocouncil.org.uk/ExportService.asmx/Test", False
            .SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"            
            .SetTimeouts 20000, 20000, 600000, 600000
            .Send
      End With

      Set objXMLHTTP = Nothing

I can get IE on my local machine to list the web service methods so I know firewall, server and web service are all fine.  I created a test winform app and all is good.  I get back the string I expect from the method.

Why on earth is ASP call not working.  I tried giving ASP.NET and Network Services accounts full control but it doesn't help.  If I change the url in the ASP code to point to other .NET 1.1 web service on the same server it works 8-/

Any help is appreciated as I am getting desperate now

Cheers
H



 
05.13.2008 at 04:09AM PDT, ID: 21553784
The error I am getting is

Number -2147012744(0x80072F78)
Source  
Category msxml4.dll
Description The server returned an invalid or unrecognized response  
 
05.13.2008 at 04:55AM PDT, ID: 21554070

Rank: Master

You probably need to figure out what the server response is.  It sounds like it is not sending back an XML response, but maybe an error HTML response.

What happens if you connect with a .NET client?

 
05.13.2008 at 05:19AM PDT, ID: 21554241
I tested with a .NET winforms client and it works like a charm.

I also tried to do an Eventlog entry in the test method - when testing with .NET client the entry is made in the log but when from ASP classic excution doesn't reach there.

It is difficult to figure out what is coming back from the server.  The error occurs on the Send method of the objXMLHTTP object, therefore execution doesn't go beyond that - ie displays an error page.

If I decide to give this up as it is driving me mad, what other solution can replace it with.  Basically I have a .NET dll that does some work.  The ASP code at certain place needs to invoke that functionality.  This is why I decided to create a web service that sits between the ASP and the .NET component.  Any ideas?

Thanks
H
 
05.13.2008 at 05:21AM PDT, ID: 21554256
Will IIS log errors and if so where?  I may find something there
 
05.13.2008 at 05:48AM PDT, ID: 21554462
When I make a test call from .NET winforms client, the following is recorded by IIS on server

#Software: Microsoft Internet Information Services 6.0
#Version: 1.0
#Date: 2008-05-13 12:30:59
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status
2008-05-13 12:30:59 192.168.1.91 POST /exportservice.asmx - 80 - 192.168.1.130 Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+2.0.50727.1378) 200 0 0

When I make athe same test from ASP,  IIS doesn't record anything!!
 
05.13.2008 at 07:18AM PDT, ID: 21555255
do you have this on your web.config file?

<webServices>
    <protocols>
        <add name="HttpGet"/>
        <add name="HttpPost"/>
    </protocols>
</webServices>

http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/ASP/Q_22109909.html
 
05.13.2008 at 07:24AM PDT, ID: 21555327

Rank: Master

Another possibility is to create a .NET DLL that makes the web service call for you, and return something that ASP classic can handle.
 
05.13.2008 at 07:50AM PDT, ID: 21555602
EDDYKT,

I don't but I had on my previous old one.  I can add it and see.

Bob,

How do I call the .NET DLL from ASP classic.  If I could do that I wouldn't need the webservice!
 
05.13.2008 at 07:55AM PDT, ID: 21555661

Rank: Master

Do you know the steps to call .NET assemblies from COM?

Calling .NET From COM
http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=113
Accepted Solution
 
05.13.2008 at 08:09AM PDT, ID: 21555806
Bob,

I knew these steps awhile back but never really used them and cannot remember.  The reason I didn't look into them is that I am just coding inside an ASP file which is VBScript if I am not mistaken so how is COM involved here (unless of course I write a VB 6 COM component which calls the .NET DLL which has been made COM callable.)  or can VBScript call the COM callable .NET DLL?

That .NET DLL is used by other pure .NET components.  You may have a solution there if you could explain how it all fits please, thanks
 
05.13.2008 at 08:16AM PDT, ID: 21555884

Rank: Master

Reference:

VBScript CreateObject Function
http://www.mna.hkr.se/caspdoc/html/vbscript_createobject_function.htm

You just need to know what the ProgID is for .NET assemblies.
 
05.13.2008 at 08:30AM PDT, ID: 21556028
OK!  looking good now :-)

The last thing is that if I turn the dll on the server COM callable how will this affect the other .NET assemblies already calling the non-com callable dll?  I am scared of breaking the other .NET asemblies using the dll.
 
05.13.2008 at 08:30AM PDT, ID: 21556035
EDDYKT,

Update to the web.config didn't help
 
05.13.2008 at 08:36AM PDT, ID: 21556098

Rank: Master

You can easily make COM callable classes that expose interfaces to the COM side, and still provide functionality on the .NET side.
 
05.13.2008 at 09:25AM PDT, ID: 21556653
Cheers Bob.

I decided to make an intermediate .NET DLL that passes method calls to the final DLL that does the work.  I now created a small test .NET DLL, copied over to server, did a Regasm on it and tested.  I have 2 copies on server 1 in C:\ it was there when I run a regasm on it.  I also have a copy in system32.  Now the error I am getting is "The system cannot find the file specified.".  I am looking for how to add it to the GAC.

Just keeping you updated and in case you know quicker ways to resolve
 
05.13.2008 at 05:13PM PDT, ID: 21560315