Thanks for replying. But this random number generator isn't as secure as cryptography RGN's. Something like the RandomNumberGenerator class. Cheers, Gerry. Gerry.
Gerry
Posts
-
Generating random number of fixed-size -
Generating random number of fixed-sizeHi, I want to generate a random number of fixed-size for passwords. The size of the password must be 8 digits. I'm using c#, .net 1.1 Cheers Gerry.
-
Reading Web.ConfigThat's fine but it's not in the configuration section. Example: I want to read the name and path attributes of the forms element. Gerry.
-
Reading Web.ConfigHi, I want to create a class library that will read certain sections of my web.config, not just in the configuration section, how can I do this without doing the cheap and nastly way, reading the whole web.config into an xml dom and parsing. Thanks, Gerry.
-
Form AuthenticationThe site could potentially still allow Anonymous access or you have persistence turned on, ie. Cookie is written to the client machine. Goto IE and delete all your cookies and try accessing the site again. Gerry.
-
FormsAuthenticationI'm attempting to simulate FormsAuthentication in IIS 5 with classic asp. I wanted to call into .Net to issue/re-issue cookies and do all the encyption for me. Is this possible. Thanks. Gerry.
-
FormsAuthenticationIs it possible to generate a FormsAuth Cookie outside a ASPX Context? Thanks, Gerry. Gerry.
-
Forms Authentication under the HoodDoes anyone know how FormsAuth works under the hood. What's really in the cookie apart from User.Identity. How does it know when to issue a new formsauth cookie must be based on a timestamp in the Cookie? Regards, Gerry.
-
Accessing Response/Request objects from class LibrariesNone of these ideas work. any others? Gerry.
-
Accessing Response/Request objects from class LibrariesIs it possible to access the intrinsics objects like in old VB, request/response/application in my c# class library? I looking to read/write cookies back to the client in a class library, not sure how to pass these into or access from my business object. HttpApplication/HttpContext? Thanks.
-
User Profiles in Windows2000I would like to create user profiles in Windows2000, I would like to script this? Are they any api's or utils available to create user profiles by script? Gerry.
-
Looking for UtilityYou can quickly create you own program to extract this type of information. On nt, you have version.dll, which has windows api function GetFileVersionInfo. Good luck. Gerry.
-
ECVT() and FCVT()?There's plenty of examples on the web & msdn. int sign=0, decimal=0; double dval=9999.9999; char* str; str = _ecvt(dval, 10, &sign, &decimal); Easy way. char buf[21]={0x00}; double dValue = 9.9; sprintf(buf,"%.2f",dValue); Only thing to watch is the precision with formatting strings. Gerry.
-
display a value in an EDITBOXThere are plenty of ways to convert a double to a string. Function _ecvt for one. double to string pointer. As for COleDateTime, COleDateTime x(1999, 3, 19, 22, 15, 0); CString str = x.Format(_T("%A, %B %d, %Y")); m_EditBox.SetWindowText(str); Hope this helps.... Gerry.
-
Database size problem.What I use to do was, to repair the db. Tools, Database Utilities, Repair & Then use compact. Not sure why it happens. Might have something to do with system objects in access? Gerry.
-
display a value in an EDITBOXDo you mean, just pass a value into the editbox field? if so,I just use DDX & m_EditControl.SetWindowText("VALUE"); or SetDlgItemText(IDC_EDIT1,"VALUE"); Gerry.
-
memory usageI use BoundsChecker, to verify that my code has NO memory leaks, this helps prevent this problem. Perhaps you need to redesign your application so it doesn't keep checking or only check every 5-10mins. Gerry.
-
C++ - Obtaining IP Addr of machineThank you, this did the job. Gerry.
-
C++ - Obtaining IP Addr of machineHow can I obtain the ip address of the machine using c++. Currently I've been using gethostbyname & getcomputername but this returns the DNS, I want the IP. Cheers Gerry.
-
CButton Text Color changeHow can I change the colour of the text in a button @ run-time. I tried to override the onctlcolor method:- HBRUSH CTestDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor); if (nCtlColor == CTLCOLOR_BTN) { pDC->SetTextColor(RGB(255,0,0));//set red return (HBRUSH) m_Brush.GetSafeHandle(); }; return hbr; } m_Brush is a member brush & in OnInitDialog method, I create it with a solid brush. m_Brush.CreateSolidBrush(RGB(129,129,129)); Thanks Gerry.