|
Hi all.
I have this vexxing problem which showed up when I moved from my dev/test box to a production server. What I'm trying to do is get the pwdLastSet property from Active Diretory. I'm using a DirectorySearcher object to get the pwdLastSet property. Once you get the property, you can cast the data to a long to get the total ticks since 1970. This works like a dream on my XP/IIS 5.1/ASP.Net 2.0 box. Once I moved it out to the Windows 2000/IIS 5.0/ASP.net 2.0 production server, the casting fails. It is my understanding that the DirectorySearcher object is supposed to marshall the data from Active Directory into something that's easier to use. I see this being done in my debugging sessions on my dev box. I would love to setup a debugging session on the production server, but that's a whole other set of issues. I do notice though if I take that whole class where the error is happening, put it into a simple C# windows app, compile it on my dev box, it will run correctly on the production server. I'm thinking that when it gets compiled on the production server, the marshalling doesn't happen corretly. I'm now leaning towards sticking the offending code into a dll. Has anybody else seen this type of issue? Is there some compile time flags that can be set?
Keith
|
|
|
|
|
An update. I tried to precompile the whole site and making the offending class a dll by itself. Both options give me invalid casts still. Is there additional compilation going on? It just seems to work everywhere besides inside the asp.net worker process for Win2000...
|
|
|
|
|
Just to cap this off, whatever the problem was became fixed after doing a iisreset. I discovered this on accident while attempting to get remote debugging running. So one problem down, one to go.
|
|
|
|
|
I am trying to change the text shown on the navigation buttons on the Wizard control.
I have tried using the following code:
Wizard1.StepNextButtonText = "click me";
Wizard1.StartNextButtonText = "Go";
Wizard1.FinishCompleteButtonText = "End";
For some reason, this only works for Step Next buttons - I cannot change the text on the buttons on the Start or Finish steps.
I have tried setting the StepType as "Auto" or "Start" & "Finish" but this does not fix the problem.
Does anyone know what I am doing wrong ?
|
|
|
|
|
Hello All,
How can we come to know email is delivered to receipients or not, any help is greatly appreciated.
Thanks & Regards,
Kumar
|
|
|
|
|
There is no guaranteed way of knowing.
|
|
|
|
|
What Colin said. Why? Imagine if spammers had that ability...
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
Hi All,
Is there any way to include the database with the ASP.NETC#)web based project
so that there shoulde be no need to install the database on the target machine's SQL Server2000
|
|
|
|
|
|
Hello All,
Can we include the SQL-Server2000 database named 'dataFile' in ASP.NET web based project. If yes plz give the steps to solve my problem
And also what is the use of "Generate SQL Script" in SQL Server2000
Thanx in advance
|
|
|
|
|
The Knowledge wrote: Can we include the SQL-Server2000 database named 'dataFile' in ASP.NET web based project. If yes plz give the steps to solve my problem
No. SQL Server is a server based database, not a file based database. You can, however, include a backup and you can use some SQL to restore that backup.
The Knowledge wrote: And also what is the use of "Generate SQL Script" in SQL Server2000
This is going to sound really obvious: The purpose of "Generate SQL Script" is to write a SQL Script to a file. The script, if run, will recreate the objects that you specified. Why don't you play with it in a development or testing environment? Find out what it does. Explore. Experiment. Learn.
|
|
|
|
|
hi
i am trying to validate a string that contains a date
using DateTime.parse function
but this function accepts for example the date "31-feb-2007" !!
how can i validate the date to be valid not just the format .
thanks
|
|
|
|
|
hi,
i think u can use a regularexpression along with the parser....its up to u
arun
|
|
|
|
|
Use this function for date validation.
//Date validator
public static bool validateDateTime(object _datetime)
{
try{
DateTime testdate = DateTime.Parse(_datetime as string);
return true;
}
catch{
return false;
}
}
|
|
|
|
|
if you are using VB.NET there is a function - IsDate() which can be used to validate the date.
you could also use compare or range validators, depending on your choice and use, to check the data type. but i don't think these will validate if the date string contains alphabets as expressed in your example.
but if you are using C#.NET, i think try-catch block (as someone already mentioned) will do the job.
hope this helps
regards
|
|
|
|
|
thank u all
the try/catch block works fine
|
|
|
|
|
try this
bool validatedate(string datestr)<br />
{<br />
try {<br />
System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo("en-US");<br />
DateTime tmpDate= DateTime.ParseExact(date, "dd-MMM-yyyy", culture);<br />
return true;<br />
}<br />
catch(Exception ex)<br />
{<br />
return false;<br />
}<br />
}
Regards
R.Arockiapathinathan
|
|
|
|
|
Instead of using exception handling as logic as some people have suggested try something like this:
public bool ValidateDate(string date)
{
DateTime temp;
return DateTime.TryParse(date, out temp);
}
|
|
|
|
|
Morning all.
I've been playing around with "customizing" the XMLHttp object using javascript to provide some extra functionality to it. Specifically, I've been trying to add a Timestamp field to the object, for tracking purposes.
Now as we all know, a javascript object is just a dictionary with string keys - which is why "object" members can be accessed through either the . operator or the [] operator. So far so good. Now since it's a dictionary, we're able to aritrarily add fields as and when we like, so the following code...
<br />
var obj = new ActiveXObject ("Microsoft.XMLHttp");<br />
obj.Timestamp = new Date();<br />
...should add this field to the object. I've tested under IE7 (no no - don't panic, not moaning bout Firefox - it's even stranger than that!), and alles ist gut. However, when I try it under IE6, I'm getting an "object doesn't support this property or method" error on the assignement of the new field - and a quick watch is telling me that indeed it's not there. (Which makes sense since the assignment is failing)
Anyone know what this might be - according to The Great God Google, there were no syntactic changes in the JS engine for IE7, just performance ones...
-- modified at 4:45 Tuesday 1st May, 2007
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Hi can anyone help me in giving guidance to create barcharts and piediagrams using the crystalreport in .net. When i searched in the net I am getting all the .net charting softwares but not the guidance to create the charts using crystalreport.
Thanx in advance
|
|
|
|
|
Hi friends,
Give me some idea for working with Sharepoint portal in .Net.
Please help me.
Thanks and Regards
Prya
|
|
|
|
|
Hi,
I have a dotnet application in which i have to import data from an excel sheet and store datas in mysql table to display those datas in my dotnet application. Iam using this datas to display datas for generating employee salary slip in my dotnet application. pls do help me with source code in C#.
Regards
Vijay.
|
|
|
|
|
http://www.codeproject.com/script/comments/forums.asp?msg=1985635&forumid=12076&mode=all&userid=3585246#xx1985635xx
note: I have used free SQLHelper Class to connect with database.
Regards,
Mayank Parmar
Senior Software Engineer
Amba Tech
Gandhinagar, India
|
|
|
|
|
hi i want to create a web browser in .net 2005 which can restrict a porn sites and if any porn words matches then also restrict that sites.please help me and send some source code
|
|
|
|
|
fgfdhghgfd wrote: hi i want to create a web browser in .net 2005
In other words, you want to wrap IE and put your own UI on it. Why ?
fgfdhghgfd wrote: which can restrict a porn sites and if any porn words matches then also restrict that sites
Surely someone else has thought of this before you ? Either way, an add in seems like a better idea than bothering with the IE control.
fgfdhghgfd wrote: please help me and send some source code
ROTFL.
I'm afraid no-one is going to write it for you. Try to learn a bit about the task at hand, and ask more specific questions.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|