views:

185

answers:

3

hey guyz, i need to ask you that is it possible that i can get the code of the page which is built using dot net into classic asp page actually i am accessing a webservice for which i need to have dotnet. so i want to run that service in asp.net get or parse results and then i want to show them in a classic asp page.

is it possible, if so then how can i do this? thanks

A: 

If you only want the result, you could screen scrape it using the msxml ServerXMLHTTP object.

This seems to sum up the approach nicely: How do I read the contents of a remote web page

DeletedAccount
A: 

Usally webservices responses in XML. So if thats the case, you have to parse the XML in your classic asp

Andersson
+1  A: 

If your web service is more complicated and you're more comfortable writing the code to access it in .NET, then you can use COM interop to call into your .NET assembly from the classic ASP page. Here's the type of code you might then use in your ASP page:

// Create an instance of the .NET assembly
Set service = Server.CreateObject("MyDotNetAssembly.CustomerService")

// Invoke the method on your object that calls into the web service
service.GetCustomer customerId

// You can expose the results of the service call as properties on your object
Response.Write "First name: " & service.FirstName
Response.Write "Last name: " & service.LastName

// Clean up your object reference
Set service = Nothing

For this to work you'll need to strong name your .NET assembly, register it in the GAC using gacutil, and finally register it for COM interop using regasm.

Mike Powell
+1 to push you over 1,000
Polaris878