|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Requesting http from a web-site or a windows application, is there any preformance difference?I'll be sending a bunch(1000's) of SMS/day where the cell
phone-numbers are picked up from a database and then a request to something like 'http://www.thirdpartysendingsms.com' is made, they deliver the sms. My question is, which is better; To build an application and run it as a scheduled task OR to build an aspx page to do the work. My concern with an application is that it'll be heavier for it to make the http-requests then it would be for a webpage(I'm just guessing this and haven't found any ground for it when googling). Any and all insight is greatly appreciated. Best regards, Niclas Colleen It sounds much more like a Windows Service you would want to build. This is
the sort of thing that Services are good for. It can run in the background, have its own schedule, and even use .Net configuration for administration. -- Show quoteHTH, Kevin Spencer Microsoft MVP Logostician http://unclechutney.blogspot.com There is a madness to my method. "Niclas Colleen" <niclascoll***@hotmail.com> wrote in message news:1165310317.957022.119880@79g2000cws.googlegroups.com... > I'll be sending a bunch(1000's) of SMS/day where the cell > phone-numbers are picked up from a database and then a request to > something like 'http://www.thirdpartysendingsms.com' is made, they > deliver the sms. > > My question is, which is better; > To build an application and run it as a scheduled task OR to build an > aspx page to do the work. > > My concern with an application is that it'll be heavier for it to > make the http-requests then it would be for a webpage(I'm just > guessing this and haven't found any ground for it when googling). > > Any and all insight is greatly appreciated. > > Best regards, > Niclas Colleen > Ok, thanks Kevin,
I just have this one follow-up question; If a service is to prefer instead of a scheduled task, why? Thanks again for replying, Niclas ¨ Kevin Spencer skrev: Show quote > It sounds much more like a Windows Service you would want to build. This is > the sort of thing that Services are good for. It can run in the background, > have its own schedule, and even use .Net configuration for administration. > > -- > HTH, > > Kevin Spencer > Microsoft MVP > Logostician > http://unclechutney.blogspot.com > > There is a madness to my method. > > "Niclas Colleen" <niclascoll***@hotmail.com> wrote in message > news:1165310317.957022.119880@79g2000cws.googlegroups.com... > > I'll be sending a bunch(1000's) of SMS/day where the cell > > phone-numbers are picked up from a database and then a request to > > something like 'http://www.thirdpartysendingsms.com' is made, they > > deliver the sms. > > > > My question is, which is better; > > To build an application and run it as a scheduled task OR to build an > > aspx page to do the work. > > > > My concern with an application is that it'll be heavier for it to > > make the http-requests then it would be for a webpage(I'm just > > guessing this and haven't found any ground for it when googling). > > > > Any and all insight is greatly appreciated. > > > > Best regards, > > Niclas Colleen > > What you want is an automated task. This does not require a user interface.
That is the definition of a service: an application that performs an automated task with no user interface. -- HTH, Kevin Spencer Microsoft MVP Logostician http://unclechutney.blogspot.com There is a madness to my method. "Niclas Colleen" <niclascoll***@hotmail.com> wrote in message Ok, thanks Kevin,news:1165324472.320087.33370@l12g2000cwl.googlegroups.com... I just have this one follow-up question; If a service is to prefer instead of a scheduled task, why? Thanks again for replying, Niclas ¨ Kevin Spencer skrev: Show quote > It sounds much more like a Windows Service you would want to build. This > is > the sort of thing that Services are good for. It can run in the > background, > have its own schedule, and even use .Net configuration for administration. > > -- > HTH, > > Kevin Spencer > Microsoft MVP > Logostician > http://unclechutney.blogspot.com > > There is a madness to my method. > > "Niclas Colleen" <niclascoll***@hotmail.com> wrote in message > news:1165310317.957022.119880@79g2000cws.googlegroups.com... > > I'll be sending a bunch(1000's) of SMS/day where the cell > > phone-numbers are picked up from a database and then a request to > > something like 'http://www.thirdpartysendingsms.com' is made, they > > deliver the sms. > > > > My question is, which is better; > > To build an application and run it as a scheduled task OR to build an > > aspx page to do the work. > > > > My concern with an application is that it'll be heavier for it to > > make the http-requests then it would be for a webpage(I'm just > > guessing this and haven't found any ground for it when googling). > > > > Any and all insight is greatly appreciated. > > > > Best regards, > > Niclas Colleen > > Hi Kevin, are you still out there?
Or anyone else! Need to retrieve nodes from xml page. I'm using the following code: string sUrl = "http://www.thirdpartysendingsms.com"; HttpWebRequest myRequest =(HttpWebRequest)WebRequest.Create(sUrl); WebResponse myResponse = myRequest.GetResponse(); StreamReader sr = new StreamReader(myResponse.GetResponseStream()); string sResponse = sr.ReadToEnd(); This is what sResponse contains: bostaddirekt97579 While the whole page looks like this: <?xml version="1.0" encoding="UTF-8" ?> - <response code="0" description="Message processed"> <error code="3" description="Could not find any matching prefix for +99999">bostaddirekt97579</error> </response> Now what I want is to be able to extract the error code, in Java I see them using something like: URL myUrl = new URL(sUrl); HttpURLConnection myConn = (HttpURLConnection) myUrl.openConnection(); InputStream in = myConn.getInputStream(); Document myResponse = documentBuilder.parse(in); Element root = myResponse.getDocumentElement(); And then from there one works with the root to find a specific node, is there anything equivalent in c#? Thanks for any pointers! Kevin Spencer skrev: Show quote > What you want is an automated task. This does not require a user interface. > That is the definition of a service: an application that performs an > automated task with no user interface. > > -- > HTH, > > Kevin Spencer > Microsoft MVP > Logostician > http://unclechutney.blogspot.com > > There is a madness to my method. > > "Niclas Colleen" <niclascoll***@hotmail.com> wrote in message > news:1165324472.320087.33370@l12g2000cwl.googlegroups.com... > Ok, thanks Kevin, > > I just have this one follow-up question; > > If a service is to prefer instead of a scheduled task, why? > > Thanks again for replying, > Niclas > ¨ > > Kevin Spencer skrev: > > > It sounds much more like a Windows Service you would want to build. This > > is > > the sort of thing that Services are good for. It can run in the > > background, > > have its own schedule, and even use .Net configuration for administration. > > > > -- > > HTH, > > > > Kevin Spencer > > Microsoft MVP > > Logostician > > http://unclechutney.blogspot.com > > > > There is a madness to my method. > > > > "Niclas Colleen" <niclascoll***@hotmail.com> wrote in message > > news:1165310317.957022.119880@79g2000cws.googlegroups.com... > > > I'll be sending a bunch(1000's) of SMS/day where the cell > > > phone-numbers are picked up from a database and then a request to > > > something like 'http://www.thirdpartysendingsms.com' is made, they > > > deliver the sms. > > > > > > My question is, which is better; > > > To build an application and run it as a scheduled task OR to build an > > > aspx page to do the work. > > > > > > My concern with an application is that it'll be heavier for it to > > > make the http-requests then it would be for a webpage(I'm just > > > guessing this and haven't found any ground for it when googling). > > > > > > Any and all insight is greatly appreciated. > > > > > > Best regards, > > > Niclas Colleen > > > |
|||||||||||||||||||||||