|
Christian Graus wrote: we try to help, and they never answer anyone who replies.
I know
I think in all the answers I gave to questions (which is compared to you almost nothing but hey I try ) I might have gotten an answer back like twice or so.
|
|
|
|
|
Smart people walk away from disasters, for some reason we feel attracted to them??
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
It's the same as seeing an accident on the road.
For some reason you can't resist to look.
|
|
|
|
|
Hi All,
I have to develop an application using C#. Application requirements is given below:
1.Automatically send job alerts to all the registered job seekers based on some criteria like
work experience,Skills etc.
2.There are about 9 lac registered users and will increase in future.
3.Once the application started will send email to all the users and after completing the
email sending to all users it will stop/pause for some time say 3 hours and after that
it will automatically started . This process will keep on repeating until administrator
stop the application.
4.Application will run on the same server where database is running.
Please suggest me how to develop the application so that it consume minimum resources of the server?
Should I develop an application or a windows service? Which will be the best solution?
Please give suggestion keeping in mind that server resources should be consumed minimum?
Please Help.
Thanks & Regards,
Dev
|
|
|
|
|
dev sheoran wrote: windows service
Yes
only two letters away from being an asset
|
|
|
|
|
Need to speed up my typing speed
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Mark Nischalke wrote: dev sheoran wrote:
windows service
Yes
No, I wont do that.
I'll need to keep polling for checking when to start the next batch as he wants to do this every 3 hrs.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Manas Bhardwaj wrote: I'll need to keep polling
Ever heard of a timer?
only two letters away from being an asset
|
|
|
|
|
I am new to C# and never developed a windows service.Please give any reference to the windows service which send emails. It will be help full for me.
Thanks,
Dev
|
|
|
|
|
You're asking for the source code to your project ? How about you buy some books, or use google, or even search this site for articles ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
You could create a Console Application which can be scheduled to run after every 3 hours. Admin may disable the task if he wants.
You need to come up with a logic which will get the users to whom you want send the email. This will be a stored procedure returing you the user details and probably also the email content.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
1)I don't want to run this application after every 3 hours. I want that application stop/pause for 3 hours after sending emails to all users and after that it starts automatically.
2) Its not necessary that it take same time to send emails to all users. Time to complete the process by the application may change as it depends on availability of system resources and on some others factors too.
Thanks,
|
|
|
|
|
Hi,
When trying to run a vb script on a machine, this is what it gives as error:
Can't find script engine \"VBScript\"
So to fix this I logged into the machine and did the following to install the vbscript engine:
in run window
regsvr32 vbscript
Message was that installation succeeded.
Then tried running the script on the machine again and still gives the same error as before.
Any thoughts please?
Thanks
|
|
|
|
|
How is this a C# question ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I want to store images in text form and later load them again.
I got this code to convert and image to a base64 string:
ImageConverter converter = new ImageConverter();
byte[] raw = new byte[1];
Bitmap test = new Bitmap(OFD_Open.FileName);
raw = (byte[])converter.ConvertTo(test, typeof(byte[]));
string output = Convert.ToBase64String(raw);
File.WriteAllText("image.txt", output); And this code to convert it from a string back to an image
byte[] raw = new byte[1];
Bitmap pic = new Bitmap(1, 1);
raw = Convert.FromBase64String(OFD_Open.FileName);
PictureBox box = new PictureBox();
TypeConverter tc = TypeDescriptor.GetConverter(typeof(Bitmap));
pic = (Bitmap)tc.ConvertFrom(raw); But the Convert.FromBase64String method throws an error, telling me there is an invalid character in the Base64 string.
What went wrong?
Thanks.
|
|
|
|
|
Hi,
the Convert.FromBase64String expect a base64-encoded string, which is in your case stored within a file. But you pass the name of the file. You have to pass the content of the file!
|
|
|
|
|
Megidolaon wrote: raw = Convert.FromBase64String(OFD_Open.FileName);
I think converting the filename won't help much...
If I were you I would convert the content!
From the top of my mind perhaps this will work:
Convert.FromBase64String(File.ReallAllText(OFD_Open.FileName));
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
Hi,
I have no experience with ImageConverter and have never seen any code using it. What most people do is save the image to a MemoryStream, get its byte array, call Convert.ToBase64String; then do the opposite to get it back. The advantage is the code really is very symmetrical, which is great as you want it to behave symmetrically too.
BTW: your initializations with dummy data/sizes don't make sense, just leave them out. I mean the new byte[1] and new Bitmap(1,1)
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Wow, that was really stupid.
I totally forgot to read the file content.
Thanks.
It really helps to have someone else look at your code, you sometimes overlook the most basic things.
|
|
|
|
|
I see that there are third party tools and libraries available for accessing Smart Cards through PC/SC but nothing that the .NET framework specifically provides for.
What does this mean? Did Microsoft specifically reject the PC/SC specification or have they just not gotten around to incorporating it into the .NET framework? Does C# (or the .NET framework for that matter) provide any other standard for accessing Smart Cards or is writing a wrapper for the PCSC WIN32 API the way to go? By the way, there's a nice CodeProject article for doing that available here[^].
Basically, what I'd like to know is this. How would Microsoft access Smart Cards when coding in C#?
|
|
|
|
|
how can i add C1.C1Zip namespace in my c# .net application .Actually i want to use the "C1ZStreamReader" class to zip files.
But i am using it first time ....
and getting error message as-
"can't find assembly reference"
plz suggest me how to the the assembly reference.
|
|
|
|
|
Add a reference to the dll in your application.
|
|
|
|
|
Hello,
At present I am able to execute a vbscript on a remote machine.
The way i do this is that the code creates the vbscript file on the server, runs it, returns the result and then deletes the script file from the server.
The above is done by a combination of IO.WriteAlltext and
...
process.start();
Question:
How is it possible to run the script on a remote machine whithout copying the script file on the remote server. i.e. I would like to run the vbscript from the local machine?
but pointing to the remote machine so this way I will not have to write the script file to the remote machine.
Thanks
|
|
|
|
|
I am creating a windows form and have come across this error message, i cannot find information about how to resolve it.
Has anyone seen it before or know what to do.
The variable 'resources' is either undeclared or was never assigned
dont see how it could have happened either as 'resources' is a variable created behind the form to my knowledge
|
|
|
|
|
Apparently the answer is to close down the project and open it again and it works fine.
Vs just wanted to be awkward.
|
|
|
|