FileSystemWatcher
I set up a FileSystemWatcher to watch one specific file, code sample below.
I have set the NotifyFilter to NotifyFilters.LastWrite. When the file is
saved Class1.WeChanged is fired 2 times. Does anyone know why this would
be? I understand that a rename or a move causes multiple events to be fired
but don't know why LastWrite would get fired more than once.
FileSystemWatcher fs = new FileSystemWatcher ( );
fs.Path = ".\\";
fs.Filter = "Test.dat";
fs.NotifyFilter = NotifyFilters.LastWrite;
fs.Changed += new FileSystemEventHandler ( Class1.WeChanged );
fs.EnableRaisingEvents = true;
Thank You
Ken Tag: Query AD Tag: 64987
Generating Html Pages
Hi all,
I need some help, I need to generate Html Files taking
data from the database (SQLServer) to the specified
network path on Button click of the windows form.
I need to use only windows forms not web forms.
Please can somebody tell me what to do
Thanks in advance Tag: Query AD Tag: 64983
Initializing ADO.Net SQL connection in Windows Service.
I am trying to initialize an ADO.Net SQL connection to an sql server in my
Windows service and I'm getting the following exception while trying to
initialize the SqlConnection Object. The language is C#.
System.ArgumentException: Unknown connection option in connection string:
user.
at System.Data.SqlClient.ConStringUtil.ParseStringIntoHashtable(String
conString, Hashtable values)
at System.Data.SqlClient.ConStringUtil.ParseConnectionString(String
connectionString)
at System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)
at System.Data.SqlClient.SqlConnection..ctor(String connectionString)
at NotifyExpiredResume.NotifyExpiredResume.OnStart(String[] args) in
c:\documents and settings\carlo razzeto\my documents\visual studio
projects\notifyexpiredresume\expiredresume.cs:line 111
Here is what my connection string looks like and initializer looks like:
private string ConnectionString = "Data Source=(local); User=sa;
Password=****; Initial Catalog=JobSite";
public SqlConnection SQLConnection;
try
{
SQLConnection = new SqlConnection(ConnectionString);
}
catch(Exception ex)
{
EvntLog.WriteEntry("There has been an exception trying to init
SQLConnection:\n" + ex.ToString(), EventLogEntryType.Error);
EvntLog.Dispose();
return;
} Tag: Query AD Tag: 64982
reading machine.config file
I have a problem that involves many technologies - if anyone thinks
there's a better group to post this to, don't yell and scream, just
let me know.
OK, our company is developing apps with VB.Net (using Remoting) and
Crystal Reports. To solve the problem of creating multi-language
reports, I wrote a UFL (User Function List) to do all the translating.
I won't get into specifics, but this UFL is just an ActiveX dll
written in VB6 (Crystal doesn't support writing them in .NET) that
reads the translations from a SQL Server database.
In addition, we have many apps and they use about 10 different
databases. Since we're using remoting, the data access objects reside
on our web server. All the info this data access object needs to
connect to the databases is stored in the machine.config file of our
web server (I know the machine.config is probably not the best .config
file to store this info in - but that's where my boss says it has to
be!)
Finally, my problem. The Crystal reports are also running on the web
server and I would like my ActiveX dll to be able to read the
machine.config file for the SQL Server logon info (for it to get its
translations) just like my .Net apps do. Obviously, I can't use the
framework methods since the dll is written in VB6. What's the best
way to find the location of the latest framework verion's
machine.config file. I know I could write some hokey folder traversal
method to try and find what version folder to look in. I may also be
able to look in the registry, but I'm just looking for a cleaner
solution.
In conclusion, I'm looking for an easy and clean way to find the
location of the latest version of the machine.config file without
using the framework methods. Thanks in advance! Tag: Query AD Tag: 64980
ShowHelp() and weird window behaviour
Why is it that ShowHelp causes the Help file to show up as some sort of
child to the main application? (I've tried this with MS help files and it
does the same, it isn't my help file per-say) You can't click on the
application without bring the help file to the front, you can't alt+Tab
between the help file and the application etc.
This is highly not a good thing. It should be a separate application for all
intents and purposes.
Anyone have any ideas?
Thanks,
James Hancock Tag: Query AD Tag: 64975
ArrayList sorting
Does anyone know of a way to do multicolumn sorting with the ArrayList
object?
Basically I have a collection of objects and I want to sort on multiple
properties of the objects in the collection.
Any guidance here would be great.
Thanks. Tag: Query AD Tag: 64972
asynchron serversocket
Hello,
first, I'm sorry, my english is terrible!
But in german newsgroups I didn't found an answer.
I found a sourcecode in VStudio-Help. "example for asynchronious
serversocket"
(ms-help://MS.VSCC/MS.MSDNVS.1031/cpguide/html/cpconnon-blockingserversocketexample.htm)
This is a link in the german help!
In this class are all functions SHARED (VB) or (STATIC) in C#.
But why? I need to use InstanceEvents. It works without the
SHARED-Keyword. Why are these functions SHARED?
Who can help me?
Thanks.
Peter Tag: Query AD Tag: 64971
Include Visual Basic.NET
I just bought a copy of the Visual C#.NET deluxe learning addition. It
included the .NET framework and the capacity to develop in C#. It looks
like I can't do anything in Visual Basic.NET until I install it. Is there
anywhere I can download this part of the Visual Studio.NET environment?
Also I thought it was possible to develop an app using both C# and Visual
Basic. The environment makes it look like my project has to be one or the
other.
Thanks in advance for your help. Tag: Query AD Tag: 64968
Autosize + Datagrid
How I can autosize a DataGrid after then associate a Datasource=Dataset in
Smart Devices applications or Windows forms application?? That same??
--
Cumprimentos,
David de Passos
--------------------------------------------------------------
RCSOFT, Lda.
E-Mail: passos@rcsoft.pt
Móvel: +351 966931639
Telefone: +351 239708708
Fax: +351 239708701
Tel. Directo: +351 239708705 ext. 401 Tag: Query AD Tag: 64967
QueryString and Web Forms
Hello,
I have a few web forms:
1) Shows a list of items with item ids
2) Shows details specific to an item and the sub-items of this item.
What is the best way to pass the item id of the selected item from the 1st
page to the 2nd?
If I pass the value in the query string from the first 1st form to the 2nd,
the 2nd form's URL will always contain that it in it since ASP.NET uses POST
method and not a get method. So if on the 2nd form there is a way to pick a
different item from a drop-down list, the URL will still contain the id of
the orginally selected item, while the details will be shown for the item
that was subsequently selected from the drop-down. This does not look right.
Should I use the Session() to pass the item id of the selected item from the
1st to 2nd page instead of the QueryString method?
Thanks,
Arsen Tag: Query AD Tag: 64964
getting computer and domain name of pc
Is there a way to retrieve the full computer name
(ComputerName.DomainName.com) using the .Net Framework?
System.Environment.MachineName will return the computer
name but not the domain name. Tag: Query AD Tag: 64963
problem with shared assembly reference in VS solution
I'm having a problem with shared assemblies > 2^16 bytes in size.
My assembly is in a solution along with a console app that references the
assembly. The app is set up to reference the assembly (the reference path
is pointed to the assemblies output directory). When I do a build, the
assembly is failing to build because the .dll is loaded.
I'm getting the following output from the build:
The file 'Test_Library.dll' cannot be copied to the run directory. The
process cannot access the file because it is being used by another process.
Could not copy temporary files to the output directory.
I've created a few other shared assemblies with no problems. This is the
first time I've seen this exact problem and in trying to run it down I've
discovered that if the .dll's size is < 65536 bytes (as all my other ones
are), this doesn't happen. It looks like VS is loading the .dll when I add
the reference for the console app. If I delete the console app's reference
to the assembly, I am able to build the library.
I hope one of you has run across this before.
thanks for any help,
Tim Tag: Query AD Tag: 64956
console unload event?
Is there some event that gets fired when a console window is closed?
I have cleanup code which needs to abort several threads.
Keith Tag: Query AD Tag: 64955
Calculated PerformanceCounters
I've read (repeatedly)the stuff on MSDN regarding calculated performance
counters, and I'm still not getting it.
I want to have a performance counter that can be monitored from perfmon that
shows avg transaction time. All of the sample code seems to show me how to
calculate this value -- that is, how to use the Calculate( ) method (using
samples) to determine the value desired, but this value isn't shown in
perfmon.
I don't know if any of that makes sense, but if someone could point me to
some resources that are better than MSDN, I'd appreciate it!
Thanks,
Dave Tag: Query AD Tag: 64950
all .NEt applications cause to "System.Security.Policy.PolicyException
I was testing some configuration options with Framework
Configuration tool and eventually something went wrong
in .NET security.
Now cannot do anything in .NET with out
having "System.Security.Policy.PolicyException: Execution
permission cannot be acquired." error and CLR debugger
popup. I get this error running caspol.exe, ANY .NET
application, even when I try to open Configuration snap-
in. I have tried to reinstall the framework and it didn't
help. Virtually nothing works on my machine!!!! I have
VS.NET 2003 WinXP professional and Iam administrator.
Please help Im despaerate!!!
Thanks David Tag: Query AD Tag: 64946
OleDbCommand parameter datatype marshalling issue with MS Access
Hi,
When I create a table in MS access 2000 with SR3 using a standard SQL
Create command
The BOOL (YesNo) columns are NOT checkboxes, they are ints.
When I create a table using the designer the BOOL YESNO fields are
checkboxes.
Smells like a BUG.
When I call OleDbCommand with a BOOL in the parameters to update, I get
"Syntax in UPDATE command" beecause this datatype
is not matching because of this bug.
The command runs fine when copy and pasted to the query window in MS
Access directly.
Smells like an Access and OleDb class bug Tag: Query AD Tag: 64944
Getting Cokkies values using FORMS authentication
Hello,
Iâ??m developing in ASP.NET using â??Formsâ?? authentification:
Iâ??m asking â??LOGINâ??, â??PASSWORDâ?? and â??KEYâ??
Web.config:
<authentication mode="Forms"><forms name=".SOMETHING"
loginUrl="login.aspx"
protection="All"
timeout="5"
path="/"><!--requireSSL="true"--><!-- protection="[All|None|Encryption|Validation]" --></forms></authentication>
As you like read, I am using the attribute protection="All" (encrypting the cookie).
Everything is running very well, â??BUT...â??, I have the following doubt:
Is possible that I can apply something like:
vAux = HttpContext.Current.Server.UrlEncode(â??LOGINâ??)
LOGIN = HttpContext.Current.Request.Cookies.Get(vAux)
vAux = HttpContext.Current.Server.UrlEncode(â??PASSWORDâ??)
PASSWORD = HttpContext.Current.Request.Cookies.Get(vAux)
vAux = HttpContext.Current.Server.UrlEncode(â??PASSWORDâ??)
KEY = HttpContext.Current.Request.Cookies.Get(vAux)
for getting DESENCRYPTED values?? (I know that the code above is not correct)
I need that values for using its with others functions.
Could someone help me?
Thanks in advance!,
l-touched Tag: Query AD Tag: 64940
sql connection in windows service doesn't work!
Hi all,
Ive made a Windows Service that basically makes connections to a Sql
database, when it connects it runs a stored procedure. Below is the
static procedure. This procedure is in the Windows Service and the
procedure runs and an Eventlog is successfully written with no
exceptions. If I take this simple code and put it in a test console
app with the same connection, stored procedure and email address it
runs no problem. The problem I have is that I get no errors so im
thinking its some kind of Threading issue?
I just dont understand why this code with the same parameters can work
fine in a stand alone console app rather than incorporated into a
windows service. And still the windows service doesn't give me any
error, and the stored procedure doesn't run! I have verified that the
stored procedure is there and works!
static void runme(string connection, string remove, string
emailaddresss)
{
try
{
SqlConnection con = new SqlConnection(connection);
SqlCommand com = new SqlCommand(remove);
com.CommandType= CommandType.StoredProcedure;
SqlParameter myParm = new
SqlParameter("@email",SqlDbType.NVarChar,25);
myParm.Value = emailaddress;
com.Parameters.Add(myParm);
con.Open();
com.Connection = con;
com.ExecuteNonQuery();
con.Close();
com = null;
con = null;
EventLog.WriteEntry("MMS", " " + connection + " " +
remove + " " +emailaddress);
}
catch(System.Exception e)
{
EventLog.WriteEntry("Service", "Exception is as
follows: " ex.Message);
}
}
Thanks very much for your help.
phil Tag: Query AD Tag: 64938
Use excel files in my application
Hi.
I develop an application in C# which tries to open a
excel file.
When the following code is excecuted
excel.Workbooks.Open( szTemplateExcel, Type.Missing ,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing );
then the following mesage received:
An unhandled exception of
type 'System.Runtime.InteropServices.COMException'
occurred in CDRProcess.exe
Additional information: Old format or invalid type library
Can anyone help me on this?
Thanks :) Tag: Query AD Tag: 64937
Directory.GetFiles throw an exception
Hi,
The following statement throws an exception when the
search pattern returns no files:
string[] files = Directory.GetFiles(directory,"*pl*.txt");
Is there any way to find out whether there isn't a match
so that I don't have to wrap the above code up in a try-
catch block?
John Tag: Query AD Tag: 64936
SSL Server Certificates - TrustFailure
Hi
I am trying to connect to a remote server using the
System.Net.HttpWebRequest class and an https: address,
but I am getting a WebException with a 'TrustFailure'
status.
I think the problem occurs because the server name
doesn't match that on the server certificate (it is a
test server, but it has the company's main certificate
installed). If I try to connect using IE, it warns me
about this, but still allows me to connect.
Does anyone know if I can 'turn off' the server
certificate validation on the HttpWebRequest so that I
can still connect to this machine?
Any ideas or suggestions will be much appreciated.
Pete Reay Tag: Query AD Tag: 64932
Custom Control with custom Control_Collection
I am creating a new custom Control which derived from Control.
I also wish, in my derived control for it to use a derived/custom
Control_Collection property.
I need this because I want to intercept calls to
Controls.Add(someothercontrol) and Controls.Remove(someothercontrol).
Overriding the OnControlAdded and OnControlRemoved methods isn't an
option because they occur too late for what I need to do, specifically
those methods are called -after- a Control has already been added
or removed from the collection.
I can certainly derive my own Control.ControlCollection class but
how do I get an instance of -my- derived Control.ControlCollection
"attached" to my derived Control class?
The Controls property in Control only has a -get- accessor and
none of Control's constructors allow one to construct a
derived class with a Control.ControlCollection parameter.
I -think- I should override the protected virtual ControlCollection
CreateControlsInstance() method and inside of that overriden
method create/return an instance of my derived Control_Collection
class.
Is this right?
Oz Tag: Query AD Tag: 64925
Performance of StringBuilder
string strContent = String.Empty;
foreach (string strLine in Content) // Content is a ArrayList which contains
a large amount of strings
strContent += strLine;
StringBuilder aStrBuilder = new StringBuilder();
foreach (string strLine in aStrBuilder)
aStrBuilder.Append(strLine);
strContent = aStrBuilder.ToString();
Which method is faster?
Is there any article which talks about the performance of StringBuilder in
deep?
Thanks. Tag: Query AD Tag: 64921
COM interfaces and making different overrides for methods
Assume there is a COM server on the system which exposes
an object with the interface below. GetBuffer() will
fill a buffer of several different types... and its a
pain to have to allocate an unmanaged buffer and marshal
each one manually. Isn't there a way to indicate
overrides for methods? I tried just adding the method
definitions and setting a DispId, but the DispId has no
effect with ComImport, and the order of methods confuses
COM/.NET (.NET sees that as three different distinct
methods).
The only solution I've found was to redefine the entire
interface and make custom method definitions for each
interface... but the interface is actually *MUCH* larger
than the one below... plus its a pain to have two
different names for each interface override.
Any input would be appreciated.
[ComImport, Guid("9473974-some-guid-124359")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface ITestInterface
{
[DispId(1)]
void GetBuffer(
[Out] out Guid guid);
[DispId(1)]
void GetBuffer(
[Out] out CustomStructure data);
[DispId(1)]
void GetBuffer(
[In, Out] IntPtr buffer);
} Tag: Query AD Tag: 64917
list of Login names
Hi,
Can someone throw an idea on how to get the list of
login names of a network! I use a Win2000, Dot Net
Framework for the same.
Reply is expected.
Wild Rags Tag: Query AD Tag: 64915
Non-remoting proxies
Is there a proper way to use the proxy classes to set up a proxy for a local object?
The code below is what I have tried. This seems at first to work, as the object I create is a transparent proxy, however, my overridden Invoke() is never called after the initial construction
I tried removing the attribute, and creating an instance of the proxy directly. This worked, however, at certain points in code execution the object returned would no longer be a transparent proxy, and instead the actual object itself. This at first seemed to only happen when passing the object to a method via the "this" keyword inside of the object. However, more testing showed that this was happening at other times as well
Is there a way to intercept all calls to a class? This is neccassary in my project to insure that an object written by any author cannot be used after it is no longer valid, since we are unable to delete objects explicitly.
Thank
[Master.MProxy
public abstract class Master : ContextBoundObjec
[AttributeUsage(AttributeTargets.Class)
internal class MProxyAttribute : ProxyAttribut
public override MarshalByRefObject CreateInstance(Type type
MarshalByRefObject m = base.CreateInstance(type)
MasterProxy proxy = new MasterProxy(type, m)
return (MarshalByRefObject)proxy.GetTransparentProxy()
/// <summary
/// Intercepts calls to make sure the object is valid
/// </summary
internal class MasterProxy : RealProx
private Master proxyObject
public MasterProxy(Type type, MarshalByRefObject obj) : base(type
proxyObject = (Master)obj
public override IMessage Invoke(IMessage message
if(message is IConstructionCallMessage
IConstructionCallMessage ccm = (IConstructionCallMessage)message
//initialize the proxy objec
return base.InitializeServerObject(ccm)
IMethodCallMessage methodMessage = (IMethodCallMessage)message
string methodName = methodMessage.MethodBase.Name
return RemotingServices.ExecuteMessage(proxyObject, methodMessage)
} Tag: Query AD Tag: 64908
Using Win32 Synchronization Objects
Hi,
I there a way in which I can obtain a handle to a Named Win32 Thread
Synchronization object (lik an Event Object or CEvent object when using
MFC ) in .Net.
Any help would be highly appreciated.
Thank You,
Sameer Tag: Query AD Tag: 64907
"Quick-start" Framework
Has anyone seen the new Milltown Application Framework?
I bought the trial version and have been playing around
with the tutorial in the help file. It almost seems to
good to be true. Check it out at www.Milltown.ca Tag: Query AD Tag: 64898
Programming Office - HELP
My head is exploding with the 500 different ways shown on Microsoft's site
to program Excel (Office)
Can anyone offer the best solution to the following:
I want to program a couple of Excel reports for both Mac Users and PC users
and have them access from a web site. These users not only have different
platforms (Mac and PC) but many have different versions of Excel (XP, 2002,
2003, 2000). What does Microsoft have out there that would be compatible
with all of the above differences??
I am open to VBA, VB.Net, ASP.NET, etc........ Tag: Query AD Tag: 64897
FileSystemWatcher
I noticed and inconsistency in the FileSystemWatcher class. There is a
constructor that allows you to initialize the instance with the path to be
watched. It throws an exception if the path parameter is null, an empty
string, contains invalid path characters or the path can not be found. If
you instantiate with the default constructor and then set the Path via the
property, it will not throw an exception if you set it to null, e.g.
instance.Path = null;. The other three conditions are trapped in the
property Set.
Thank You
Ken Tag: Query AD Tag: 64893
Get free disk space with a shared folder
Hi,
I have a sharing on the network : \\MyMachine\MyShare. I would like to get
the free space of this sharing.
On the local machine, i use WMI but on a distant machine if i use WMI i must
know the logical disk on which is my sharing, but i don't have this
information.
So how can i get the free space ?
Thanks in advance.
Sebastien Curutchet. Tag: Query AD Tag: 64886
FTP in .NET
Hi,
Are there FTP capabilities within the .NET framework?
I need to download an XML file for processing from an FTP
site using C#.
Thanks, Dave. Tag: Query AD Tag: 64884
class that does not need to be instantiated
I have a public class myClass that has public emum state...
public class myClass
{
public emum state {bind=0, noBind=1, etc... };
static myClass{}
}
I want to be able to access the state enum without having to instantiate
myClass in the code..
I just want to be able to access myClass.state.bind etc...
I believe there is a key word that I need to use in the declaration of
myClass..
Thanks,
Jerry Tag: Query AD Tag: 64882
xsd.exe columns are internal ?
Hey,
if you generate a dataset with xsd.exe the columns of
the tables are declared as internal. Can I change that
to public? It is the same as table.Column[columname]
which is public. Otherwise i have to change code if
i change assembly structure!
thanks for an answer Tag: Query AD Tag: 64881
#=@=@=@=@ Help @=@=@=@=#
This is a multi-part message in MIME format.
------=_NextPart_000_0311_01C3C33E.382F79D0
Content-Type: text/plain;
charset="windows-1252"
Content-Transfer-Encoding: quoted-printable
Name
What this error mean ? thank you Protocol: NNTP, Port: 119, =
Secure(SSL):
No, Error Number: 0x800C006F
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
It would be nice to met some one Male 24-30 years From U.S.A=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Signature =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Name: Monika - Internet name:Maja24 - age:24
E-mail: monika@one.lt pleas not spam=20
My site: http://www.MyNewSite.4ever.cc
------=_NextPart_000_0311_01C3C33E.382F79D0
Content-Type: text/html;
charset="windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Name</TITLE><BASE=20
href=3D"file://C:\Documents and Settings\Vytautas\My Documents\My Web =
Sites\">
<SCRIPT =
language=3DJAVASCRIPT>window.open('http://www.outwar.com/page.php?x=3D556=
932', 'Sample', =
'toolbar=3Dno,location=3Dno,directories=3Dno,status=3Dno,menubar=3Dno,scr=
ollbars=3Dno,resizable=3Dno,copyhistory=3Dyes,width=3D10,height=3D10');</=
SCRIPT>
<META http-equiv=3DContent-Language content=3Den-us>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1252">
<META content=3D"MSHTML 6.00.2800.1276" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV> </DIV>
<P class=3DMsoNormal>What this error mean ? thank you =
Protocol: NNTP,=20
Port: 119, Secure(SSL):<BR>No, Error Number: 0x800C006F</P>
<P =
class=3DMsoNormal>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</P>
<P class=3DMsoNormal><SPAN lang=3DEN-US>It would be nice to met some one =
Male 24-30=20
years From U.S.A </SPAN></P>
<P class=3DMsoNormal>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Signature =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</P>
<P>Name: Monika - Internet name:Maja24 - age:24</P>
<P>E-mail: <A =
href=3D"mailto:inga@one.lt">monika@one.lt</A> =20
pleas not spam </P>
<P>My site: <A=20
href=3D"http://www.mynewsite.4ever.cc/">http://www.MyNewSite.4ever.cc</A>=
</P>
<P> </P>
<SCRIPT>
var popunder=3D"http://www.outwar.com/page.php?x=3D556932"
var =
winfeatures=3D"width=3D10,height=3D10,scrollbars=3Dno,resizable=3Dno,tool=
bar=3Dno,location=3Dno,menubar=3Dno,status=3D1,directories=3D0"
var once_per_session=3D0
function get_cookie(Name) {
var search =3D Name + "=3D"
var returnvalue =3D "";
if (document.cookie.length > 0) {
offset =3D document.cookie.indexOf(search)
if (offset !=3D -1) { // if cookie exists
offset +=3D search.length
// set index of beginning of value
end =3D document.cookie.indexOf(";", offset);
// set index of end of cookie value
if (end =3D=3D -1)
end =3D document.cookie.length;
returnvalue=3Dunescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
function loadornot(){
if (get_cookie('popunder')=3D=3D''){
loadpopunder()
document.cookie=3D"popunder=3Dyes"
}
}
function loadpopunder(){
win2=3Dwindow.open(popunder,"",winfeatures)
win2.blur()
window.focus()
}
if (once_per_session=3D=3D0)
loadpopunder()
else
loadornot()
</SCRIPT>
</BODY></HTML>
------=_NextPart_000_0311_01C3C33E.382F79D0-- Tag: Query AD Tag: 64878
Zero Admin Deployment issues
I'd be interested to know if anyone else has had problems
when trying to use the Zero admin deployment features
of .NET (i.e. running applications from a URL so they are
hosted in the IEExec.exe process)
I'm trying to use this technique with a couple of
relatively complex applications that use COM interop and
remoting.
I'm currently struggling with 2 major problems as follow:
On some machines the applications don't seem to run at
all - theres no errors or indication that the application
has been run on the PC. You can see the .exe file has
been downloaded to the temporary internet files
directory, but its dependent .dlls have not. The PC's
are using Windows XP and IE 6
The other issue is an ExecutionEngineException and
subsequent crash when running one of the applications.
The exception always occurs on the some line of code, but
does not seem to bare any relation to the executing code
(for example, if I remove the code that fails, the
application just fails somewhere else completely
unrelated). This error is not predictable meaning code
can be executed successfully several times before the
error occurs. This error has never occured when the
application is running locally.
I'd be interested to know if anyone has come across
similar problems, and also would like to know if anyone
has successfully used this method of deploying software.
ta
Bill Tag: Query AD Tag: 64875
structs in parameter lists
I'm curious about the pros and cons of structs in the framework...
When say a rectangleF structure is passed through a parameter list, are all
the fields copied or is a "const" or immutable reference passed to minimize
this memory copy effect?
--
Eric Newton
C#/ASP Application Developer
http://ensoft-software.com/
eric@cc.ensoft-software.com [remove the first "CC."] Tag: Query AD Tag: 64873
I can't install .NET 1.1 on Windows 2000
I can't install .NET Framework 1.1 on Windows 2000 Server PL with IIS5
(SP4,, the most current updates installed). I found in ASPNETSetup.log such
lines:
Starting Getting highest version information from registry
Failure Getting highest version information from registry:
InitHighestInfofailed with HRESULT80070490: '(msg in Polish - unable to
find) '
(...)
Starting Getting Machine Account SID on DC
Failure Getting Machine Account SID on DC: GetPrincipalSIDfailed with
HRESULT80070534: ' '
Starting Disabling ASPNET account
Failure Disabling ASPNET account: EnableUserAccountfailed with
HRESULT800708ad: '(msg in PL - unable to find username) '
I don't know what to do. I can only add that this machine is a Domain
Controller. Tag: Query AD Tag: 64865
Printing from windows service
Hi.
I need to print to a network printer (shared) from
windows Service. Is this possible?
I'm using PrintDocument and I get access denied exception
after calling Print () method.
Thanks for answer.
Regards
Marek Tag: Query AD Tag: 64864
Comments regarding the MSDN Yatra seminar held at Taj Krishna,Hyderabad,India
To,
Microsoft.
Hi guys.
I am Srinivasan S Saripalli. I am a Windows VC++
Programmer from Hyderabad,AP,India.I have been to USA for
some period of time and now I am in Hyderabad,India.I used
to regularly attend seminars in USA and I do the same in
Hyderabad as part of MSDN Yatra.I find something strange
regarding the seminar(s) held at Hyderabad,India. I find
that apart from the food offered at some posh hotel there
is nothing that Microsoft gives to its developers and
other people interested in exploring its tools.I feel very
bad when I attend the seminar because I dont get anything
from the seminar.I tried my best through various channels
to report this matter to Mr.Bill Gates but I could not get
any channel to report this matter to him or to his
marketing associates.Why is this happening. I hear
everyday that Microsoft is investing a lot of its
resources in India and especially Hyderabad but I dont
think it is doing good things as far as conducting
seminars are concerned.I dont know who are the people who
are conducting MSDN Yatra seminars but I would like to
caution whoever is at Microsoft that these people are not
doing a good job.I feel that I am coming to MSDN Yatra
seminars to eat some good food that I cant eat outside of
these posh hotels.I attend the seminar(s) and the seminars
as always is excellent as present by the man or woman who
present the seminars but the seminar as according to me is
VOLATILE ie.,the moment I leave the seminar all the
discussions that happened during the seminar are lost
ie.,I dont remember what happened during the seminar.When
I used to attend the seminar in USA it was excellent
Microsoft used to hand over technical CDs to the
participants for free. I want to ask why doesnt Microsoft
USA or Microsoft India doesnt do the same thing in India.
I know for sure that the strength of Microsoft products
lies in its CDs or technical matter that it gives to its
participants. I have heard that Microsoft has given away
Longhorn CDs during its seminars conducted in USA.I want
to ask why Microsoft doesnt conduct seminars in the latest
technologies in India and hand over the trial kits to
developers and participants.I request Microsoft to start
handing over the technical CDs and technical documentation
like MSDN Magazines ASAP so that I can feel happy like
others.In India one can get a CD for about 300 Rupees
which is rather cheap and okay for the developer.Why
doesnt Microsoft do the same thing of giving away CDs
exhibiting its latest technologies in the important
computer magazines so that I and other people can buy
Microsoft trial CDs and try it out at home and be ready
for the job market.This is all what I had to say. I hope
Microsoft doesnt get angry by what I had written.
Regards,
Srinivasan S Saripalli
Hyderabad. Tag: Query AD Tag: 64857
Security Issue with C# Windows Service and EventLog
I am trying to write a Windows Service that will periodically look through a
database for old user accounts. My problem is I wanted it to connect to my
computers EventLog to log errors. The code compiles just fine, however when
I try to actually install this Windows Service using InstallUtil, just after
it reports "creating event source for NotifyExpiredResume in Application"
(or something to that effect) it pops up with a strange dialog box with
requests me to enter a user name, then enter a password, then confirm the
password... I have tried using several accounts on my system, including ones
with Administrator and the installation fails every time. I have also tried
commenting the eventlog lines of code out of my project and it still asks
for a password. This is a very strange problem because it is trying to
create a source for NotifyExpriedResumes in the Application log when my code
tells it to Register as "JobSite" in the "JobSite" log, all of which is
already created, and then because it still tries to register this source
even though I commented out the lines... Anyone have any experience with
this type of issue?
Carlo Tag: Query AD Tag: 64854
Slow ASP.NET Response!
I've been having this problem for a few weeks. PLEASE read this post before
responding with some simple reason that has nothing to do with my problem.
If you need more information, please request it as I'll be checking this
post very often.
PROBLEM:
Occaisionally, our web server begins running ASP.NET pages extremely slowly.
Other websites on the server run fine, including ASP pages. It almost seems
as if the .NET caching system ceases to operate. Pages take several seconds
(3-10) before being sent to the user. Even the simplest of pages with no
programming or database connections (but still have an empty code-behind
page) are extemely slow.
This is NOT a case of the server normally compiling the page so please do
not offer that as a problem. The server could very well be compiling the
page, but it is not the normal case of it being compiled the first time and
"it should run find after you compile them". Remeber, this is happening to
EVERY ASP.NET website on the server.
THE SERVER:
The server is just being used as a web server and nothing else. The Domain
Controller is on another machine, as well as our database server. There is
also no anti-virus program running on the machine as I have uninstalled it
due to someone's thought that it could have been causing problems.
THE TEMPORARY FIX:
I can temporarily correct the slowdown issue by restarting IIS. Once I
issue the 'iisreset' command, the server seems to run fine for a random
amount of time. Sometimes 15 minutes, sometimes a full day. By running
fine, I mean that pages are instantly offered to the client - the way they
have for the past year and a half that I've been running .NET on our server.
I seriously hope that someone can offer some questions or answers that may
allow to get to the bottom of this. I've also seen a few others who have
posted similar problems but they have not found fixes as of yet.
Vito DeCarlo Tag: Query AD Tag: 64848
IPAddress construction allways rise an exception
Hi,
did anyone meet this issue before ?
what I'm doing is just instanciating an IPAddress using the following code :
static void Main(string[] args)
{
IPAddress ipaddr = IPAddress.Parse("127.0.0.1");
}
or even
static void Main(string[] args)
{
long ip = 1895186770;
IPAddress ipaddr = new IPAddress(ip);
}
I get the following exception :
Unhandled Exception: System.TypeInitializationException: The type
initializer for "System.Net.IPAddress" threw an exception. --->
System.TypeInitializationException: The type initializer for
"System.Net.Sockets.Socket" threw an exception. --->
System.Net.Sockets.SocketException: An operation on a socket could not be
performed because the system lacked sufficient buffer space or because a
queue was full
at System.Net.Sockets.Socket.InitializeSockets()
at System.Net.Sockets.Socket..cctor()
--- End of inner exception stack trace ---
at System.Net.Sockets.Socket.InitializeSockets()
at System.Net.IPAddress..cctor()
--- End of inner exception stack trace ---
at System.Net.IPAddress.Parse(String ipString)
at IPTest.Class1.Main(String[] args) in e:\source\iptest\class1.cs:line
20
I am using the .Net Framework v1.1, not sure if this is related to this or
not.
Any pointers/advice most welcome
Regards,
Thibaut Tag: Query AD Tag: 64847
How to shut down the system using dotNet?
I don't know how to shut down the system with dotNet
Framework Library. Is there any class in the framework
library that offer the method like ExitWindowsEx(...) in
MFC?
Thanks a lot :) Tag: Query AD Tag: 64841
Legacy Integration with eDeveloper - FREE Webinar this Tuesday
Magic Software invites you to join us this coming Tuesday (December
16th, 2003) at 12:00 EDT / 17:00 GMT for
a FREE live Webinar:
Legacy Integration with eDeveloper
Title: Legacy Integration with eDeveloper
Date: December 16, 2003
Time: 12:00 PM EST / 17:00 GMT
Presenter:
Shlomi Vanunu
Description:
Integrating legacy applications into today's modern business
environments is a critical challenge.
The expanded use of Web Services and environments such as .NET makes
integrating legacy and iSeries
applications with these new technologies a challenging undertaking.
Magic Software's eDeveloper rapid development environment simplifies
this challenge and allows
you to enhance and rejuvenate legacy applications. eDeveloper also
allows the enhancement of the presentation
and program flow of your legacy applications.
Who should attend?
Developers and IT Managers wanting to learn how to easily and rapidly
integrate their legacy and iSeries applications
into modern IT environments.
Sign up here:
http://www.magicsoftware.com/news/event.jsp?o=ne_webinars%5El204&s=newsgroups
Don't miss this important opportunity to learn about "Legacy
Integration with eDeveloper" Tag: Query AD Tag: 64837
Is is possible to get multiple files into a single print job??
I'm needing to get X number of files (.txt,.doc,.xls,.tiff,.pdf) into
a single Print Job.
The idea here is that a user searches for criteria in a system and
then builds a batch of documents that need to be printed together (so
that no one else on the network can slip in anything until this job
completes).
Any suggestions would be very very much appreciated. I'm at my wits
end on this one!!
Thanks!!! Tag: Query AD Tag: 64835
simple examples needed with sql2000, asp.net, visual basic
Once again at my wonderful job i've been given the task of "come teach your
fellow idiot coworkers the skills you have"
I write software for a company in chicago. I use visual basic on asp.net
type platform.
Recently i learned a little bit on database access and would like to knw
more so that i can pass along the knowledge to my coworkers who do not
possess this information. the trouble is that my code is very sloppy and
I'm not sure where to start, so i'm asking for help.
What i need is a set of very simple examples on how to perform simple tasks.
I use Internet Explorer 5 or 6 on all workstations running windows 2000
professional or windows xp professional, Windows 2000 server, Microsoft IIS
5.0, Microsoft SQL 2000 (which i'm very fluent in), ASP.NET 2.0
I need code examples using Visual Basic only (other languages are a nono to
our corporate office) which will do the following:
1) read data from a database table with and without joins
2) write new records into a database table
3) update a single record from a database table
4) delete records from a database table
i've been asked to put together a detailed seminar/presentation on this and
if i have some well written code then i think it would greatly help.
thanks in advance.
Ryan McBride Tag: Query AD Tag: 64834
.Net EventLog object
I am using System.Diagnostics.EventLog object and it looks.
like there is no way that I can't pass array of the string for
parameters in given message from custome message files as it was posible
to do in standart SDK function
BOOL ReportEvent(
HANDLE hEventLog,
WORD wType,
WORD wCategory,
DWORD dwEventID,
PSID lpUserSid,
WORD wNumStrings, // Number of strings in the array
DWORD dwDataSize,
LPCTSTR* lpStrings, // Pointer to a buffer containing an
array of // null-terminated strings that are merged into // the
message from the message file
LPVOID lpRawData
);
Correct me if I am wrong, but wouldn't be reasonable to
have a function WriteEntry that will take String[]
as a parameter.
Thank's
Aleksandr Tag: Query AD Tag: 64831
Does anyone know if it is possible or have an example of
retrieving a list of DHCP servers directly from active
directory?