|
no not just disk backup - what if your box has been hacked and you don't know what it is? If I can say even restore snapshot on say monthly basis - I can have the peace of mind my system is *clean*.
I'm considering this for a site with low-medium traffic - if speed is concern then I can buy faster hardware to compensate.
dev
|
|
|
|
|
devvvy wrote: no not just disk backup - what if your box has been hacked and you don't know what it is? If I can say even restore snapshot on say monthly basis - I can have the peace of mind my system is *clean*.
You can backup your entire system with tools like Ghost, on a regular basis, and you can restore the hard drive to that state, just like a snapshot.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Hi all,
I developed workflow application in .NET with framework 3.5,
I Put 2 interactivity in workflow as A1 and A2,
A1 is connected to A2, And A2 is last activity,
But when I run application first time it gives me following error,
"Value cannot be null. Parameter name: workflowType"
Please help me urgent,
Thanks in Advanced,
Bhushan
|
|
|
|
|
Bhushan M Jsohi wrote: But when I run application first time it gives me following error,
"Value cannot be null. Parameter name: workflowType"
Its very difficult to say the reason with out your code. You are passing any parameter named workflowType which is passed as a null. So verify your code.
BTW : This is not related with ASP.NET, you need to post it over here WPF/WCF/WWF Forums
|
|
|
|
|
we completed the registration page in our project and whatever the details we have given in that registration page they are also going to update in the backend also. but whatever the username and password we have given in the registration page is not accepted by the login page.while giving the username and password it is showing the error like below
object reference is not set to an instance of an object
code i have written for registration page
bal data = new bal();
data.FirstName = Text_FirstName.Text.Trim();
data.LastName = Text_LastName.Text.Trim();
data.Gender = Text_Gender.Text.Trim();
data.EmailId = Text_EmailId.Text.Trim();
data.UserName = Text_UserName.Text.Trim();
data.Password = Text_Password.Text.Trim();
data.ConfirmPassword = Text_ConfirmPassword.Text.Trim();
data.Country = ddlCountry.SelectedItem.ToString();
data.State = Text_state.Text.Trim();
data.City = Text_City.Text.Trim();
data.Dob = DateTime.Parse(Dob.Value);
data.PhoneNumber = Text_PhoneNumber.Text.Trim();
data.MobileNumber = Text_MobileNumber.Text.Trim();
data.Currentlocation = Text_Currentlocation.Text.Trim();
data.PreferedJobLocations = Text_Location.Text.Trim();
data.JobCategory = ddljobcategory.SelectedItem.ToString();
data.KeySkills = Text_KeySkills.Text.Trim();
data.HighestQualificationheld = ddlhqh.SelectedItem.ToString();
data.SpecialisationMajor = ddlspecialisation.SelectedItem.ToString();
data.Institute = ddlinstitute.SelectedItem.ToString();
data.YearPassedOut = ddlyrpassedout.SelectedItem.ToString();
try
{
int res = data.insertreg();
if (res > 0)
{
Page.RegisterStartupScript("SS", "<script> alert('Completed Successfully');</script>");
}
else
{
lblmessage.Text = "registration failed";
}
}
catch
{
}
i have used 3 tier architecture
the code in the dal layer for registration page
static SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["conn"].ToString());
internal static int insertreg(bal bal)
{
//throw new NotImplementedException();
con.Close();
con.Open();
SqlCommand cmd = new SqlCommand("sp_reg", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@FirstName", bal.FirstName);
cmd.Parameters.AddWithValue("@LastName", bal.LastName);
cmd.Parameters.AddWithValue("@Gender", bal.Gender);
cmd.Parameters.AddWithValue("@EmailId", bal.EmailId);
cmd.Parameters.AddWithValue("@UserName", bal.UserName);
cmd.Parameters.AddWithValue("@Password", bal.Password);
cmd.Parameters.AddWithValue("@ConfirmPassword", bal.ConfirmPassword);
cmd.Parameters.AddWithValue("@Country", bal.Country);
cmd.Parameters.AddWithValue("@State", bal.State);
cmd.Parameters.AddWithValue("@City", bal.City);
cmd.Parameters.AddWithValue("@Dob", bal.Dob);
cmd.Parameters.AddWithValue("@PhoneNumber", bal.PhoneNumber);
cmd.Parameters.AddWithValue("@MobileNumber", bal.MobileNumber);
cmd.Parameters.AddWithValue("@Currentlocation", bal.Currentlocation);
cmd.Parameters.AddWithValue("@PreferedJobLocations", bal.Currentlocation);
cmd.Parameters.AddWithValue("@JobCategory", bal.JobCategory);
cmd.Parameters.AddWithValue("@KeySkills", bal.KeySkills);
cmd.Parameters.AddWithValue("@HighestQualificationheld", bal.HighestQualificationheld);
cmd.Parameters.AddWithValue("@SpecialisationMajor", bal.SpecialisationMajor);
cmd.Parameters.AddWithValue("@Institute", bal.Institute);
cmd.Parameters.AddWithValue("@YearPassedOut", bal.YearPassedOut);
cmd.Parameters.AddWithValue("@type", "i");
try
{
return cmd.ExecuteNonQuery();
}
catch
{
throw;
}
finally
{
con.Close();
cmd.Dispose();
}
}
}
code i have written for login page
protected void Button1_Click(object sender, EventArgs e)
{
loginbal data = new loginbal();
data.userid = txt_userid.Text.Trim();
data.password = txt_password.Text.Trim();
DataSet ds = new DataSet();
ds = data.getuserID();
}
}
the code in the dal layer for registration page
static SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["con"].ToString());
internal static DataSet GetUserID(loginbal loginbal)
{
//throw new NotImplementedException();
con.Close();
con.Open();
SqlCommand cmd = new SqlCommand("sp_login", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@userid",loginbal.userid);
cmd.Parameters.AddWithValue("@password",loginbal.password);
cmd.Parameters.AddWithValue("@type","s");
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
try
{
return ds;
}
catch
{
throw;
}
finally
{
cmd.Dispose();
con.Close();
}
}
}
|
|
|
|
|
sritha wrote: object reference is not set to an instance of an object
And what line is that error occurring?
sritha wrote: catch
{
}
This is bad practice - Don't do it.
sritha wrote: try
{
return ds;
}
catch
{
throw;
}
finally
{
cmd.Dispose();
con.Close();
}
WTF?
Exactly what exception will return ds throw? Surely the try block should go around everything, not just the last line.
You are not doing anything in the catch block other than rethrowing the exception. Remove the catch block it is not required.
Your connection is stored elsewhere. .NET does connection pooling, don't keep connection objects around, create a new one each time.
Man who stand on hill with mouth open wait long time for roast duck to drop in
|
|
|
|
|
Hi,
Have you tried to debug it by setting breakpoints and stepping into the execution lines? Debug and you will definitely find the issue.
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
sritha wrote: object reference is not set to an instance of an object
Did you debug your code? Where are you getting the error ? Does that object initialize?
|
|
|
|
|
Hi There,
I am working on ERP products using Asp.Net 2.0 and I am going to switch on 3.5 I know
basic queries of linq.But I want to know weather it is possible to write complex queries which inclueds caculation or large amount of data manupulation using linq.
Thanks.
|
|
|
|
|
There is a seperate forum on LINQ[^]
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.
|
|
|
|
|
Hi All,
I need to create pdf file using iTextSharp. I can write simple text in my pdf file. But How can I add html content in pdf file.
I used string variable to hold html content. But when I use that variable my pdf file content not showing html format.
my Code given below :
private void createPDF()
{
//string newFile = @"N:\.NET\New Document.pdf";
string strContent = "";
StringWriter sw = new StringWriter();
string newFile = Server.MapPath("1.pdf");
Document doc = new Document();
PdfWriter writer = PdfWriter.GetInstance(doc, new FileStream(newFile, FileMode.Create));
// Metadata
doc.AddCreator("PDF Printer by Joachim Tesznar");
doc.AddTitle("New PDF Document");
// Add content
doc.Open();
sw.Write(GetMailBodyOrderDetails().ToString());
doc.Add(new Paragraph(sw.ToString()));
doc.Close();
}
#region string GetMailBodyOrderDetails()
public string GetMailBodyOrderDetails()
{
StreamReader StmRdr1 = null;
FileInfo fi1 = null;
string strFileName1 = Request.PhysicalApplicationPath + "Registration.html";
fi1 = new FileInfo(strFileName1);
if (fi1.Exists)
{
StmRdr1 = File.OpenText(strFileName1);
StreamReaderStrLine1 = StmRdr1.ReadToEnd();
// StreamReaderStrLine1 = StreamReaderStrLine1.Replace("<TITLE>", ListingName).Replace("<PRICE>", Price.ToString()).Replace("<DESCRIPTION>", ListingDetail).Replace("<EMAIL>", Email).Replace("<COUNTRY>", Country).Replace("<STATE>", State).Replace("<SUBURB>", City).Replace("<TOPADS>", "No");
StreamReaderStrLine1 = StreamReaderStrLine1.Replace("\r\n", "");
StreamReaderStrLine1 = StreamReaderStrLine1.Replace("<!--body", ".body").Replace("}-->", "}").Replace("\t", "");
}
return StreamReaderStrLine1;
}
#endregion
please reply
Thanks
Raj
|
|
|
|
|
Hi to all,
How to read UNREAD mails from mail server through .netcode???
|
|
|
|
|
Is your application going to read emails from Exchange Server?
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
s I reading mails from exchange server.
|
|
|
|
|
|
nkmkrishna wrote: s I reading mails from exchange server.
Which Exchange Server are you using ? If you are using Exchange Server 2007, Microsoft provided a web Services for that (Exchange Web Services [ EWS ] ), using that you can read mail from Exchange server.
Here is some excellent article in Code project by Brij,
Check the Exchange Server Section
|
|
|
|
|
I have a quick question regarding my project. I have looked for the information on the web, but was not able to find relevant information.
We are getting Source data from two of our client in the form of Excel Sheet. These Excel sheets
Are generated using reporting services. On examining the excel sheet, I found out that the name Of the columns contain data itself, so the names are not static such as Jan 2007 Sales, Feb 2007 Sales etc etc.
And even the number of columns are not static. It depends upon the range of date selected by the user.
I wanted to know, if there is a way to import Excel sheet using Integration Services by defining the position Of column, instead of column name and I am not sure if there is a way for me to import excel with dynamic Number of columns.
Your help in this respect is highly appreciated!
Thanks,
Praveen Kumar.R
|
|
|
|
|
i want to refresh my page automatically after 5 sec.
im using java script
its working fine
but i want that this autorefreshing stops after some given time
how to do that ?
is it possible?
help me.
its urgent.
|
|
|
|
|
Use javascript setTimeout not setInterval. setTimeout will cause the page to be refreshed only once.
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
use cleartimeout() function.
|
|
|
|
|
hi
thanks for reply
can u please tell me how can i do postback after i use the cleartimeout()
|
|
|
|
|
I don't understand your question.
cleartimeout() is javascript function which will clear your refreshing function if you want to set timer again use settimeout().
If you just want to postback your page with javascript then use, __doPostBack() function.
|
|
|
|
|
naveen attri wrote: how to do that ?
is it possible?
help me.
its urgent.
Ah, the calling card of the moron. Help me, it's urgent. Google broken where you live ?
The answer is pretty common sense. You remove the script that does the auto refresh after a given number of times.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
did you try this ?
<!--The next line of code will refresh the page every 5 minutes-->
<meta http-equiv="refresh" content="300">
|
|
|
|
|
hi all,
how to show confirm alert message when the user closes the browser tab in asp.net using javascript...
Ashok
|
|
|
|