Aspx and C# communication...

  • Thread starter Thread starter pnp
  • Start date Start date
P

pnp

Hi all,
I want to develop an app that during it's installation it activates
itself by making a request to a page online (aspx), than runs a script and
provides an activation string for the app. How can I make this communication
happen?

Thanks in advance,
Peter
 
pnp said:
I want to develop an app that during it's installation it activates
itself by making a request to a page online (aspx), than runs a script and
provides an activation string for the app. How can I make this communication
happen?

Hi Peter,

look at the System.Net.WebClient class.

Example:

System.Net.WebClient wc = new System.Net.WebClient();
byte[] data = wc.DownloadData("http://www.mkcs.at/index.wml")
string strData = System.Text.ASCIIEncoding.UTF7.GetString(data);

HTH,

Michael

--
How to contact me
~~~~~~~~~~~~~~~~~
directly via mail: remove the "NOTUSEABLE" and the point after it and
reverse the characters
via my portal: go to
http://great.dynu.com/tools/contact.4s?lang=en&ref=usenet
 
Hi Peter,

I would think a simple webrequest/response to a specified url would do what you want. You should be able to pass some info to the page with the request. Then you can simply parse the web page returned.

Happy coding!
Morten Wennevik [C# MVP]
 
Create a webservice. It can just return some XML and you won't have to parse
through an HTML page for the results.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Image transition effects, automatic persistent configuration and
design time mouse operations all in April's issue of Well Formed
http://www.bobpowell.net/wellformed.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

The GDI+ FAQ RSS feed: http://www.bobpowell.net/faqfeed.xml
Windows Forms Tips and Tricks RSS: http://www.bobpowell.net/tipstricks.xml
Bob's Blog: http://royo.is-a-geek.com/siteFeeder/GetFeed.aspx?FeedId=41
 
Back
Top