c# - Writing a file locally ASP.NET -


i have classic asp script opens url , generates .gif provided local machine - ran every hour via scheduled tasks 'update' gif appropriately. here ourfile.asp:

<%  'the url our .gif returned url = "http://api.ourweathersite.com/api/our/api/request" 'create our xmlhttp request set xmlhttp = server.createobject("msxml2.serverxmlhttp.6.0")  xmlhttp.open ("get", url, false)  'send our request xmlhttp.send 'create binary stream of request , save .gif server.createobject("adodb.stream")     .type = 1 '1 binary stream     .open     .write xmlhttp.responsebody     .savetofile server.mappath("\myiisdirectory\mygif\myresponse.gif"), 2 ' 2 overwrite     .close end set xmlhttp = nothing  %> 

i need convert asp.net we've upgraded server hosts (went 2003 box 2012 box asp.net).

what best way go this? there way classic asp running on newer box without converting asp.net?

it's not super complex task, haven't been able find online , changing extension .aspx (as expected, suggested somewhere) doesn't work.

is necessary rewrite this?

is there way classic asp running on newer box without converting asp.net?

yes. classic asp can enabled on windows server 2012. lot of tutorials can found on internet; here 1 of them:

is necessary rewrite this?

no. if want go asp asp.net, there no need rewrite this: can keep on using msxml2 library (which still present in newer windows versions), need learn vb.net , translate vbscript vb.net. should quite straight-forward.


Comments