|
Wow, I can't believe I didn't think about that. Thanks.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
You can't start a Windows Service like that. Start here http://msdn2.microsoft.com/en-us/library/d56de412(VS.80).aspx[^]
Member 1648727 wrote: how can I have windows service published on some asp.net server
Do a little more research and figure out what it is you want, a web service or a windows service.
only two letters away from being an asset
|
|
|
|
|
Hello guys (and girls),
Thank you for your help, I appreciate that
I have finished all the coding.
Program checks a web site and if it finds one specific word then it emails result and sends sms to mobile number. (sorry cant copy/past code because company rules)
Now only question is : Will it be a web service or windows service ?
If I am going to place it locally on my computer then I will need to do some additional checks , like is there any Internet connection and so. I dont like that.
Is it possible to have this code running on some remote server? (I have godaddy account but don't know where to look). Isnt that what web service do ?
THANK YOU ALL !
|
|
|
|
|
Webservices are more of a pull technology. Something must initiate the action. A Windows Service on the other hand can be designed to self trigger, or run at a set interval.
Member 1648727 wrote: like is there any Internet connection and so. I dont like that.
Without an internet connection how are you planning on checking these websites for keywords?
only two letters away from being an asset
|
|
|
|
|
Mark Nischalke wrote: Webservices are more of a pull technology. Something must initiate the action. A Windows Service on the other hand can be designed to self trigger, or run at a set interval.
Hello Mark
Yes I know web services are more like pull technology. I work in a company that works together with airlines. Our present project is SMS client which tracks flights and sends information to passenger mobile phone. Thats where we needed web services.
But this other problem I have is little bit different.
To have some small program running all the time which can check some url periodicaly ...
Mark Nischalke wrote: Without an internet connection how are you planning on checking these websites for keywords?
So I need two things
- PC running all the time
- Internet connection
That looks like server, right. Now I come to conclusion:
You can't install it at some real server like 'windows service' (unless you are IT administrator in your local company)
You can't install it as 'web service' because it will need something to invoke it, and you don't wanna to do that.
Please someone , let me know that is practice here, so I don't go around to much
I will ask godaddy support if they know anything about this...
Cheers!
|
|
|
|
|
Member 1648727 wrote: Please someone , let me know that is practice here, so I don't go around to much
You have been given the answer, several times. This project is clearly beyond your abilities if you can't see that. Leave it someone else, or give up.
only two letters away from being an asset
|
|
|
|
|
Mark Nischalke wrote: You have been given the answer, several times.
No I didnt get clear answer "several times" because probably no one here understands this matter, or maybe I was not clear enough.
Mark Nischalke wrote: This project is clearly beyond your abilities if you can't see that. Leave it someone else, or give up.
No its not "beyond my abilities":
Imports System.Net.Mail<br />
Imports System.IO.Ports<br />
<br />
Public Class Service1<br />
<br />
Public Names(25, 2) As String<br />
<br />
Public Sub CheckBAH()<br />
Dim strHTML As String = GetPageHTML("http://www.**********.aspx")<br />
Dim pos As Integer = strHTML.IndexOf("")<br />
strHTML = strHTML.Substring(pos, 200)<br />
Dim Username As String = strHTML.Substring(3, strHTML.IndexOf("(") - 3).Trim<br />
'Dim pin As String = strHTML.Substring(3, strHTML.IndexOf("(") - 3).Trim<br />
<br />
Dim eur As Integer = strHTML.IndexOf("€")<br />
Dim Prize As String = strHTML.Substring(eur - 10, 10)<br />
<br />
Dim i As Integer<br />
For i = 0 To 25<br />
If Username.ToUpper = Names(i, 0).ToUpper Then<br />
SendEmail(" Izvucen si ", Names(i, 0) & Names(i, 1) & Prize, "*************@yahoo.com")<br />
'SendEmail(" Izvucen si ", Names(i, 0) & Names(i, 1) & Prize , "*************@yahoo.com")<br />
End If<br />
Next<br />
End Sub<br />
<br />
Public Function GetPageHTML(ByVal URL As String) As String<br />
' Retrieves the HTML from the specified URL<br />
Dim objWC As New System.Net.WebClient()<br />
Return New System.Text.UTF8Encoding().GetString(objWC.DownloadData(URL))<br />
End Function<br />
<br />
Public Function SendEmail(ByVal strSubject As String, ByVal strBody As String, ByVal strEmail As String) As String<br />
Dim message As New MailMessage(strEmail, strEmail, strSubject, strBody)<br />
Dim emailClient As New SmtpClient("out.mail.bih.net.ba")<br />
Dim SMTPUserInfo As New System.Net.NetworkCredential("******", "******")<br />
emailClient.UseDefaultCredentials = False<br />
emailClient.Credentials = SMTPUserInfo<br />
<br />
emailClient.Send(message)<br />
Return 0<br />
End Function<br />
<br />
Private Sub InitializeComponent()<br />
Me.components = New System.ComponentModel.Container<br />
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)<br />
Me.SuspendLayout()<br />
'<br />
'Timer1<br />
'<br />
Me.Timer1.Interval = 1000<br />
'<br />
'Service1<br />
'<br />
Me.ClientSize = New System.Drawing.Size(292, 266)<br />
Me.Name = "Service1"<br />
Me.ResumeLayout(False)<br />
<br />
End Sub<br />
<br />
<br />
Public Sub ReadNames()<br />
Names(0, 0) = "********"<br />
.........<br />
Names(25, 1) = "**********"<br />
End Sub<br />
<br />
<br />
Private Sub Timer1_Tick_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick<br />
<br />
Debug.Print(Internet)<br />
'CheckBAH()<br />
End Sub<br />
Private Function Internet() As Boolean<br />
Dim siteResponds As Boolean = False<br />
Try<br />
siteResponds = My.Computer.Network.Ping("www.google.com")<br />
Catch ex As Exception<br />
<br />
Return siteResponds<br />
End Try<br />
Return siteResponds<br />
End Function<br />
<br />
Private Sub Service1_Load_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
ReadNames()<br />
Timer1.Start()<br />
<br />
End Sub<br />
End Class<br />
|
|
|
|
|
Listing code doesn't prove any ability beyond cut & paste, especially since its only VB.
Member 1648727 wrote: probably no one here understands this matter, or maybe I was not clear enough.
I highly, highly doubt the former is true and it is quite arrogant of you consider it as an excuse. The statement proves, as I stated before, the concept is beyond you to understand and see that you have the answers.
only two letters away from being an asset
|
|
|
|
|
Hy!
I filled a GridView with some data from a table(obtained from a DataBase).
Now i have to delete some row, but i have to do this without deleting that information from the DataBase. It would be easy to use DataBase. I would obtain that table and fill that GridView again on the pageLoad, but i'm not aloud.
I really didn't find how to do this.
Please someone help! If this is possible.
|
|
|
|
|
How are you binding the data to the GridView? Are you using a DataTableAdapter or some other object? A DataTable or DataSet are in-memory representations of the data, so unless you are calling a method to delete the row directly in the database, you should only be working with a temporary copy of the data.
only two letters away from being an asset
|
|
|
|
|
I'm doing like this:
gridView.DataSource = table;
gridView.DataBind();
"table" is the table that i get from an SQL query. This piece of code, is integrated in a fillGridView function that i have, but i suppose this is what you are interested in.
|
|
|
|
|
And what is table? I'll assume it is a DataTable, in which case it is, once again, an in-memory representation of the data, not connected to the database from which you obtained it.
only two letters away from being an asset
|
|
|
|
|
I'm filling this gridView on the form's load. Now, every time i delete a row i redirect to the same page, i get the table from the database and fill the grid. Because i don't modify the database the table will always be the same. Supposing i fill it with a DataSet, which i modify every time i press delete, how do you suggest kipping that DataSet? It works if i use Session variables? I can't try it cause i don't have the code right now?
|
|
|
|
|
First don't delete rows one at a time, use a checkbox column to allow the users to select which rows to delete, then do it all at once. Or, yes cache the data, then update the database when completed. This isn't an unknown problem, there are a wide variety of articles on the subject.
only two letters away from being an asset
|
|
|
|
|
Probably the way i'm doing the fill now is putting me in a serious problem cause i'm not aloud to modify the database. First, it was made following this idea.
How should i proceed now?
Filling a dataset from a table then filling the GridView with a dataset?
Then I activate that delete button and so on?
I'll show you exactly the fillGridView function i have over 2 days.
modified on Friday, February 29, 2008 7:08 PM
|
|
|
|
|
Allowed != aloud
I don't need to see the code. Once you fill the dataset via your database query, the data has become disconnected from the database. I've told you this several times now.
only two letters away from being an asset
|
|
|
|
|
Yes indeed!
I've tried to much to adapt the code i had.
I'll change the approach.
Thanks!
|
|
|
|
|
I'm trying to read an Excel file into my ASP.NET page; not just the entire file, but individual cells. I'm having lots of trouble, I've been looking online at example of reading in an entire Excel file, and I can't even do that. I'm having problems.
|
|
|
|
|
Can you be more specific with what 'problems' you are having? Maybe some sample code...
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
I have an ASP.NET program that reads in a text file, then does stuff with it. What I would really like to do is allow the user to right-click on their text file, click "Send To", and then send it to my program on the list.
(I know how to add my program to the "Send To" list, just type in "sendto" in the run command)
My problem is that I have the text file, and I have the program in the "Send To" option; how do I make them compatible so that the program will read in the text file being sent?
|
|
|
|
|
Have you solved this? Not sure of anyway to do it...
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
How can i get html control value in codebehind page ?
thnx in advance!
|
|
|
|
|
Use runat='server' property in html control.
/***********************/
Parwej Ahamad
g.parwez@gmail.com
/***********************/
|
|
|
|
|
Hello Friends..............
I am using AjAX Control Toolkit Tools in my web application.
Such as Calender Extender, Rounded corner and Masked edit......
But I am afraid that these tools may create problem during deployment..........
Please tell me that these controls are reliable or not.........
Thanks
Deepak Nigam
|
|
|
|
|
deepaknigam11 wrote: Please tell me that these controls are reliable
OK, yes they are reliable*. Does it make you feel any better?
What is your concern? What deployment problems?
* Statement is opinion only and not based on facts.
only two letters away from being an asset
|
|
|
|