15,881,173 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Mukund Thakker (Top 78 by date)
Mukund Thakker
10-Jun-19 4:03am
View
I want to provide functionality of login into application with multiple domain Active Directory.
I am getting below error when I try to login (passing domain name, username, password) with domain which is not in default DNS,
Exception :The server is not operational.
Stack : at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
at System.DirectoryServices.DirectoryEntry.Bind()
at System.DirectoryServices.DirectoryEntry.get_NativeObject()
So I think domain is not found or may be it is not resolved to mapped IP address.
Mukund Thakker
7-Jun-19 10:04am
View
Dear David,
How do I pass domain server IP along with my domain name?
Mukund Thakker
8-Apr-14 5:30am
View
Can you post your HTML and code.
Mukund Thakker
5-Apr-14 3:12am
View
Please confirm your GoogleAppID and SENDER_ID
string GoogleAppID = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
var SENDER_ID = "9999999999";
Mukund Thakker
6-Dec-13 8:51am
View
what functionality of twitter you want to integrate?
Mukund Thakker
23-Oct-13 5:43am
View
int iMinAircraftImgWidth = 500;
int iMinAircraftImgHeight = 372;
ResizeImage(imagename, "imagepath", "imagepath", iMinAircraftImgWidth, iMinAircraftImgHeight, strNewFileName);
Mukund Thakker
20-Feb-13 4:22am
View
The remote server returned an error: (503) Server Unavailable.
Mukund Thakker
14-Feb-13 23:41pm
View
You can pass multiple email by comma separated string.
Mukund Thakker
22-Jan-13 1:59am
View
you can add code to send email in your website home page, page_load, if you are sure that home page would be visited everyday.
Mukund Thakker
22-Jan-13 0:26am
View
Please check following url,
http://www.dotnetfunda.com/forums/thread8099-error-in-window-service-while-starting.aspx
http://www.google.com/#hl=en&tbo=d&site=&source=hp&q=Service+cannot+be+started.+System.ArgumentException:+Source+property+was+not+set+before+writing+to+the+event+log.+at+System.Diagnostics.EventLog.WriteEntry%28String+message%2C+EventLogEntryType+type%2C+Int32+eventID%2C+Int16+category&oq=Service+cannot+be+started.+System.ArgumentException:+Source+property+was+not+set+before+writing+to+the+event+log.+at+System.Diagnostics.EventLog.WriteEntry%28String+message%2C+EventLogEntryType+type%2C+Int32+eventID%2C+Int16+category&gs_l=hp.12...2789.2789.0.4290.1.1.0.0.0.0.0.0..0.0.les%3B..0.0...1c.1.d6zqYLsSW_0&bav=on.2,or.r_gc.r_pw.&bvm=bv.41248874,d.cGE&fp=24b326c37e5c7d66&biw=1467&bih=664
Mukund Thakker
22-Jan-13 0:26am
View
Please check following url,
http://www.dotnetfunda.com/forums/thread8099-error-in-window-service-while-starting.aspx
http://www.google.com/#hl=en&tbo=d&site=&source=hp&q=Service+cannot+be+started.+System.ArgumentException:+Source+property+was+not+set+before+writing+to+the+event+log.+at+System.Diagnostics.EventLog.WriteEntry%28String+message%2C+EventLogEntryType+type%2C+Int32+eventID%2C+Int16+category&oq=Service+cannot+be+started.+System.ArgumentException:+Source+property+was+not+set+before+writing+to+the+event+log.+at+System.Diagnostics.EventLog.WriteEntry%28String+message%2C+EventLogEntryType+type%2C+Int32+eventID%2C+Int16+category&gs_l=hp.12...2789.2789.0.4290.1.1.0.0.0.0.0.0..0.0.les%3B..0.0...1c.1.d6zqYLsSW_0&bav=on.2,or.r_gc.r_pw.&bvm=bv.41248874,d.cGE&fp=24b326c37e5c7d66&biw=1467&bih=664
Mukund Thakker
22-Jan-13 0:23am
View
Please check below url,
http://www.google.com/#hl=en&tbo=d&site=&source=hp&q=Service+cannot+be+started.+System.ArgumentException:+Source+property+was+not+set+before+writing+to+the+event+log.+at+System.Diagnostics.EventLog.WriteEntry%28String+message%2C+EventLogEntryType+type%2C+Int32+eventID%2C+Int16+category&oq=Service+cannot+be+started.+System.ArgumentException:+Source+property+was+not+set+before+writing+to+the+event+log.+at+System.Diagnostics.EventLog.WriteEntry%28String+message%2C+EventLogEntryType+type%2C+Int32+eventID%2C+Int16+category&gs_l=hp.12...2789.2789.0.4290.1.1.0.0.0.0.0.0..0.0.les%3B..0.0...1c.1.d6zqYLsSW_0&bav=on.2,or.r_gc.r_pw.&bvm=bv.41248874,d.cGE&fp=24b326c37e5c7d66&biw=1467&bih=664
http://www.dotnetfunda.com/forums/thread8099-error-in-window-service-while-starting.aspx
Mukund Thakker
19-Jan-13 6:08am
View
where do i get information about its status code?
I am getting "-1" in status.
Mukund Thakker
18-Jan-13 4:13am
View
You have to create setup file, and then run setup file. after that from windows services find installed service and start service by right clicking on it.
-----------------------------------------------------------------------
Do not forget to mark as answer if it really helps you...
Mukund Thakker
17-Jan-13 23:35pm
View
It should be
new System.Timers.ElapsedEventHandler(objTimer_Elapsed);
Mukund Thakker
17-Jan-13 1:35am
View
Everything is mentioned in following link,
http://www.cjvandyk.com/blog/Articles/How-do-I--Create-a-Windows-Service-application-using-Visual-Studio-2010.aspx
please go through it once again.
Mukund Thakker
16-Jan-13 8:29am
View
In the Service1, you can drag EventLog from Toolbox.
and for objtimer, please include following namespace.
using System.Timers;
Mukund Thakker
14-Jan-13 23:54pm
View
According to me, no it is not...
Mukund Thakker
11-Jan-13 8:33am
View
what is not working?
Mukund Thakker
11-Jan-13 8:30am
View
DayInterval would always be 1 as we need to increment one by one.
Mukund Thakker
11-Jan-13 8:09am
View
Write following code to get all the dates between 2 dates
while (StartDate.AddDays(DayInterval) <= EndDate)
{
StartDate = StartDate.AddDays(DayInterval);
Response.Write(StartDate.ToString());
}
Mukund Thakker
11-Jan-13 7:59am
View
You are having all the dates between 2 dates is in StartDate variable.
Mukund Thakker
3-Jan-13 8:13am
View
Will this code work in web application?
Mukund Thakker
28-Dec-12 1:33am
View
This will work in asp.net 2.0. There is no new feature of 4.5
Mukund Thakker
24-Dec-12 5:12am
View
Reason for my vote of 1 \n Not working. Gives same country result for all ips.
Mukund Thakker
18-Oct-12 1:00am
View
You can write directly
Response.Redirect("login.aspx?mode=logout");
Mukund Thakker
9-Oct-12 9:46am
View
Reason for my vote of 2
Not working in IE9
Mukund Thakker
20-Aug-12 3:04am
View
gives ::1 in local and different ip on hosting server.
Mukund Thakker
20-Aug-12 3:02am
View
this gives ip address of hosted server.
Mukund Thakker
20-Aug-12 2:49am
View
Reason for my vote of 1
Nothing informative.
Mukund Thakker
7-Jul-12 8:25am
View
If you have dedicated server, you can directly install the setup file, similar to other setup program you install.
Mukund Thakker
7-Jul-12 8:21am
View
Which hosting server do u have?
Shared or dedicated?
Mukund Thakker
7-Jul-12 6:54am
View
You can install windows service on hosting server.
Mukund Thakker
7-Jul-12 5:16am
View
Yes, add service in same project.
http://msdn.microsoft.com/en-us/library/zt39148a.aspx
Check above url for step by step guide in creating windows service.
And add send-future-email.aspx page in your website.
Mukund Thakker
7-Jul-12 5:14am
View
Do not add any button in the page. Just create send-future-email.aspx and in page_load add following code,
cn.Open();
cm.Connection = cn;
cm.Parameters.Clear();
cm.CommandType = CommandType.StoredProcedure; cm.CommandText = "getbirthdaydate"; SqlDataAdapter da = new SqlDataAdapter(cm); da.Fill(ds); foreach (System.Data.DataRow row in ds.Tables[0].Rows) { MailMessage msg = new MailMessage(); msg.From = new MailAddress("username"); msg.To.Add(ds.Tables[0].Rows[i]["Email"].ToString()); //msg.Bcc.Add(new MailAddress("bcc address")); //msg.CC.Add(new MailAddress("cc address")); msg.Subject = "subject of mail"; msg.Body = "message you want to send with email"; SmtpClient smtp = new SmtpClient("smtp.gmail.com", 587); smtp.EnableSsl = true; smtp.Credentials = new NetworkCredential("username", "password"); cn.Close(); smtp.Send(msg); i++; }
Which you have added in button1_click event.
Mukund Thakker
7-Jul-12 5:05am
View
Do not forgot to mark as answer if it helps you.
Mukund Thakker
7-Jul-12 4:35am
View
Please add following code in service1.cs file
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Timers;
using System.Net;
using System.IO;
namespace EmailSendingService
{
public partial class Service1 : ServiceBase
{
Timer objTimer = new Timer();
public Service1()
{
InitializeComponent();
//CHECK IF LOG FILE EXISTS ELSE CREATE NEW
if (!System.Diagnostics.EventLog.SourceExists("EmailSendingServiceLogSource"))
{
System.Diagnostics.EventLog.CreateEventSource("EmailSendingServiceLogSource", "EmailSendingServiceLog");
}
eventLog1.Source = "EmailSendingServiceLogSource";
eventLog1.Log = "EmailSendingServiceLog";
}
protected override void OnStart(string[] args)
{
try
{
int iHourIn24HourFormat = Convert.ToInt32(DateTime.Now.ToString("HH"));
int iCurrentMinutes = DateTime.Now.Minute;
int iCurrentSecond = DateTime.Now.Second;
int iFirstIntervalGapInHours = 24 - iHourIn24HourFormat;
eventLog1.WriteEntry("EmailSending Service Started ---->" + DateTime.Now.ToString());
objTimer.Interval = (1000 * 60 * 60 * iFirstIntervalGapInHours) + (1000 * 60 * 60 * 2) - (1000 * 60 * iCurrentMinutes) - (1000 * iCurrentSecond); // at 2:00 AM
eventLog1.WriteEntry("Interval -> " + objTimer.Interval.ToString());
objTimer.Enabled = true;
objTimer.Elapsed += new ElapsedEventHandler(objTimer_Elapsed);
objTimer.Start();
}
catch (Exception ex)
{
eventLog1.WriteEntry("Error: " + ex.Message);
}
}
protected override void OnStop()
{
}
void objTimer_Elapsed(object sender, ElapsedEventArgs e)
{
try
{
eventLog1.WriteEntry("Timer Elapsed ---->" + DateTime.Now.ToString());
objTimer.Interval = 1000 * 60 * 60 * 24; //set interval for every 1 day
ContinueProcess();
}
catch (Exception ex)
{
eventLog1.WriteEntry("Error: " + ex.Message);
}
}
private void ContinueProcess()
{
try
{
HttpWebRequest objHttpWebRequest = (HttpWebRequest)WebRequest.Create("http://www.website.com/send-future-email.aspx");
objHttpWebRequest.Method = "Get";
objHttpWebRequest.ContentLength = 0;
HttpWebResponse objHttpWebResponse = (HttpWebResponse)objHttpWebRequest.GetResponse();
Stream objResponseStream = objHttpWebResponse.GetResponseStream();
}
catch (Exception ex)
{
eventLog1.WriteEntry("Error: " + ex.Message);
}
}
}
}
Please add code inside Button1_Click event in send-future-email.aspx in page_load.
When you setup the service, it will call the page every day and it will send email to all user who is having birth day today.
Mukund Thakker
7-Jul-12 3:10am
View
If you are storing future date, than in windows service you can check like
select * from table where future_date=getdate
and send email to all the recipient.
If still you have confusion, share your code snippet.I will provide you full solution.
Mukund Thakker
7-Jul-12 2:36am
View
If you needs to send future email, than store the information and date in database and check every day. if both date match than send email to recipient.
Mukund Thakker
22-Jun-12 9:36am
View
This is nice one.
Mukund Thakker
24-May-12 4:48am
View
Do you want to send email to multiple e-mail id or from multiple Email Ids?
Mukund Thakker
17-May-12 9:17am
View
Which payment gateway you wants to integrate?
Mukund Thakker
17-May-12 7:12am
View
Please post your code snippet to understand your question.
Mukund Thakker
3-May-12 5:02am
View
THIS IS NOT BEEN ACCEPTED.
Mukund Thakker
2-May-12 0:42am
View
declare @encrypt varbinary(200)
select @encrypt = EncryptByPassPhrase('key', 'abc' )
select @encrypt
If you encrypt with following script it gives different output every time. if I apply the same it gives NULL result
Mukund Thakker
30-Mar-12 7:44am
View
This is what posted by Uday Singh. Please check my comments in Solution1
Mukund Thakker
30-Mar-12 2:06am
View
I have already checked this, gives following error,
Mailbox name not allowed. The server response was: Sorry, that domain isn't in my list of allowed rcpthosts.
Mukund Thakker
28-Mar-12 2:09am
View
Thank you
Mukund Thakker
9-Mar-12 7:19am
View
please list your parent, child table definition so that I can provide your proper solution. In general case the above solution will definitely works.
Mukund Thakker
7-Mar-12 6:09am
View
Thanks for your advice, but that was not my question.
Mukund Thakker
2-Mar-12 2:15am
View
If you open the same page in new tab, it will retain the session
Mukund Thakker
23-Feb-12 6:17am
View
Deleted
HttpContext.Current.RewritePath("maintenance.aspx");
gives following error
The virtual path '/maintenance.aspx' maps to another application, which is not allowed.
Mukund Thakker
22-Feb-12 23:46pm
View
Deleted
Reason for my vote of 1
This will not work in url rewrite path.
Mukund Thakker
22-Feb-12 23:44pm
View
Deleted
You can use the full url, if you have url rewrite.
<link href="http://localhost/website/CSS/Main.css" rel="stylesheet" type="text/css" />
Mukund Thakker
22-Feb-12 8:05am
View
Gives following error
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request failed.
Mukund Thakker
17-Feb-12 2:09am
View
http://www.websevicex.net is not working anymore. Do you have any other solutions?
Mukund Thakker
17-Feb-12 1:35am
View
please include the css which I have added in head section.
Mukund Thakker
16-Feb-12 1:33am
View
Doesn't work, gives following error
Exception caught in Main()
---------------------------------------
Could not load file or assembly 'Microsoft.SqlServer.ConnectionInfo, Version=9.0
.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependen
cies. The system cannot find the file specified.
System.IO.FileNotFoundException
at Elsasoft.ScriptDb.DatabaseScripter.GenerateScript(String connStr, String o
utputDirectory, Boolean scriptData, Boolean verbose, Boolean scriptProperties)
at Elsasoft.ScriptDb.Program.Main(String[] args)
---------------------------------------
Mukund Thakker
30-Jan-12 0:40am
View
Just write the following code in your webpage. It will provide your requested information.
//You can get the Geolocation infoamation here
string ipAddress = HttpContext.Current.Request.UserHostAddress;
IPDetails ipDetails=new IPDetails ();
IPLocator ipLocater = ipDetails.GetData(ipAddress);
Response.Write(ipLocater.CountryName);
Mukund Thakker
30-Jan-12 0:36am
View
This doesn't work. Gives same error while opening file.
Mukund Thakker
28-Jan-12 2:29am
View
This doesn't work. Gives same error while opening file.
Mukund Thakker
23-Jan-12 1:33am
View
I am finding solution to change my url to escape fragment url like,
http://www.seomoz.org/blog/how-to-allow-google-to-crawl-ajax-content
Mukund Thakker
17-Jan-12 5:45am
View
can you please add code snipet?
Mukund Thakker
3-Jan-12 5:14am
View
Deleted
Thanks Kelvin
Mukund Thakker
7-Dec-11 4:33am
View
Deleted
Reason for my vote of 1
Doesn't work for me!
Mukund Thakker
6-Dec-11 23:41pm
View
Deleted
It is a well managed code.What kind of documentation you needed?
Mukund Thakker
2-Dec-11 5:01am
View
It is not gmail account. I have setup google apps for my domain.
Mukund Thakker
1-Dec-11 23:40pm
View
Deleted
set following values
UseDefaultCredentials="false"
EnableSsl="True"
and don't mention anything for port
Mukund Thakker
1-Dec-11 6:31am
View
User would not be login again, if he has not logged out in previous login.
Mukund Thakker
21-Nov-11 7:47am
View
doesn't work
Mukund Thakker
18-Nov-11 10:56am
View
You can replace clsCommon with web.config SMTPServer value or
Mail.Host = "Hostname";
Mukund Thakker
18-Nov-11 1:37am
View
Please provide code snippet and error details.
Mukund Thakker
15-Nov-11 6:24am
View
Deleted
Reason for my vote of 2
This gives following error. exePath must be specified when not running inside a stand alone exe.
Mukund Thakker
15-Nov-11 6:22am
View
Deleted
System.Configuration.Configuration config = System.Configuration.ConfigurationManager.OpenExeConfiguration(System.Configuration.ConfigurationUserLevel.None);
This gives following error.
exePath must be specified when not running inside a stand alone exe.
Mukund Thakker
5-Nov-11 9:15am
View
Thanks mike for enhancing my comments.
Mukund Thakker
21-Oct-11 2:24am
View
This is the best solution so far...
Mukund Thakker
18-Oct-11 0:55am
View
Deleted
Thanks Mike
Mukund Thakker
27-Sep-11 0:52am
View
Deleted
This is more generic way to handle controls in a page.
Show More