Unwanted .Net framework dependency
Somehow my application has developed a dependency on the .Net framework.
It is a C++ app built much the same as one would have with Visual Studio 6.
We were happily using Visual Studio .Net 2003 with no dependency on the .Net
framework. Somewhere along the line someone must have accidentally clicked
were they shouldn't have and the dependency arose.
Does anyone have any clues as to where to start to look to remove this
dependency?
Many regards,
Harry Hanley
NOSPAMharry.hanley@gmail.com
(remove NOSPAM to reply) Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109917
BeginReceive not ASYNC.
Can someone tell my why when I call Socket.BeginReceive() the callback is
called on the same thread? I thought that BeginReceive was ALWAYS an async
method. Below is the call stack. You can see its calling my callback
"Connection()" from the same thread.
My problem is that I call Accept() then BeginReceive(). If its processed on
the same thread then other connections will not be accepted. I could pass
it to another thread myself but shouldn't BeginReceive work this way?
MyApp.exe!MyApp.MStore.Connection(System.IAsyncResult iar =
{System.Net.Sockets.OverlappedAsyncResult}) Line 416 + 0x32 bytes C#
System.dll!System.Net.LazyAsyncResult.Complete(System.IntPtr userToken) +
0x7f bytes
System.dll!System.Net.ContextAwareResult.CaptureOrComplete(ref
System.Threading.ExecutionContext cachedContext, bool returnContext) + 0x12b
bytes
System.dll!System.Net.ContextAwareResult.FinishPostingAsyncOp(ref
System.Net.CallbackClosure closure = null) + 0x69 bytes
System.dll!System.Net.Sockets.Socket.BeginReceive(byte[] buffer, int offset,
int size, System.Net.Sockets.SocketFlags socketFlags, out
System.Net.Sockets.SocketError errorCode, System.AsyncCallback callback,
object state) + 0x14d bytes
System.dll!System.Net.Sockets.Socket.BeginReceive(byte[] buffer, int offset,
int size, System.Net.Sockets.SocketFlags socketFlags, System.AsyncCallback
callback, object state) + 0x23 bytes
MyApp.exe!MyApp.MStore.WorkerThread() Line 625 + 0x38 bytes C# Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109908
COM Interop registration failed
COM Interop registration failed. Type library exporter can not load required
library MSCOREE.TLB.
I'm currently receiving the above error message when building a sample
walkthrough which demonstrates COM interopability between ESRI's ArcGIS 9.1
and .NET. I'm using VS.NET 2003 Enterprise Developer and creating the
assembly in VB.NET (C# is not an option).
The SQLServer 2005 Beta 2 had been installed on the machine, but it was
uninstalled (about a year ago) when its version of the .NET Framework
(2.0.40607) was incompatible with ArcGIS 9.1. ArcGIS seems to have worked
fine after that.
Encountering this new problem, it appears that the uninstall of SQL Server
2005 Beta 2 was not clean, leaving at least one of the beta framework
components (MSCOREE.DLL) in the Windows\System32 folder (probably because it
was in use at the time) and a considerable number of registry entries.
Replacing the DLL with the earlier version (1.1.4322.573) has not fixed the
problem.
Has anyone else encountered this error after having installed the beta 2.0
.NET Framework and were then able to fix the problem without re-formatting
the drive? Any step-by-step instructions would be appreciated. I don't have
permissions to edit the registry, but I can pass any instructions on to
those who do.
Thanks in advance,
John Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109907
EventLog with custom Log
I have a suite of applications and services that use a common library and I
would like to use a custom event log to gather all the events in one place
rather than putting events in the "Application" event log. The code I use to
create the event log object is below. Clearly I'm missing some steps because
the results are not correct. A new event log called EJobs is created but is
never populated with events. All event log mesages still go into the
Application event log but are not displayed correctly. In the event viewer a
typical entry looks like this...
The description for Event ID ( 0 ) in Source ( MyNewService ) cannot be
found. The local computer may not have the necessary registry information or
message DLL files to display messages from a remote computer. You may be
able to use the /AUXSOURCE= flag to retrieve this description; see Help and
Support for details. The following information is part of the event:
Registering service types.
If I create the EventLog object to write into the Application log, then
everything works properly and you only see the intended text rather than the
text about needing to use AUXSOURCE as well.
Any suggestions would be gratefully received.
Thanks
Bill
public abstract class EJobEventLog
{
private const string EventLogName = @"EJobs";
// private const string EventLogName = @"Application";
/// <summary>
/// Create an event log object.
/// </summary>
/// <param name="strEventSourceName">The name to use for the source of
the new event log.
/// Typically this is the name of the calling application or
service.</param>
/// <returns>New <see cref="EventLog"/> object</returns>
public static EventLog CreateEJobEventLog(string strEventSourceName)
{
EventLog.DeleteEventSource(strEventSourceName, @".");
if (!EventLog.SourceExists(strEventSourceName, @"."))
{
EventSourceCreationData oSource =
new EventSourceCreationData(strEventSourceName,
EventLogName);
EventLog.CreateEventSource(oSource);
}
return new EventLog(EventLogName, @".", strEventSourceName);
}
} Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109906
file watcher renamed event problem
Hi all,
I am stuck with a problem and wanted some guidance. I am using
FileSystemWatcher to monitor a folder "C:\Temp1" and updating "C\Temp2" say
somthing happens in Temp1, I want to update Temp2
Say I create "Text.txt" in Temp1, in the created event I check for whether
"Text.txt" is present in Temp2 else copy it there
Problem:
If i try to rename "Text.txt" to "NewText.txt" in the renamed event I want
to rename "Text.txt" in Temp2 folder to "NewText.txt" but I cant delete
"Text.txt" and make it "NewText.txt", it has both files "Text.txt" and
"NewText.txt"
Hope I am making sense
Please advice,
Stephen Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109902
System.Threading.Timer vs System.Timers.Timer
I have created C# windows service to Peek Message Queues in periodic
intervals and update the database. In the above scenario which Timer
class suitable??
thanks in advance
--RK Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109901
Diff between WebBrowser Component and AXWebBrowser
I'm looking to user a web browser component in VS2005.
I like the functionality in the AXWebBrowser component (from ActiveX
controls page) that allows me to do this:
mshtml.HTMLDocument doc;
doc = (mshtml.HTMLDocument)this.SecureWebBrowser.Document;
mshtml.HTMLButtonElement ButtonTest =
(mshtml.HTMLButtonElement)doc.all.item("ctl00$CenterContent$ctl09$SignUp",
null);
ButtonTest.disabled = true;
Is this possible with the WebBrowser component that I can drop onto my
WinForm in VS2005 - I do not see that capability exposed - what are the
advances/disadvantages of each?
TIA! Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109894
FileStream Encrypted Impersonation Problem
Object of the excersize:
I have a service that needs to connect to securly to remote sevices.
I need to be able to store the login information for the remote services in
a secure manner.
To do this I was going to create an encrypted file containing the login
information. Encrypted under the service's login account.
I want to edit this file with a setup program.
My idea was to have setup program propmt the user to "login" as the service
account and impersonate this account while writing the config file.
The basic flow of the code is this:
LogonUser(sUsername, sDomain, sPassword, LOGON32_LOGON_INTERACTIVE,
LOGON32_PROVIDER_DEFAULT, ref pExistingTokenHandle);
DuplicateToken(pExistingTokenHandle, SecurityImpersonation, ref
pDuplicateTokenHandle)
WindowsIdentity newId = new WindowsIdentity(pDuplicateTokenHandle);
WindowsImpersonationContext impersonatedUser = newId.Impersonate();
FileStream stream = new FileStream("c:\\sectest\\Encrypted.txt",
FileMode.Create, FileAccess.Write, FileShare.None, 512,
FileOptions.Encrypted);
BinaryWriter bw = new BinaryWriter(stream);
bw.Write(this.textBoxText.Text);
bw.Close();
impersonatedUser .Undo();
With FileOptions.Encrypted:
If I impersonate the current windows logon (using LogonUser to get the
handle) this works. I get an encrypted file.
If I try to impersonate another user I get this exception message on the
filestream constructor. "Access to the path 'c:\\sectest\\Encrypted.txt' is
denied."
With FileOptions.None:
This works in both the above mentioned cases.
I get this error regardless of whether the file exists or not.
I have done the tests reversing two test accounts. Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109893
Release Enterprise Library Frame 2.0
Hello,
Microsoft announced that the Enterprise Library will be released mid January
2006.
What will be the exact Release Date?
best regards
Volkhard Vogeler Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109892
How can I get the Region for non-unicode program?
inside Regional and Language Options,
How can I get the Language for non-unicode programs?
GetLocaleInfo() seems not work for this,
thank you very much Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109891
Unable to cast COM object of type 'System.__ComObject'
This problem is driving me up the wall.
I'm using .NET 2.0 and VS2005 to work with some of the Windows Media Format
SDK through p/invoke
I've created the appropriate interfaces I need and decorated them with
ComImport, InterfaceType and Guid attributes. Specifically these interfaces
are IWMReader and IWMReaderCallback
I p/invoke the WMCreateReader method to instantiate and return an object
implementing the IWMReader interface.
The definition of this function is as follows:
[DllImport("WMVCore.dll", EntryPoint = "WMCreateReader", SetLastError = true,
CharSet = CharSet.Unicode, ExactSpelling = true,
CallingConvention = CallingConvention.StdCall)]
private static extern int WMCreateReader(IntPtr pUnkReserved,
WMT_RIGHTS dwRights,
[Out, MarshalAs(UnmanagedType.Interface)] out IWMReader ppReader);
This gives me an object of type System.__ComObject when attempting to call
the methods implemented by the IWMReader interface I receive the following
exception:
Unable to cast COM object of type 'System.__ComObject' to interface type
'<interface name here>. This operation failed because the QueryInterface call
on the COM component for the interface with IID
'{96406BD6-2B2B-11D3-B36B-00C04F6108FF}' failed due to the following error:
No such interface supported (Exception from HRESULT: 0x80004002
(E_NOINTERFACE)).
The offending method is the Start method, although the Open method works
perfectly.
I have seen many posts regarding this problem but as of yet have not
discovered a solution. The problem is not limited to the Windows Media
Format SDK.
The code works fine under .NET 1.1 & VS2003.
I have attached the IWMReader interface definition for reference.
[ComImport]
[Guid("96406BD6-2B2B-11d3-B36B-00C04F6108FF")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IWMReader
{
void Open([In, MarshalAs(UnmanagedType.LPWStr)] string pwszURL,
[In, MarshalAs(UnmanagedType.Interface)] IWMReaderCallback
pCallback,
[In] IntPtr pvContext);
void Close();
void GetOutputCount([Out] out uint pcOutputs);
void GetOutputProps([In] uint dwOutputNum,
[Out, MarshalAs(UnmanagedType.Interface)] out
IWMOutputMediaProps ppOutput);
void SetOutputProps([In] uint dwOutputNum,
[In, MarshalAs(UnmanagedType.Interface)]
IWMOutputMediaProps pOutput);
void GetOutputFormatCount([In] uint dwOutputNumber, [Out] out uint
pcFormats);
void GetOutputFormat([In] uint dwOutputNumber,
[In] uint dwFormatNumber,
[Out, MarshalAs(UnmanagedType.Interface)] out
IWMOutputMediaProps ppProps);
void Start([In] ulong cnsStart,
[In] ulong cnsDuration,
[In] Single fRate,
[In] IntPtr pvContext);
void Stop();
void Pause();
void Resume();
} Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109890
ConfigurationManager, user settings and application settings
Hi, I'm looking for a way to save 2 lots of information from my C#
application. I want to save information specific to the current user (such
as colour settings, non-essential data) and information specific to the
successful running of the application (such as server to connect to - but
only the administrator can update).
Can the ConfigurationManager class do this for me? If so, has anyone got any
example code of using it?
(The application settings should be saved in the same directory as the .exe
in case the application is installed on a network).
Thanks,
Mark Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109886
Thread: Thread.Abort() and SmtpMail does not work thougether?
I am making a windows-service in C#.NET 1.1 (that altso should be possible to
run as an application for testing).
The service shall do some work and sleep between each time the work is done
(the sleep time is set in app.config).
Using Thread.Sleep for pausing the application between each time the work is
done.
To be able to close the application/service anytime while in sleep its
running in its own thread.
Waiting with Abort() to Thread.ThreadState != ThreadState.Running.
This works fine until I use SmtpMail.Send in the thread.
If i do Thread.Abort() on the thread while it is sending a mail the
application stops responding but does not close.
The prosess must be aborted the hard way.
Thread.Join() does not help.
Any suggestion? Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109885
urgent!!! Problem opening solution file in Visual Studio
Hi all,
We are facing this big problem.
Scenario is as follows.
We have one single solution (say EIS) under which there are 25 projects. All
the files are saved at a central location under Visual Sorce Safe on a
seprate machine. For a new person who is trying to setup this solution file
on his / her local machine follows the following step.
1. "Set working folder" for the EIS folder from VSS on to his local machine
(by defualt D:\EIS)
2. Do a "get latest version" of all the files from VSS on to his local
machine.
3. After all the files are copied on to local machine, EIS.solution file is
opened in to Visual Studio environment by double clicking it.
4. For first time it ask for the server mapping for the projects under the
solution file. On click of OK it creates virtual directory for EIS under IIS
and further directories for projects under EIS (under IIS).
Now problem is after it has added all the folders under IIS, visual studio
hangs indefinately... and we are forced to do end task of the same.
Again opeing EIS solution file, tries to create further directories under
IIS and does not refer to the already created directories.
We are not even able to locate the source the problem.
Someone kindly help on this.
Thanks & Regards
Paras Sharma Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109881
Urgent!! Big Problem opening solution file in visual studio
Hi all,
We are facing this big problem.
Scenario is as follows.
We have one single solution (say EIS) under which there are 25 projects. All
the files are saved at a central location under Visual Sorce Safe on a
seprate machine. For a new person who is trying to setup this solution file
on his / her local machine follows the following step.
1. "Set working folder" for the EIS folder from VSS on to his local machine
(by defualt D:\EIS)
2. Do a "get latest version" of all the files from VSS on to his local
machine.
3. After all the files are copied on to local machine, EIS.solution file is
opened in to Visual Studio environment by double clicking it.
4. For first time it ask for the server mapping for the projects under the
solution file. On click of OK it creates virtual directory for EIS under IIS
and further directories for projects under EIS (under IIS).
Now problem is after it has added all the folders under IIS, visual studio
hangs indefinately... and we are forced to do end task of the same.
Again opeing EIS solution file, tries to create further directories under
IIS and does not refer to the already created directories.
We are not even able to locate the source the problem.
Someone kindly help on this.
Thanks & Regards
Paras Sharma Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109880
About the Language property
Hi,
I'm trying to provide my components and applications of multi-language
features.
I've found the Language property in Form class and other sontainers such as
UserControl, but help does'nt help me too much...
I've tried to change the Language property in my UserControl and I've seen
that a new resources file it has been created. It seems the right way... but
when I change the Language property on the Form which contains my
UserControl nothing happens. :(
Well, anybody can help me?
Which are the rules I have to follow to achieve this?
Thanks a lot,
Mario Vazquez Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109879
Impossible? Who called the Method?
Hi,
How can I know inside a given method, by which method it was called?
For instance: I have two property's (Prenom and Nom), both call the Method
PropertyChangedHandler(). How Can I know if PropertyChangedHandle was called
by the Prenom or by Nom?
Public Event PrenomChanged As EventHandler
Public Property Prenom() As String
Get
Return m_strPrenom
End Get
Set(ByVal Value As String)
m_strPrenom = Value
RaiseEvent PrenomChanged(Me, New EventArgs())
PropertyChangedHandler()
End Set
End Property
Public Event NomChanged As EventHandler
Public Property Nom() As String
Get
Return m_strNom
End Get
Set(ByVal Value As String)
m_strNom = Value
RaiseEvent NomChanged(Me, New EventArgs())
PropertyChangedHandler()
End Set
End Property
Private Sub PropertyChangedHandler()
'I Want to know in this Method which property called it: Prenom or
Nom...
End Sub
I could put the name of the property in a paramter like this:
PropertyChangedHandler("Nom") etc. But in my opinion it's not really a nice
solution :-) So is there any way to do it with a solution without everytime
having to use a unique variable? something like the sender-object?
Thanks a lot in advance,
Pieter Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109873
.NET 1.1 Service Pack 1 installation problem on Server x64
Hello,
we have a major problem with our .NET app at one of our customers. The
server runs on Windows Server 2003 Enterprise Edition x64. We cannot install
the Service Pack 1 for .NET 1.1. The setup program quits with an unhandled
exception after a few seconds. We downloaded the service pack version for
Server x64 from the microsoft side (it is not the Windows Server 2003
version, this setup quits with a message about the wrong platform).
We need help very urgently.
Thanks in advance. Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109872
.NET 1.0 and/or 1.0 hotfix messing with 1.1 application?
I've been trying to remotely assist a user who is encountering the infamous
"Fatal Execution Engine Error (0x7927baca)" problem when invoking our .NET
1.1-based application. The system in question is running WinXP Home SP2.
After sifting through as many documents as we could find, our first advice
to the user was to remove our program, remove .NET Framework 1.1, and then
re-install our program (our installer automatically checks for .NET and
reinstalls .NET Framework 1.1 if needed). Well, our program ended up getting
reinstalled, but .NET 1.1 apparently wasn't, perhaps because the user's
system (unbeknownst to us at the time) also had .NET 1.0.3705 installed plus
the 1.0 hotfix KB886906.
Anyway, the situation now is that the user still has .NET Framework 1.0 and
the KB886906 hotfix installed, and is somehow still hitting the same Fatal
Execution Engine Error (0x7927baca) problem when running our program.
Because the user is remote and not a computer expert, we want to make sure
our next advice is productive. That's where we could use all of your expert
advice.
http://support.microsoft.com/kb/899619/ and a few other references suggest
that you must remove KB886906 prior to installing the .NET Framework 1.1
***Service Pack 1***, but can someone tell me if this restriction also
applies to installation of .NET Framework 1.1 itself (i.e., the base package)?
And can someone comment on whether the presence of .NET 1.0 and/or the
KB886906 hotfix might cause the Fatal Execution Engine error described above?
And lastly, is there a recommended procedure or sequence that we should
adhere to, and/or things we definitely should NOT try, when trying to get
this user back up using .NET 1.1?
Many thanks for your help!
Ramon Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109871
Why so much trouble with ellipses?
In a recent post of mine I mentioned the inaccurate shapes drawn by
FillEllipse. In the response that I recieved I was told that DrawArc had
less problems, which I found to be true (I have been using DrawEllipse, but
they seem to have the same results when drawing a complete 360). However,
even with these methods, there are situations where the results are not even
symmetric along both axes (my best example of this is with a width and
height of 6). I know enough about math and computers to be able to figure
out how to write a simple method to create a basic circle or ellipse, so I'm
not going to ask anyone to tell me how to fix it (even though that would be
nice), but I am going to ask why couldn't Microsoft make this simple method
themselves? It's not like this is the first time they ever had to do it.
Heck, they could have just borrowed some code from Paint, I know that that
makes correct circles/ellipses. Do they plan to fix this in a future
version, or is GDI+ such a small part of .NET that they don't care? (I will
admit that I am guilty of still using .NET 1.1, but I still think it should
have been a simple enough task that they could have done it right by now).
What do all of you think?
--
Nathan Sokalski
njsokalski@hotmail.com
http://www.nathansokalski.com/ Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109865
Http web request error when trying to consume a webservice
Hi,
I had written an application in .Net 1.1 to consume a webservice.
Recently we converted the project to .Net 2.0. After the conversion to .net
2.0 the application does not work anymore.
The following error is returned when we make a Http Web request
"The server committed a protocol violation. Section=ResponseStatusLine"
Following the piece of code where it fails only in .net 2.0 but works in
.net 1.1
=========================
HttpWebRequest Request = (HttpWebRequest)HttpWebRequest.Create(url);
Request.Credentials = GetCredentials(url);
//Send the request and wait for response.
Response = (HttpWebResponse)Request.GetResponse(); --> Here it fails
=========================
I think it is related to some unsafe header information. I also followed the
following trick to ignore unsafe headers by adding the following in the
config file.
<system.net>
<settings>
<httpWebRequest useUnsafeHeaderParsing="true" />
</settings>
</system.net>
Also if i try to add the web reference to the webservice in visual studio
2005 the following error
By doing this it just worked once and stopped working.
Does anyone have any idea regading the following issue ?
Thanks Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109863
DataGridView "HideSelection"
I'm just now getting around to playing with the DataGridView and I'm using
it in non-bound mode (adding my own rows for the user to edit).
Is there any way to hide the selected cell/row when the focus is not on the
DataGridView like we can do with setting the HideSelection property of a
ListView?
Thanks.
--
John T
http://sage1solutions.com/TknoFlyer
Reduce spam. Use Sender Policy Framework: http://spf.pobox.com
____________________ Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109860
Regular Expression Irregularity
Okay, so I got really good at writing regular expressions using the
Visual Studio find/replace dialog box, then I went to go use some of
them in my code and discovered that they don't work. Reason? The RegEx
class appears to support a completely different type of regular
expression (one that still looks entirely like Greek even after reading
the help).
So, two questions:
1) Is there a class that supports the same type of regular expression
used by the Visual Studio find/replace dialog?
2) If not, how would you write an expression equivalent to "walk~(ing)"
(i.e., an expression that will find the word "walk" unless "ing" comes
after it).
Thanks in advance,
-Dan Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109859
RegEx
I have the following regular expressions:
Regex.Replace(someString, "[\x0A\x0D]", ""); //remove carriage return line
feeds
Regex.Replace(someString, "\\s{2,}", " "); //replace multiple spaces with a
single space
Is there a way to merge the two patterns into one?
Thanks in advance. Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109858
cannot install .net framework (any version)
am having one hell of a time trying to install/uninstall (and vice versa)
.net framework (any version 1.0, 1.1, 2.0) on a laptop running xpsp2.
it all began when doing windows updates and the .net 1.1 sp1 failed. since
then i've spent the last 8 hours trying to get it to work. i've followed a
half dozen MS articles, most recently, the one that walks through manual
uninstallation (kb article 320112). i'd thought i'd managed to remove all
traces of all versions of .net.
i tried to install v1.0 thinking that would be the easiest and that i'd
simply update to later versions once the most basic was installed. i get the
same problem, that is:
the install seems to go through just fine until the very end where it hangs
on "registering system.enterpriseservices.dll". it just stops here.
any thoughts? how can i 'start from scratch', as it were.
thanks,
ross aseron Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109853
Drag-n-Drop GAC Assbembly Issue
I recently have lost the ability to drag-n-drop assemblies into the
GAC. i can still use the gacutil to register dll's to the GAC but when
i drag the dll over to the folder, i get the "can't move" symbol on my
cursor.
this is only on one server.
I am up to ver 2.0 right now, but this was occuring at ver 1.1 as well.
any suggestions would be greatly appreciated.
ty,
bk Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109852
where does Microsoft.Xml.Xquery live?
where does Microsoft.Xml.Xquery live?
where does Microsoft.Xml.Xquery live? all i can find is a copy of it in the
sample project:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvsdev05/html/vs05c5.asp
but would like to know where Microsoft.Xml.Xquery should be obtained. Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109842
Instantiate Shell.Explorer.2 at runtime for a web page
I want to create a custom user control to be used in a web page (by
object tag) as an assembly. The user control needs to have a web
browser control in it. Having tried with the managed
System.Windows.Forms.WebBrowser or AxSHDocVw.AxWebBrowser, none of them
worked from IE invocation unfortunately. While
System.Windows.Forms.WebBrowser showed the page in Visual Studio 5000
Designer, AxSHDocVw.AxWebBrowser caught an exception at Navigate
function call.
Anyway, now I'm trying to use Shell.Explorer.2 in my custom user
control at runtime. The way I instantiate it is such:
Type loT = Type.GetTypeFromProgID("Shell.Explorer.2");
this.IE = Activator.CreateInstance(loT);
Then, this.IE can access all the properties of the ActiveX control,
like MenuBar, ToolBar etc.
However, it failed at, again, calling Navigate method. Debugger won't
step over the call.
If I replace Shell.Explorer.2 with InternetExplorer.Application, it
worked fine. Except that's not what I wanted because it launches IE in
a separate window.
Interestingly enough, if I embed Shell.Explorer.2 with its classid
directly into my web html page. It showed well, except the html object
id lost the reference to the control after exiting the onload function
in my javascript.
I must have missed something fundamantal in this attempt. Really hope
someone can direct me a little.
Thanks,
Jason Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109841
Instantiate Shell.Explorer.2 at runtime for a web page
want to create a custom user control to be used in a web page (by
object tag) as an assembly. The user control needs to have a web
browser control in it. Having tried with the managed
System.Windows.Forms.WebBrowser or AxSHDocVw.AxWebBrowser, none of them
worked from IE invocation unfortunately. While
System.Windows.Forms.WebBrowser showed the page in Visual Studio 5000
Designer, AxSHDocVw.AxWebBrowser caught an exception at Navigate
function call.
Anyway, now I'm trying to use Shell.Explorer.2 in my custom user
control at runtime. The way I instantiate it is such:
Type loT = Type.GetTypeFromProgID("Shell.Explorer.2");
this.IE = Activator.CreateInstance(loT);
Then, this.IE can access all the properties of the ActiveX control,
like MenuBar, ToolBar etc.
However, it failed at, again, calling Navigate method. Debugger won't
step over the call.
If I replace Shell.Explorer.2 with InternetExplorer.Application, it
worked fine. Except that's not what I wanted because it launches IE in
a separate window.
Interestingly enough, if I embed Shell.Explorer.2 with its classid
directly into my web html page. It showed well, except the html object
id lost the reference to the control after exiting the onload function
in my javascript.
I must have missed something fundamantal in this attempt. Really hope
someone can direct me a little.
Thanks,
Jason Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109840
Invoking Windows Services
Hi,
Any help would be appreciated. I have come across an Architecture (not
implemented) in my Enterprise, that has a Windows Service (A) written on VB
COM that has to talk to another Windows Service (B) to be written on VB.Net.
I can imagine one can easily write B in VB.Net, but my questions is - is it
possible to invoke a Windows Service? A is supposed to pass an XML message to
B and B is supposed to invoke an array of Components.
To add to the woes, there is a .Net component called "B-Caller" with a CCW
(Com calleable wrapper) that will invoked from A. Do you think this
worthwhile?
Sorry, for the length of the message but to summarize -
1. Is it possible to invoke methods or events from a windows service?
2. Do you think B-Caller is necessary?
Please advice, if you could point me to a specific discussion board for this
- would be great.
Thank you,
Sameer Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109830
Building my own front end to the network configuration.
I have a product that will allow users to enter some, but not all, of the
network options (TCP/IP Address, Gateway, ...) Are there calls that I can
make that will write the appropriate spot in the registry. Or are there
routines that I should be calling that says 'make this the new tcp/ip
address'.
TIA - Jeff. Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109823
Send Outlook Appointment from VB.NET
I need to create an Outlook appointment from a VB.NET class that will be on a
remote server. This class should send the appointment to about 50 different
people and put it in their calendar. How would I go about doing this?
--
Alex C. Barberi
Chief Executive Officer
VisionForce
http://www.visionforceweb.com Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109815
StringInfo class
Hi,
I am looking for a way to get the contectual forms from Arabic Script.
If you use a richtextbox in VB.net, and you fill it with a a unicode string
which contains the isolated characters, the control takes care of the
"shaping", it shows the approriate glyphs ( isolated, final, initial or
medial )
I would like to do the same in code, input isolated chars and output correct
glyphs.
For example : arabic letter BEEH (067B) when used at the end of a word
(final) becomes FB53.
Wat is the correct way for doing this ?
* the new stringinfo class ?
* uniscribe ?
* ....
Any help would be appriciated !!
Greetings. Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109811
abstract user control
Hi,
I am not sure if this is the right place for this question! Anyway,
here it is:
Is it possible to create a user control with abstract methods? I
couldn't do it. The reason is that I want to constrain the developer to
inherit from this abstract control!
Thanks in advance
Daniel Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109809
performance - Comparison
Hi!
I have a simple doubt abt the performance when comparing variables with
constats values..
Can any one tell me whether to use
1.
int a;
if(a==10)
{
MessageBox.Show("done");
}
Or
2.
int a;
if(10==a)
{
MessageBox.Show("done");
}
for comparing a variable.. which one will be wise to use if we are
considering performance to be critical and why??
thanks,
Baren Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109804
Aspnet_regiis
I don't know if this is the right forum for me to post my question but I just
hope somebody answers my question.
Is there any way that I can retrieve the password of the aspnet account. I
know that the password is machine generated but is there any method to
retrieve the password?
Can I change the password manually in the machine.config file? If so what
can be the implications of this? One thing for sure is that I know manually
changing the password will not synchronize the password with the IIS metabase
but can aspnet_regiis with the i switch be used to do this synchronisation?
Or for that matter does aspnet_regiis -i utility change the password for the
aspnet account and synchronize it with the metabase?
Too many questions!!!! but just hope somebody have answers for it... Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109801
ConfigurationErrorsException
Hi,
I am using C# with VSExpress 2005 (.NET 2) and playing around with
Configurations.
But, in the following Line (the first line) I am receiving an
ConfigurationErrorsException:
SystemsSection sysSection = ConfigurationManager.GetSection("systems") as
SystemsSection;
I took the example from:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=66506&SiteID=1
Can someone help me ?
Thanks in advance,
Chris Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109800
Sending a method as a parameter
Hi,
How can I send a method as a parameter to be executed in a class?
If possible without using delegate.
public void MethodA()
{
// Code
}
public void ExecuteMethod( * MethodParam )
{
// Invoke the method parameter
**MethodParam.invoke();
}
public void main()
{
// Call ExecuteMethod sending MethodA as a parameter
ExecuteMethod( * MethodA );
} Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109798
using INotifyPropertyChanged interface in Compact Framework
On my .Net 2.0 project:
I implemented INotifyPropertyChanged on all my business entities to
monitor property changes thru PropertyChanging event. It works fine on
my web and windows applications consuming my buiness entities but these
application do not consume the web service part.
The problem occurs on the proxies generated when i referenced my web
service and this ws uses these business entities. This is on a Pocket
PC/CF2.0 application. Yes, of course events are not serializable and my
proxy classes dont have those events (PropertyChanging and
CancelEventHandler) but is it realy my problem or the Compact Framework
not supporting System.ComponentModel.INotification interface?
My compilation failed and it ask me to reference System.ComponenModel.
So I edited the generated proxy class but still the project failed to
compile.
Hope you can help me. Thanks in advance! Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109796
Datagrid EnableViewState problem
Hi everyone,
I have a datagrid to display search results. The search results at this
stage we only return the first 500 records to speed up the search. The
problem is, if I turn the EnableViewState on, the search regularly failed
with a message that says tempdb is full... It does not however happens all
the time. I have tried to turn the EnableViewState off, that seems to do the
trick but causes another problem, the datagrid's paging does not work for
hidden pages (example, we only 5 pages, numbered 1, 2,.., 5 with the rest can
be accessed by clicking the ... after the 5. After clicking the ... after the
5, the numbers 6 - 10 are displayed but if I click on any number from 7 to
10, it goes back to pages 1 - 5). HELP!!!!
Is there a size limit to contents that can be displayed on an IE6 browser?
Has anyone experienced the same problem or is it just me?
Reducing the number of records returned is an alternative but it would be
much better if someone has a work around.
Any suggestion is greatly appreciated.
Calvin Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109793
Output Difference in Win2k Server + .NET 2.0 and WinXP + .NET 2.0
Hi al,,
I am trying to access an unmanaged library from C#, the code runs fine in
Win2kServer + .net 2.0 but it throws a Security Permission excpetion when
trying to execute the same part of code in WinXP+.NET 2.0.
Can any body help me on this.
regards
Subramanian Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109792
User profile space / Active directory integration
Hi all, I have been given the task of (For each user in Active Directory)
retrieving the following information from their Windows 2003 profile
Number of and size of the following files each person has
Audio
Video
Word doc
Excel
PowerPoint
PDF
Script (.js, .vbs)
Miscellaneous
I also have to query exchange and retrieve the number of emails they have as
well as the amount of space they are taking up in exchange
In order to do this I am currently going to their profile on the servers
drive and running a recursive function which keeps track of all the
information needed
e.g. if it finds a word doc then it queries its size and adds it to the
global WordDoc count and WordDocSize variables, same for all of the files
mentioned above. When the recursive function exists it returns this
information and the info is stored into the database. All the searching etc
for all the files is done at the same time inside the same recursive
routine.
Now, as you could imagine, this takes a long time for the 4000 users in our
AD....
I am using threading to speed it up by having more than one thread running
at once doing the search (A thread is spun up for the first letter of each
users last name so I have twenty six threads running at once, e.g. it
searches for all lst names beginning wth A,B,C etc at the same time hence
the 26 threads) and it seems to run fine.
I am open to ideas about how I can speed up the search without having a
million threads running at once
Thanks in advance
Mark Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109790
System.Net.WebRequest.Create
I have the below code.. executing from .NET APP
System.Uri objUri;
System.Net.WebRequest objWebReq;
System.Net.WebResponse objResp;
try
{
objUri = new System.Uri(strWebLink);
objWebReq = System.Net.WebRequest.Create(objUri);
objResp = objWebReq.GetResponse();
objResp.Close();
objWebReq = null;
return true;
}
catch
{
objWebReq = null;
return false;
}
and a Software policy restriction, that prevents from accessing Internet
through IE.
It works ok ( I get return true when internet is present) if the strWebLink
is say www.mydomain.com/admintest.aspx , but if I give it as
www.mydomain.com/admintest.asmx it fails ( I get return false when internet
is present). All this happens on XP SP2 box.
what is the difference??
VJ Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109787
Problem - Serialization Is Losing Data
My projetc has a simple DataDataSet (ds) that has a parentDataTable and a
childDataTable table bound to 2 DataGridViews and its lossing data in
serialization.
The problem happens when:
1)A parent row and consequently its child row (cascade) are deleted from
ds.
2)A new parent row and child row with the same values as deleted rows
are created again. Notice that the problem only occurs if the new data are
the same as deleted rows.
Afterwards clicking on a button it is executed:
3) dsChanges=ds.GetChanges
Stopping with debug you can see that there are 2 child rows in
dsChanges.childDataTable, one with Deleted and other with Added RowState.
4) dsChanges.WriteXml("File.Xml", XmlWriteMode.DiffGram)
dsChanges.Clear()
dsChanges.ReadXml("Teste", XmlReadMode.DiffGram)
Stopping with debug you will see that now there is only one child row with
Deleted RowState.
Where is the row with Added RowSate?
Could someone explain me if I am doing a wrong understanding, or there is a
actual problem with serialization?
This is a problem to my system because in fact my program is not executing
WriteXmL and ReadXml, actually it is sending the dsChanges to a another
program though Remoting where it is executed serialization and the loss of
data. Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109786
Couldn;t load assembly
Hi,
I have created a custom key called "TestKey". Gave acess to NT
Authority\network.
Added code in web config...
<configProtectedData>
<providers>
<add keyContainerName="TestKey"
useMachineContainer="true"
description="Uses RSACryptoServiceProvider to encrypt and
decrypt"
type="system.configuration.RSAProtectedConfigurationProvider"
name="CustomProvider"
/>
</providers>
</configProtectedData>
Trying to run following code to encrypt config file...
config = WebConfigurationManager.OpenWebConfiguration("~")
section = config.GetSection("appSettings")
section.SectionInformation.ProtectSection("CustomProvider")
Getting Error...
Error: 429 - Could not load type
'system.configuration.RSAProtectedConfigurationProvider' from assembly
'System.Configuration, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a'..
Not sure what I am doing wrong.
Thanks in advance.
- Reena Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109782
Prevent service from stopping
Hi,
I have a service which is only a server for some objects the user can
instanciate and call.
Right now, the service starts and then stops automaticaly. The only line of
code I added is in the OnStart event and is
"RemotingConfiguration.Configure(configfile)". So I guess the service is
stopping because it has nothing better to do?
Is there a setting I can set to prevent it from stopping? will I have to
start a loop that will run until the OnStop event runs in order to keep the
service alive?
Thanks
ThunderMusic Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109771
No .NET config program
Hello,
I have installed .NET 2.0 on a Windows XP with Admin, and after that there
is no configuration program in control panel -> administration tools. What
can be the reason of this?
Thanks
Otto Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109767
.NET 2 Clr hosting
Does anyone know if .NET 2 retains distinct server and workstation clr hosts
?
-Robert Tag: update/insert with microsoft.xml.xquery(.net2.0beta) Tag: 109763
update/insert with microsoft.xml.xquery(.net2.0beta)
can anyone provide an example of how to update/insert with
microsoft.xml.xquery?