user995262
user995262

Reputation: 25

Calling asp.net function within web application from vb.net / outside

Is it possible to call a function within an asp.net web application from outside that application e.g. with VB.net? If so it would be great to see a hello world type example.

For arguments sake lets say I have my function "helloworld" in a class file within web application: http://server/helloworldapp

My ultimate goal is to enable some reliable / robust scheduling of functions within asp.net. I have read multiple examples about using web services / custom services running on the server etc but I don't really get the implementation.

Thanks

Upvotes: 0

Views: 657

Answers (2)

Martijn B
Martijn B

Reputation: 4075

Based on the information in your question I cannot give you a out the box solution. But in general you can achieve this by multiple ways:

  1. Lift your class containing the method you want to call into a seperate class library, which you can share between the different apps you want.

  2. Expose the method as a webmethod through a webservice or pagemethod.

Upvotes: 1

jdross
jdross

Reputation: 1206

Make sure you have public methods in the asp.net class and you should be able to reference the web page dll from within your other vb.net project.

Though this really goes against best practices and you should try and isolate the method you are needing to reference into a separate business layer

Upvotes: 1

Related Questions