|
Well, seems like your rewriting is not correct. The IIS writes every request (with URL) to a log, check this log to see the URL which causes the error.
Did you implemented the UrlRewriter?
|
|
|
|
|
Unknown Ajanabi wrote: no knowledge in .net
Wow - interesting sig.
Why do you need a dll to do URL rewriting ? Why not write your own code ? Did you read the docs that come with the dll, or ask in a forum dedicated to people who use this dll ?
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, I have populated a dropdownlist using javascript.After that whenever I post the page using any button or anything I get the following error :
Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
Please give me a solution to this problem.
CC26
|
|
|
|
|
set: EnableEventValidation="false"
this will solve your problem
|
|
|
|
|
will it affect any other control's event?
CC26
|
|
|
|
|
|
Hi All ,
I want to store the array of string into the cookies and retrieve the value from cookies please can any one help me to find out the solution of this.
Thanks in advance.
Amit patel
|
|
|
|
|
If you want to know how to do this. Here [^]is the example with code samples.
You can not save the array as it is. Instead convert in into a some type of sepertated string and save.
Do the reverse while reading it back from the cookie.
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.
|
|
|
|
|
can u give me the example of this in C#.
|
|
|
|
|
Good Morning All
I have the Following code that sends an e-mail, let me first post the markup and the code behind. The following is the markup of my page
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
To <asp:TextBox ID="txtto" runat="server" Width="325px"></asp:TextBox><br />
<br />
From <asp:TextBox ID="txtFrom" runat="server" Width="326px"></asp:TextBox><br />
<br />
CC: <asp:TextBox ID="txtcc" runat="server" Width="326px"></asp:TextBox><br />
<br />
Subject:
<asp:TextBox ID="txtsubject" runat="server" Width="326px"></asp:TextBox><br />
Body :<br />
<asp:TextBox ID="txtbody" runat="server" Height="86px" Width="314px"></asp:TextBox><br />
<br />
Port:
<asp:TextBox ID="txtport" runat="server" Width="127px"></asp:TextBox><br />
<br />
Host
<asp:TextBox ID="txthost" runat="server" Width="127px"></asp:TextBox><br />
<br />
<asp:Button ID="btnSend" runat="server"
OnClick="btnSend_Click" Text="Send" />
<asp:Button ID="btnCancel" runat="server" Text="Cancel" /><br />
<br />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label></div>
</form>
</body>
</html>
and i have a Function that sends the e-mail like this
private static string SendEmail(String from, string to, string cc,int port, string subject, string message,String Host)
{
System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage();
mail.From = new System.Net.Mail.MailAddress(from,"Test E-mail");
mail.Subject = subject;
mail.Body = message;
mail.IsBodyHtml = false;
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient();
smtp.Port = port;
smtp.Host = Host;
smtp.Credentials = new System.Net.NetworkCredential("administrator", "skskssk");
try
{
smtp.Send(mail);
return "Mail sent successfully!";
}
catch (Exception ex)
{
Exception ex2 = ex;
string errorMessage = string.Empty;
while (ex2 != null)
{
errorMessage += ex2.ToString();
ex2 = ex2.InnerException;
}
return errorMessage;
}
}
and in my button send we have the following
protected void btnSend_Click(object sender, EventArgs e)
{
Label1.Text = SendEmail(txtFrom.Text, txtto.Text, txtcc.Text, Convert.ToInt32(txtport.Text), txtsubject.Text,txtbody.Text,txthost.Text);
}
I have entered the Following in the Required Fields when i test the application
To: Vuyiswa@its.co.za
From:Vuyiswa@its.co.za
CC:vuyiswamb@gmail.com
Subject: This is the Test for the mail in o!booking System
BodyIf you Receive this e-mail Please confirm the receipt of this e-mail
Port : 25
Host: mailserver.Vuyiswa.local
When i run my Application and clicking on the send button , i get the Following Error
System.InvalidOperationException: A recipient must be specified. at System.Net.Mail.SmtpClient.Send(MailMessage message) at _Default.SendEmail(String from, String to, String cc, Int32 port, String subject, String message, String Host) in c:\Vuyiswa\Email_test\Default.aspx.cs:line 51
Thanks
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi
Vuyiswa Maseko wrote: System.InvalidOperationException: A recipient must be specified
As suggested by error and looking at your code i found that you have not add the recipient whom you want to send the mail.I think you miss that
Just Add
mail.To = new System.Net.Mail.MailAddress(to,"Test E-mail");
himanshu
|
|
|
|
|
Thanks a lot for reminding me that part. i have added it and i get a new Error
System.Net.Mail.SmtpException: Syntax error, command unrecognized. The server response was: Microsoft Exchange Server 2003 POP3 server version 6.5.7638.1 (Mailserver.its.local) ready. at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port) at System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) at System.Net.Mail.SmtpClient.GetConnection() at System.Net.Mail.SmtpClient.Send(MailMessage message) at _Default.SendEmail(String from, String to, String cc, Int32 port, String subject, String message, String Host) in c:\Vuyiswa\Email_test\Default.aspx.cs:line 53
Thanks
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Sounds like your mail server needs configuring.
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
|
|
|
|
|
Am Currently using my companies mail server to test. and doing Configuration to suite me will not be a good idea. can i use my Dev machine to test this. i have enabled relying on my System and i see there is my IP.
Thanks
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Why not use your own mail server, from your ISP, to test ? Or just tell your boss, I need a proper mail server to test this code.
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
|
|
|
|
|
Good Morning Christian
i came across this code
protected void Button1_Click(object sender, EventArgs e)
{
MailMessage mm = new MailMessage();
SmtpClient smtp = new SmtpClient();
mm.From = new MailAddress("Vuyiswa@its.co.za");
mm.To.Add(new MailAddress("Vuyiswa@its.co.za"));
mm.To.Add(new MailAddress("RDG@its.co.za"));
mm.Subject = "Hello";
mm.Body = "<p>This is the E-mail Test for !Booking System</p>";
mm.IsBodyHtml = true;
smtp.Host = "smtp.gmail.com";
smtp.EnableSsl = true;
System.Net.NetworkCredential NetworkCred = new System.Net.NetworkCredential();
NetworkCred.UserName = "vuyiswamb@gmail.com";
NetworkCred.Password = "secret";
smtp.UseDefaultCredentials = true;
smtp.Credentials = NetworkCred;
smtp.Port = 587;
smtp.Send(mm);
}
This code works in Gmail, i will contact the Server Administrator to tell me exactly what port and credetials do i need to use, because i get Port errors.
Thanks for your help
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi I am populating a dropdownlist using javascript.My code is given below.the problem is that my code works properly in Mozila,Opera.but fails to work in IE.
function popDDL()
{
var ddl=document.getElementById('<%= DropDownList1.ClientID%>');
for(var i=0;i<10;i++)
{
ddl.options[ddl.options.length]=new Option("item"+i,"item"+i);
}
}
It says object doesn't support this property or method
CC26
modified on Friday, June 19, 2009 5:31 AM
|
|
|
|
|
Hi
I have just copy and paste your function in my end and it works perfectly fine.
I think problem is somewhere else.Which version of IE you are using?
himanshu
|
|
|
|
|
thank u himangshu 4 ur reply.but i've solved the problem in other way.
CC26
|
|
|
|
|
I have checklistbox for all types of sub-categories
But I want to seprate sub-categories as per the category in checklistbox.
how can i do this?
modified on Friday, June 19, 2009 5:10 AM
modified on Friday, June 19, 2009 6:10 AM
|
|
|
|
|
TREEVIEW!
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
thanx
but can u explain me more
|
|
|
|
|
|
hi sir
how can we bind a template field with another template field value.
sir i mean to say actually my detail column of gridview contain expand/collpse sign.it should be visible when my status column contain value "S" and "A" and for remaining like "No Change" and "New Edition" there should not be expand/collapse sign .
please help me
|
|
|
|
|
Your best way of doing this is to make your databound value be passed into a code behind method, which would then parse it and return the result to show or hide the sign.
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
|
|
|
|