Is there some way to tell from within an assembly whether an app is running as a Web app or a Windows app? Chen Venkataraman
Chen Venkataraman
Posts
-
How to distinguish Web apps vs Win apps -
VB.Net 2003 Entirely Useless for Web DevelopmentXMLSerialization generates C# code which gets compiled on-the-fly in the Temp folder that requires write permissions to be granted to the user running the ASP.NET Worker (W3Wp.exe in IIS 6.0, aspnet_wp.exe in IIS 5.1) process. The default user is usually “Network Service”/ASPNET & the folder location is “C:\Windows\Temp”. Verify whether ASPNET or "Network Service" account has Full Control to the Temp directory. [i ran into this a while ago while setting up IIS 6.0 on Win2k3 server] Chen Venkataraman
-
How to get the subnet maskHow do i get the subnet mask configured on a m/c using the .NET framework? Thanks. Chen Venkataraman
-
Stress test toolsHi, Can anyone point me to some tools that would allow for simulating stress tests: excessive memory, resource handle usage for e.g. We're running into issues related at production site & are trying to reproduce similar conditions in a test lab environment. TIA Chen Venkataraman
-
Oracle Notification Services??Does anyone know what's the equivalent of SQL Server Notification Services in Oracle? I'm primarily looking to maintain the consistency of the data caches obtained from reading the database to be sync'ed with any changes made to the database. i.e, need a way for apps to register interest & be notified when a row changes for e.g. Are there any classes/add-ons in the .NET framework that works with the Oracle database? Any pointers would be appreciated. Chen Venkataraman
-
Oracle Notification Services??Does anyone know what's the equivalent of SQL Server Notification Services in Oracle? I'm primarily looking to maintain the consistency of the data caches obtained from reading the database to be sync'ed with any changes made to the database. i.e, need a way for apps to register interest & be notified when a row changes for e.g. Are there any classes/add-ons in the .NET framework that works with the Oracle database? Any pointers would be appreciated. Chen Venkataraman
-
P/Invoke blues: htons & htonl issueduh... i gave up after struggling with it for a day. And i've done P/Invoke stuff before & usually could make sense of what the compiler thought was wrong - with this one, i just lost it! Silly me! Thanks. Chen Venkataraman
-
P/Invoke blues: htons & htonl issueSorry i had a typo... the code should have been
#region P/Invoke stuff [DllImport("ws2_32.dll")] private static extern short htons(short val); [DllImport("ws2_32.dll")] private static extern long htonl(long val); #endregion
Chen Venkataraman -
P/Invoke blues: htons & htonl issueRan into this while trying to interoperate with an existing socket based server... i need to construct a buffer that contains mixture of strings & ints - the shorts/ints are stored in network byte order. So, i came with the following P/Invoke declaration in C#.
#region P/Invoke stuff [DllImport("ws2_32.dll")] private static extern short htons(short value); [DllImport("ws2_32.dll")] private static extern long htonl(short long); #endregion
Unfortunately, the compiler barfs - says "expected class, delegate, enum, interface or struct". It looks like it doesn't like the return value specified as short or int. They are blittable types & i'm not sure what it doesn't like about them. Any pointers? TIA Chen Venkataraman -
IIS 6.0 & Windows 2k3 questionThe scenario is this - a Web Service that was developed on a XP box has been deployed on IIS 6.0 & Win2k3 m/c. The Win2k3 m/c also has VS.NET 2003 installed on it. issue #1. The web service needs to launch a third party process (lets call it abc.exe) to work properly. This step fails on the Win2k3 box. w3wp.exe is running under the default NETWORK SERVICE user privileges. Is there a way to enable/set privileges to the NETWORK SERVICE account so that the ASP.NET worker process has the ability to launch any/specific process? [i tried launching Notepad.exe thru the web service & it seems to launch this successfully.] issue #2 i expected to debug the web service on the Win2k3 m/c via VS.NET but it fails with the message "... Unable to start debugging on web server. The project not configured to be debugged.". I verified the project settings between my XP & Win2k3 m/c & they are identical. Now i'm beginning to suspect that the Win2k3 default lock-down security is the culprit. Any pointers? I even added the user to the "Debugger Users" group as suggested in the docs to no avail. Any help is appreciated. TIA. Chen Venkataraman
-
IIS 6.0 & Windows 2k3 questionThe scenario is this - a Web Service that was developed on a XP box has been deployed on IIS 6.0 & Win2k3 m/c. The Win2k3 m/c also has VS.NET 2003 installed on it. issue #1. The web service needs to launch a third party process (lets call it abc.exe) to work properly. This step fails on the Win2k3 box. w3wp.exe is running under the default NETWORK SERVICE user privileges. Is there a way to enable/set privileges to the NETWORK SERVICE account so that the ASP.NET worker process has the ability to launch any/specific process? [i tried launching Notepad.exe thru the web service & it seems to launch this successfully.] issue #2 i expected to debug the web service on the Win2k3 m/c via VS.NET but it fails with the message "... Unable to start debugging on web server. The project not configured to be debugged.". I verified the project settings between my XP & Win2k3 m/c & they are identical. Now i'm beginning to suspect that the Win2k3 default lock-down security is the culprit. Any pointers? I even added the user to the "Debugger Users" group as suggested in the docs to no avail. Any help is appreciated. TIA. Chen Venkataraman
-
XML Web Services questionAfter playing with XML Web Services a little bit, it looks like all the data members of any custom object that need to be serialized across should be marked as public. This seems so non O-Oish or is this a limitation of the WSDL that gets generated automatically that it only supports public data members. For e.g.
[Serializable] public class SomeData { public string _id; // if this is marked private, WSDL ignores it public string Id { get { return _id; } } }
Is there a way around this? Chen Venkataraman -
PostBuildEvent failsI was working with Microsoft Application Block for Logging when i ran into this issue... any Pre or Post-build events specified in the project does not work - it always fails.
Performing Post-Build Event... 'PostBuildEvent.bat' is not recognized as an internal or external command, operable program or batch file. Post-Build Event failed
Initially, i suspected that the relative paths specified in the commands were somehow messed up - but then if i invoked them directly from the command shell, it worked ok. I then searched the web for related IDE specific issues & came up empty. my suspicion is that somehow McAfee Virus Scan is interferring with the IDE's ability to generate & invoke the PostBuildEvent.bat file. Anybody has similar experiences? Any workarounds? TIA Chen Venkataraman -
How to use Memory-mapped files in .Net?what is the cleanest way of dealing with memory-mapped files within .Net? Looking for a way to port a large library code that makes heavy use of memory-mapped files. Any pointers would be appreciated. Thanks. Chen Venkataraman
-
Problem with CreateProcess and SW_HIDEYou may also want to try not setting the
STARTF_USESHOWWINDOW
flag inSTARTUPINFO
structure. Chen Venkataraman -
How to create a process with a different name?Tried setting the title attribute of the
STARTUPINFO
structure but it didn't help. Task Manager still shows the executable as ABC.exe to continue with my example. But what i found is that if i specify both the lpApplicationName & lpCommandLine as follows, i can get a behavior close to what i want...lpApplicationName = ABC.exe
[need the .exe even though the doc says it is optional]lpCommandLine = myABC arg1 arg2...
etc Since argv[0] is interpreted as to mean the app name, by specifying a different name as the first token for the command line i could get the app to use this name instead of the executable name for picking up config & log stuff. I'm not sure if it is possible to get Task Manager to show a process with a different user-friendly name. Wondering how this is accomplished in the Unix world? [btw, this was an effort to simulate that behavior from the Unix side] Thanks for the response, anyway Chen Venkataraman -
How to create a process with a different name?I need to launch an executable multiple times passing in different argument list. Is there a way to use CreateProcess to launch the same executable but it shows in TaskManager as a different name? For e.g. ABC.exe gets launched as A1, A2 & A3. The reason for this is logging & configuration setup uses the process name & it would be easier to manage them with unique names instead of the executable name. Any pointers would be appreciated. TIA Chen Venkataraman
-
How to debug an app that refuses to shutdown?Here's the scenario... I've a VB project that uses COM objects & also opens an ADO database connection. When the app is shutdown, it just hangs... if i try attaching the debugger to the process, i get the dreaded "DM0025 - Error attaching to process" msg taking down the process that i want to debug :mad: What is also strange about the behavior is that if i dont open an ADO database connection, then the app shutsdown cleanly. I've to mention that the COM object also connects internally to an Oracle database. How do you go about debugging this behavior? Any pointers would be appreciated. TIA Chen Venkataraman
-
Strange behavior - affects performanceI've an in-proc COM object that is registered on the client PC from a network share. An app that uses this COM object running out the same network share shows marked performance degradation (upto 2-3 times slow) when compared to running the same app with the COM object registered locally (the dll was copied to a local drive). Neither the app nor the the COM object access any files over the network other than some initial setup that happens at load time. I was expecting a delay only during app load time compared to the local install case, but it turns out that as the network traffic increases, the app starts to lag behind in processing time sensitive events (sometimes upto 20 minutes behind!). Also interesting to note is that as the network traffic reduces, the app starts to catch up & events get handled in timely fashion. Anybody experienced similar behavior wrt COM objects being registered from a network share? Any insights? Chen Venkataraman
-
Looking for light weight databases (performance is critical)We use memory mapped files to share data among a number of cooperating processes & are looking to replace this methodology with a light weight database. Performance is critical. Was looking at couple of databases - - ISAM based C-tree Plus database from FairCom - Btrieve from Pervasive Software Ideally would like the database to run on Windows & Solaris platforms. Does anyone have experience with the above databases & how would you rate them? Are there others that would fit the bill? Any pointers would be appreciated. TIA Chen Venkataraman