I was able to get this working today, the only problem is that I cannot close the session. It appears that this is a Windows thing, because I see the same behavior when I do so within computer management. I can right click and say "Close session" and then refresh and it will reappear.
I was wondering if you had any ideas on how to actually close the session?
In my code, I am calling session.Delete(); without any success.
The blizzard authentication is really cool, just as well as all other RSA tokens. I understand that synchronization plays an important role in this matter, but when using RSA or authenticated encryption, isn't its main goal based on time of the day that this information is generated? If so, if the server goes down, doesn't that mess up the synchronization with all other devices?
My understanding is that the Blizzard authenticator is purely a number generating machine.
It does not depend on the time - if you ever use an RSA token you will find that each time a new number shows a bar also decreases in size.
With an RSA token you need to enter the number generally while there are still two bars left due to this synchronization issue.
The Blizzard authenticator has no such countdown bar.
I think this question may also need to go to the lounge as it is not really a C# question
Continuous effort - not strength or intelligence - is the key to unlocking our potential.(Winston Churchill)
Hello. I need to develop an sms application to send sms to all customers phone numbers immediately an item comes into stock. Please i need to understand the basics. How to cut out sms resellers and develop my own. please its important and urgent.
Thank you for your anticipated response and clear help.\
I actually used this feature provided in VB.NET, as a project for a break alarm here at work. It was made to notify people of the breaks about to end 5-10min prior to the end of the break. Of course it was used through via Email the mobile number. So the down side is, is that people had to use their email account credentials to setup the automatic notification. Of course the contrast in this to match what he expects would to be setting up a generic email account and of course applied directly to the code for the notification. At least that is my 2 copper. The implementation is very easy and with just a few lines of code. Use c# > vb for better management. But for unfamiliarity use the vb.net
Code for VB.NET
Dim insMail As New MailMessage()
.From = strFrom
.To = strTo
.Subject = strSubject
.Body = strBody
.Cc = strCC
If Not strAttachments.Equals(String.Empty) Then
Dim strFile As String
Dim strAttach() As String = strAttachments.Split(";")
For Each strFile In strAttach
If Not strSMTPServer.Equals(String.Empty) Then
SmtpMail.SmtpServer = strSMTPServer
Catch e As Exception
Then pick from the list in which your employees have the provider:
<a href="http://en.wikipedia.org/wiki/List_of_SMS_gateways">SMS Gateway Listing</a>
public partial class Form1 : Form
private void button1_Click(object sender, EventArgs e)
MailMessage SMS = new MailMessage();
SmtpClient SMTP_Server = new SmtpClient(SMTP_Server_Name);
// Use Generic Account information
SMTP_Server.Credentials = new System.Net.NetworkCredential(userName, password);
// Who its from
SMS.From = SMS_From;
// Who its going out to
SMS.To = SMS_To; // (areacode+prefix+suffix) or email@example.com
// Subject of SMS
SMS.Subject = SMS_Subject;
// Message/Body to SMS
SMS.Body = SMS_Body;
// SMTP Port
SMTP_Server.Port = SMTP_Port;
// SSL Enable
SMTP_Server.EnableSsl = true OR false;
// SMS Sent
// SMS Notification Sent Shown
MessageBox.Show("SMS St Successfully!");
catch (Exception ex)
MessageBox.Show("Error while trying to send SMS.\n\nError: ", ex.ToString());
In C#, Cutting out the SMS re sellers is like telling your employees to give up their carriers and switch to yours when you can't provide a reliable service. Use the generic email system, it helps and is less of a hassle. What I provided is a breakdown of what you can accomplish with the code. Its not much, so make use of it.
You could always modify the web service to batch the copy operations out to the remote terminals.
What if one terminal is offline? does the service fail,, how does it know to carry on etc. etc.
You should be building some sort of queue that pumps the file out, if it experience a problem with any given workstation it moves onto the next, it then would go round the list of failed nodes and keep doing this until they are all complete.
Maybe that's just a typo when you posted the message, but do you even have a variable named filename.pdf? What is the value of your path variable? If the actual filename is left off, then the path would exist, but you would be trying to delete a directory, not an actual file.
Of course, if it was just a typo in the message, it could be something else.
CQ de W5ALT
Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software
Because you have a backslash at the beginning, which means the search starts from the root of the drive. For example, if your web root is locally on the C: drive, then you're code is looking for C:\Files\whatever. I doubt that's what you want.
If your files root is under your web application root - not generally a good idea since people then have direct access at least for file extensions not configured with your server software (ex: IIS) - you can use ~ to resolve the path like so:
// Assumes you're running this from within an ASP.NET Page
string root = Server.MapPath("~/Files");
string path = Path.Combine(root, filename);
It's also a good idea to use Path.Combine, which works on any manage host environment (though Windows is most typical) and takes care of any trailing backslashes since double backslashes in some use cases can cause problems (referencing back to root, for example).
This posting is provided "AS IS" with no warranties, and confers no rights.
Program Manager II
Visual Studio Professional Deployment Experience Microsoft
The user could also try setting a static setting of the directory location within his application under compile options and then just specify the file name which he is trying to delete.
Try creating a setting, string string ie: string FilePath = "%USEPROFILE%.\\Desktop\\DirectoryToFile\\" (or where ever your path is located)
Then in your application just add the Filename to the path, so that way you know that your application is pointing to the location, it would be concrete. Of course however if it is still saying that the file doesnt exists, make sure you are spelling it correctly and including the applications extension(which I'm not saying you aren't) and make sure you use the Try::catch, which is vital in this situation.
String FILE_TO_DELETE = FilePath+FileName;
catch ex as exception
msgbox("Unable to delete file. Reason: ", ex);
And with the benefit of setting a static path in your program, you can change the path at anytime and save its settings easily. because as long as your code includes the "String FILE_TO_DELETE = FilePath+FileName;" That string will always change, just not your code.
Because you have a backslash at the beginning, which means the search starts
from the root of the drive. For example, if your web root is locally on the C:
drive, then you're code is looking for C:\Files\whatever. I doubt that's
what you want.
If your files root is under your web application
root - not generally a good idea since people then have direct access at least
for file extensions not configured with your server software (ex: IIS) - you can
use ~ to resolve the path like so:
<SPAN class=code-comment>//</SPAN><SPAN class=code-comment> Assumes you're running this from within an ASP.NET Page
</SPAN>string root = Server.MapPath(<SPAN class=code-string>"</SPAN><SPAN class=code-string>~/Files"</SPAN>);
string path = Path.Combine(root, filename);
<SPAN class=code-keyword>if</SPAN> (File.Exists(path))
It's also a good idea to use Path.Combine, which works on any
manage host environment (though Windows is most typical) and takes care of any
trailing backslashes since double backslashes in some use cases can cause
problems (referencing back to root, for example).
I have written a 2 page program. The first page connects to a remote database so that queries can be run from the second page. Once the connection is established, that second page is navigated to using a button that calls the ShowDialog command. On the second page, I construct a query from an assortment of listview boxes and send the results to a DataGridView. So far so good....everything works to this point. Now, I have a rich text box that shows the final SQL statement that was used to create the GridView. I want to be able to modify the command manually and run it again to get new results without leaving this page...seems simple enough...however, when I try to run the command the second time using a different run button, the first page reappears when the code is completed. I stepped through it and found that the program is sending me back to the first page and stopping in the button code that called the ShowDialog command; and then I am stuck there. I do not know why I am being forced to leave the second page and why the code doesn't simply run and put the new information into the DataGrid. Please tell me where I am going wrong.....Thank you in advance....Pat
Last Visit: 31-Dec-99 18:00 Last Update: 23-Jun-21 15:08