|
string mashing. Look for upper and lower case. Look for non letters. Look if the password matches the username or part of it. Stuff like that.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
basemake wrote: How to Make a Password Strength Meter Like Google?
i want some help....plz reply me...
Christian graus suggestion is the best, apart from that, if you are using VS2005 and Ajax Toolkit, you have password strength control with that. That can be used for this.
|
|
|
|
|
For that u can use Ajax control tool kit also if u know then. Otherwise javascript is best here I write full code which is aspx file code ok just copy it and check it.
function CheckPwdStrenth()
{
var pwd = document.getElementById("txtpwd").value;
var cat = "";
var i = 0;
var caps = false; // for upper case is there or not
var lawer = false; // for check lawer case is there or not
var digit = false; // check digit is there or not
// check the lenght first is it less than six char than it is week.
if(pwd.length<=5)
{
document.getElementById("lblstrength").innerHTML = "Weeker";
document.all.td1.bgColor = "red";
document.all.td2.bgColor = "red";
document.all.td3.bgColor = "red";
document.all.td4.bgColor = "red";
}
else
{
for(i=0;i<pwd.length;i++)
{
cat = pwd.charAt(i);
if(cat>="A" && cat<="Z")
caps = true; //Upper case is there.
if(cat>="a" && cat<="z")
lawer = true; // Lawer case is there.
if(cat>=0 && cat<=9)
digit = true; // Digit is also there.
}
if(caps==true && lawer == true && digit == true)
{
document.getElementById("lblstrength").innerHTML = "Strongest";
document.all.td1.bgColor = "green";
document.all.td2.bgColor = "green";
document.all.td3.bgColor = "green";
document.all.td4.bgColor = "green";
}
else
{
if(caps==false && lawer == false && digit == false)
{
document.getElementById("lblstrength").innerHTML = "Medium";
document.all.td1.bgColor = "maroon";
document.all.td2.bgColor = "maroon";
document.all.td3.bgColor = "maroon";
document.all.td4.bgColor = "maroon";
}
else
{
document.getElementById("lblstrength").innerHTML = "Stronger"
document.all.td1.bgColor = "lime";
document.all.td2.bgColor = "lime";
document.all.td3.bgColor = "lime";
document.all.td4.bgColor = "lime";
}
}
}
}
function focusset()
{
// txtpwd.focus();
// alert("T");
}
<asp:label id="lblstrength" runat="server" text="Nothing">
I hope it will help u and u can change it as per your knowledge and requirement.
tarduk2004@yahoo.com
|
|
|
|
|
Hello sirs/madams
I am developing a web application in which i want to update database records automatically.The update query check 'previousdate' coloumn value and then compare it to system date if current date is greater than coloumn date then 'Level' coloumn value will be changed.
Now my problem is that i know this is done by sql serevr agent. but i can't writing store procedure/function that first check all records and then execute query according to condition.
i am using sql server2000.
please help me if you can. my emailid : imnk2@yahoo.co.in
K Nitin
|
|
|
|
|
Hi,i have created one website on local system which is running fine.now when i am trying to host the same website on IIS it is giving me error which is,
CS0016: Could not write to output file 'e:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\websetup(travell)\17db5c73\928a41bd\App_global.asax.svcma0h6.dll' -- 'Access is denied'
What could be the reason.
GIRISH
|
|
|
|
|
|
i had tried to run this command but it gives me some errors,which are stored in the log file and the main error is,
InstallInfSections failed with HRESULT 80070005: 'Access is denied. '
|
|
|
|
|
The windows account from which you logged in and/or aspnet account do not have enough permissions
That may be the cause
Try giving permissions to those account
Paras Kaneriya The difference between genius and stupidity is that genius has its limits.
|
|
|
|
|
did u try it by reinstalling the IIS ????
if u reinstall then please Reinstall framework also after the installation of IIS
Thanks !!!!
Happy Programming
-----
Abhijit
|
|
|
|
|
I have two projects in a solution. One of the project is a web application and the other is a web setup project for packaging the web application for deployment. In the web setup project I have added a .bak file that is deployed together with the web application. Can someone explain why when I attempt to build the web setup project, MSSQLServer starts installing?
|
|
|
|
|
Hi,
I have made one web application using Asp dot net 2005 and sql server 2005.The sql server i am connecting is the remote sql server..When i run my application in my computer and in LAN, it worked without any error..I run it after publishing it and even making virtual directory..It worked fairly...But when i upload the application to the remote machine.e i uploaded my application(published application including virtual directory) and try to run my application from the remote server.But when i try to run it, it gives configuration error like below:
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
Why this error comes ??Shall i have to do anything in configuration file ..????In the above error, it is saying Virtual directory not being configured..But i did create virtual directory and run it in LAN..It's working but when trying to run it from remote computer(through ftp), its not working...How can i get out of it ??
suchitamanandhar@hotmail.com
|
|
|
|
|
The error is that the folder where the application is published is not an application. Either a regular folder or a virtual directory can be an application, but neither is an application by default.
Making it an application is easy. Just open the properties for the folder and click "Create".
---
single minded; short sighted; long gone;
|
|
|
|
|
i didn't get you ..
suchitamanandhar@hotmail.com
|
|
|
|
|
What didn't you get?
---
single minded; short sighted; long gone;
|
|
|
|
|
I didn't get the things you said that Either a regular folder or a virtual directory can be an application, but neither is an application by default....
suchitamanandhar@hotmail.com
|
|
|
|
|
change the custom error mode in your web.config file and then see the actual error.
K Nitin
|
|
|
|
|
hello,
Ya, i have initally changed custom error mode to "Off"..So, do i have to change something else there by something....
suchitamanandhar@hotmail.com
|
|
|
|
|
Hai
<asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_ItemDataBound" EnableViewState="false" ><br />
<HeaderTemplate><br />
<asp:LinkButton ID="lnkID" runat="server" EnableViewState="true" CommandName="Sort" CommandArgument="ID" OnCommand="LnkButton_Command" >LinkButton </asp:LinkButton><br />
<br />
<asp:LinkButton ID="lnkNmae" runat="server" EnableViewState="true" CausesValidation="true" CommandName="Sort" CommandArgument="Name" OnCommand="LnkButton_Command" >LinkButton</asp:LinkButton><br />
<br /><br />
</HeaderTemplate><br />
<ItemTemplate><br />
<%# Eval("ID") %> <%# Eval("ID") %><br />
</ItemTemplate><br />
<SeparatorTemplate><br />
<br /><br />
</SeparatorTemplate><br />
</asp:Repeater><br />
protected void LnkButton_Command(object sender, CommandEventArgs e)<br />
{<br />
<br />
Response.Write(e.CommandName);<br />
Response.Write("<BR>");<br />
Response.Write(e.CommandArgument);<br />
}
With this code i am creating a Sort facility in a repeator control for which i have added a in the header template and map the functionality to the header.
<asp:LinkButton ID="lnkNmae" runat="server" EnableViewState="true" CausesValidation="true" CommandName="Sort" CommandArgument="Name" OnCommand="LnkButton_Command" >LinkButton</asp:LinkButton>
Everything works cool up to this step.When i disabled the viewstate of Repeater 'LnkButton_Command' event is not fring. Is there any way todisable the parentcontrol view state and enable child view state.
|
|
|
|
|
One option is to replace the link buttons with links that place the sort order on the URL. This requires no viewstate. It also makes the page bookmarkable with a sort order.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks for your valuable suggestion.
The problem is if passing it as a querysting the whole data in the page needs to be reloaded. I only need to rebind the repetor. Is there any other way to do. i am really stucked here.
Thanks in advance
|
|
|
|
|
rebinding it surely means reloading the data ?
I don't thnk there's a way around it, you hae to turn viewstate back on.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks for your Help Graus.
Seems i must turn on ViewState for repetor. Is there any way i can turn off ItemTemplate and AlternateItemTemplate viewstate.
I am using Eval method to bind data
<td align="center" valign="middle" class="grid001"><br />
<%# Eval("CreatedDate", "{0:MM/dd/yyyy}")%><br />
</td>
Thanks in Advance
|
|
|
|
|
Hello Everyone,
I've stored the images in my database and now i want to display those images in my web page and i'm using the code given below for displaying it.....
But the compiler throwing an error
Invalid Parameter at Bitmap bitmap =new Bitmap(stream) line
plz try to understand my code and suggest me some way to come out of this.......
MemoryStream stream = new MemoryStream ();
SqlConnection connection = new SqlConnection (@"server=.;database=kiritbhai;uid=sa;pwd=");
try
{
connection.Open ();
SqlCommand command = new SqlCommand ("Select ImageFile from Rough_Images", connection);
byte[] image = (byte[]) command.ExecuteScalar ();
stream.Write (image, 0, image.Length);
Bitmap bitmap= new Bitmap (stream);
Response.ContentType = "image/gif";
bitmap.Save (Response.OutputStream, ImageFormat.Gif);
}
finally
{
connection.Close ();
stream.Close ();
}
|
|
|
|
|
The Knowledge wrote: But the compiler throwing an error
Invalid Parameter at Bitmap bitmap =new Bitmap(stream) line
That means that your data isn't really a bitmap.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
ok Here i'm sending my code for storing the images in the database
And also there are records in database which holds Images as <binary> and ImageType as image/gif
Plz sir have a look at my code suggest me the way................
Stream img_strm = uploadFile.PostedFile .InputStream ;
//Retrieving the length of the file to upload
int img_len=uploadFile.PostedFile .ContentLength ;
//retrieving the type of the file to upload
string strtype=uploadFile.PostedFile.ContentType.ToString ();
string strname=txtFileName.Text;
byte[] imgdata= new byte[img_len];
int n= img_strm.Read(imgdata,0,img_len);
//int result=SaveToDB(strname,imgdata,strtype);
DataUtility dUT=new DataUtility();
string strsql="Insert Into Rough_Images(ImageName,ImageFile,ImageType) Values('"+strname.ToString()+"','"+imgdata.ToString()+"','"+strtype.ToString()+"') ";
int result=dUT.ExecuteSql(strsql);
if(result>0)
{
Response.Write("Images Saved Successfully");
}
|
|
|
|