Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newby solution required

Status
Not open for further replies.

Keyth

Programmer
Feb 10, 2007
113
GB
Hello, I am a newby to ASP.Net but have many years of experience in VB6-VB.Net 2010 and little experience with Java/Servlets. I want to start coding ASP.

I have a situation where my host will not allow IP access to MySQL databases. My site is currently built with wordpress and but for my client applications, I need a page that receives a request to collect a single value from a database and send the value back. My Winforms project wants to connect to my website and get a license string from the hosted database to validate use of my application.

I have C# code (dll) in my VB.Net app which will collect info via Http Request and Response but I need help in understanding best approach plan on retrieving the data.

If anybody else has a similar setup I would appreciate their advise on the best way this should be done. I have books which I can use to code an ASP/ASPX page to run on my webserver but I need guidance before I start coding!

Any help would be much appreciated
with thanks,
Keith

 
it sounds like all you are doing is making a remote call to a server over http. if that's correct:
1. the client app sends a request to the server over a url
2. the server receives the request and, in this case, queries the database for a single value.
3. the server then sends the result of the query back to the client using an http response.
4. the client receives the response, parses the value from it and uses it.

the client will not have any knowledge about how the server works. the client only expects to get a value when calling the url.

on the client you will want to use a WebRequest to send a request to the server.
on the server you will use ado.net to query the database. since you are only retrieving a single value you can use command.ExecuteScalar() to retrieve the value.
the server will then serialize the result. either to xml or json. and send a response to the client.
no webpage or html needed.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
Hi Jason

What handles the request and response without a web page in use?
Do you know where I can get examples to see how it all comes together, are there any sites you know of?

Thanks,
Keith

 
What handles the request and response without a web page in use?
the server handles the request and response. a webpage is just one response that can be returned by the server. when i refer to webpage, I mean html that when rendered in a browser is designed for a human to view.
Do you know where I can get examples to see how it all comes together, are there any sites you know of?
probably not all the pieces packaged in a single tutorial, but examples of each of the pieces is on the web.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top