|
Dimuthu Nuwan wrote: i used the table field to store Number_Of_Trys but i think it's dirty way
That's not dirty way.
Dimuthu Nuwan wrote: how can i do this using client side
Client side values will be cleared when user closes the browser. So user can enter the login details again in a new browser window.
Keep a column in database which can be used to indicate the number of tries. When login fails, increment this number. If it is more than the allowed number, say user that your account is blocked.
|
|
|
|
|
Use proper text that is related to Question in subject line.everyone knows that this ASP.Net forum
Cheers!!
Brij
|
|
|
|
|
Hi coders,
I am using .NET 3.5 framework. I'm working on a file upload project. What I want to do is give the user the ability to enter a directory name, check to see if it already exists and if not create the folder and upload the files their.
What namespaces should I be using? Am I correct in presuming the directory that will house these "user-created directories" will need to have write permissions assigned to it?
Thanks for any help in advance.
Anand Desai
Developer
Atharva Infotech
|
|
|
|
|
If(!Directory.Exists(path))
Directory.Create(path)
Ahsan Ullah
Senior Software Engineer
MCTS 2.0
|
|
|
|
|
Anand Desai wrote: Am I correct in presuming the directory that will house these "user-created directories" will need to have write permissions assigned to it?
No. The directory that you create will by default get the same permissions as the parent folder. If you have permission to create the folder, you already have write permission.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
It will be tough to maintain your application's file system if you have many directories created by users. I'd suggest keeping uploaded files in same location, and use URL rewriting which will give a feeling that the files are in specified directory.
|
|
|
|
|
Thanks Navneeth!! BTW, thats very usual thought and it did come to my mind also. but this is in-house application, so only 4-5 people will use this and also, folder creation will not be usual for them also, as every new file wont need new folder. (sorry, I cant disclose my project so wont be able to explain in detail)
Thanks though for helping and thinking for me!!!
Anand Desai
Developer
Atharva Infotech
|
|
|
|
|
Hi guys,
I would like to know about secure webservice concept...,
have to pass my datas and receive my datas with encrypted format using webservice ..,
Help me how to do that?,
Guide me
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
Try here[^]
There are thousands of examples
Bob
Ashfield Consultants Ltd
|
|
|
|
|
|
I need to move some selected data from one list box to another in a webpage without postback, using Ajax. How can I do so? I searched in the google for the code, but couldn't find anything beneficially. Could anybody please provide the source code on this? Any url or any site explaining the code?
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
i am using vs2008 in the debug menu there is no step out option.
|
|
|
|
|
I'm not sure how this relates to ASP.NET, are you saying it's only not there when you use ASP.NET ? Is it hidden, is the menu expanded ? Using the menu sucks anyhow, you should learn the shortcut keys.
Christian Graus
Driven to the arms of OSX by Vista.
"Iam doing the browsing center project in vb.net using c# coding" - this is why I don't answer questions much anymore. Oh, and Microsoft doesn't want me to.
|
|
|
|
|
i have a break point and when i am pressing F10 to step over (which is present in the debug menu)
but step out is not there in the debug menu! so if had found the problem i want to step out of the function but i can not do that i need to keep stepping over until the end of program
|
|
|
|
|
I think you managed to do a lot of typing without answering any of my questions. Step out is shift and F11, and you appear to be right, it's not in there by default. You can add it by changing the settings of visual studio, to the debug toolbar or menu.
Christian Graus
Driven to the arms of OSX by Vista.
"Iam doing the browsing center project in vb.net using c# coding" - this is why I don't answer questions much anymore. Oh, and Microsoft doesn't want me to.
|
|
|
|
|
You can right chick on the level that you want to exit to in the Call Stack and select Run To Cursor .
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi People,
I have an UpdatePanel (upCart) inside a master page that contains a label.
A child page I created from the master page has another UpdatePanel (upContent) within which I have a button that I intend to use as a trigger for upCart.
How do I accomplish this?
Here is an extract from my master page:
MASTER PAGE
<asp:scriptmanager... xmlns:asp="#unknown" />
<script runat="server" type="text/C#">
void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
if (Session["dummy"] == null)
Session["dummy"] = 1;
}
lbItem.Text = Session["dummy"].ToString() + " items";
}
</script>
<asp:contentplaceholder id="contentCart" runat="server" xmlns:asp="#unknown">
<asp:updatepanel id="upCart" runat="server" updatemode="Always" rendermode="Inline">
<contenttemplate>
<table>
<tr>
<td>
<asp:label id="lbItem" runat="server" />
</td>
</tr>
</table>
</contenttemplate>
</asp:updatepanel>
</asp:contentplaceholder>
And here is an extract from the child page
CHILD PAGE
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
ScriptManager sm1 = (ScriptManager)this.Master.FindControl("ScriptManager1");
sm1.RegisterAsyncPostBackControl(Button1);
}
protected void Button1_Click(object sender, EventArgs e)
{
if (TextBox2.Text != "")
{
Session["dummy"] = (int)Session["dummy"] + int.Parse(TextBox2.Text);
}
}
</script>
I thought that registering the Button1 with the ScriptManager on the master page would provide this functionality, but it dosen't. I even tried getting an instance of upCart from the master page using(UpdatePanel)this.Master.FindControl("upCart"), but it returns as a null.
Please help!
Live in fragments no longer. Only connect.
|
|
|
|
|
Hi,
I have a gridview control inside one of the asp:wizard control steps.
How could I force the gridview or its ObjectDatasource to only perform its updating and inserting methods when the Wizard Finish button is clicked?
I am too late but i will never give up
|
|
|
|
|
Hi,
I'm working on a solution to boost Log4Net performance in our ASP.Net web applications. I have found many posts about using Log4Net's "AsyncAppender". I made a sample web application to test this solution, but my test results shows that the log methods take double time to execute when I use the AsyncAppender.
Log4Net.config:
<br />
<appender name="AsyncAppender" <br />
type="SampleWebApplication.Appender.AsyncAppender, SampleWebApplication"><br />
<br />
<appender-ref ref="RollingLogFileAppender"/><br />
<!-- <appender-ref ref="AsyncAppender"/> --><br />
</appender><br />
<br />
<root><br />
<level value="ALL"/><br />
<appender-ref ref="RollingLogFileAppender"/><br />
</root><br />
<br />
C# Code:
<br />
Stopwatch objTimer = null;<br />
objTimer.Reset();<br />
objTimer.Start();<br />
<br />
for (int n = 0; n <= 10000; n++)<br />
{<br />
log.Debug("This is a debug message");<br />
}<br />
<br />
objTimer.Stop();<br />
Console.WriteLine("Log Ticks :{0}", objTimer.ElapsedTicks);<br />
Results:
Using "RollingLogFileAppender":
29,187,893,440 (ticks)-->9,122 (milisecond)
28,473,901,664 (ticks)-->8,898 (milisecond)
28,302,560,368 (ticks)-->8,845 (milisecond)
28,439,245,696 (ticks)-->8,888 (milisecond)
Using "AsyncAppender":
56,301,661,280 (ticks)-->17,595 (milisecond)
55,775,842,640 (ticks)-->17,431 (milisecond)
56,351,447,984 (ticks)-->17,611 (milisecond)
I'm using VS.Net 2008 and .Net 3.5 for this application.
Do you have any idea about this problem? Is there any other solution to call log methods asynchronously?
Regards,
Farzad Badili
modified on Monday, November 10, 2008 8:13 AM
|
|
|
|
|
I saw an article about "Consuming SOAP web services - Amazon, Google et al" in "http://www.codeproject.com/KB/cpp/bwcswebservicearticle.aspx"
a part of code is:
using System;
using System.IO;
class WSConsumer
{
public static void Main()
{
Fortune f = new Fortune();
Console.WriteLine( f.getFortune() );
}
};
But i did not that how do i use from a proxy class?
-this code should be in server side or client side?
please help me
|
|
|
|
|
I suggest you ask in the forum provided for the article.
aref87 wrote: -this code should be in server side or client side?
given that you can't put your code into the Amazon web service, there's only one place it CAN go, right ?
Christian Graus
Driven to the arms of OSX by Vista.
"Iam doing the browsing center project in vb.net using c# coding" - this is why I don't answer questions much anymore. Oh, and Microsoft doesn't want me to.
|
|
|
|
|
I'm going to send mail using this code:
MailMessage message = new MailMessage();
message.Body = "Bod";
MailAddress mailAdrs = new MailAddress("xxx@xxxx.com","Name");
message.From = mailAdrs;
message.Subject = "Sub";
message.To.Add("ttt@tttt.biz");
SmtpClient smtpC = new SmtpClient();
smtpC.Send(message);
And in web.Config I have:
<system.net>
<mailSettings>
<smtp>
<network password="pass" userName="ttt@tttt.biz" port="25" host="mail.tttt.biz" />
</smtp>
</mailSettings>
</system.net>
but on sending time this error appears ONLY WHEM THE SENDER MAIL IS ANOTHER DOMAIN LIKE ID@YAHOO.COM:
User not local; please try a different path. The server response was: Sender address is not valid for your login. Check your email program settings.
Best wishes
|
|
|
|
|
This is an issue with your mail server, so I doubt you can fix it with code.
Christian Graus
Driven to the arms of OSX by Vista.
"Iam doing the browsing center project in vb.net using c# coding" - this is why I don't answer questions much anymore. Oh, and Microsoft doesn't want me to.
|
|
|
|
|
Hi
I am an asp.net programmer.I want to create a website for an organization to store a large amount of personnel info?
could you guide me to do this?
thank you
mona
|
|
|
|
|
Sure - my rate is $150 an hour ( well, I am giving you a discount because you're on CP ). If you want free help, you need to do more than tell us what you're trying to write, presumably for either money or college credits.
Christian Graus
Driven to the arms of OSX by Vista.
"Iam doing the browsing center project in vb.net using c# coding" - this is why I don't answer questions much anymore. Oh, and Microsoft doesn't want me to.
|
|
|
|