Suggestions for a architecture
I have a database table with columns of URLs and datatimes. At the
precise datetime I would like to a perform HTTP Get request to the URL.
There may be multiple requests to different URLs that need to be
performed at the same time.
It doesn't seem efficient to have a service polling the database every
second looking for requests to process.
I have been doing a bit of research into MSMQ and SQL Service Broker in
SQL Server 2005. But the messages seem to be processed in the order
they arrive not on a specific datetime value.
Any pointers for what would be the best design approach? Tag: DataBindings??? Tag: 106365
FileSystemWatcher on startup?
Hi. I am supporting a Windows service that uses FileSystemWatcher to
monitor an inbound directory for new files. If the service is shutdown
and files are dropped to the inbound directory, those files are not
picked up by FileSystemWatcher at service startup.
This is a rare circumstance where the service will be down, but it does
happen occasionally during maintenance windows.
The solution to this problem that is in the code now is that a Timer
has been introduced to watch the directory as well. That forced the
addition of some thread mgmt (lock{}) so that both the timer and the
FileSystemWatcher (on separate threads) don't process the same file.
Is there a way to get FileSystemWatcher to pick files up at startup?
I'd love to bag the Timer (it's always a special feeling ditching
code). :-)
Thanks,
Jeff Tag: DataBindings??? Tag: 106364
Large page faults issue in .net application
I've PerfMon-ed our application for several days now and it
consistently averages 2000 Page Faults/sec, and accumulates on average
about 4 mill page faults during 35 mins. During the same monitoring
time of 35 mins, there is never any sustained occurence of hard page
faults -as a matter of fact, almost on avg 98+ % of the entire time the
app is experiencing soft page faults. The processor rarely ever gets
over 70-80% for a sustained period of 30 sec during the entire 35 mins.
% Time in GC averages 3%.
Besides stats, we also notices that our Working Set gets consistently
trimmed every couple of minutes in the order of 20-30 MB and sometimes
even more. I also see this is directly correlated to the managed
object heap bytes being trimmed as well - exactly the same graph line
behavior. When WS gooes down, available memory goes up. I also see
that the largest number of gc collections are Gen 0s, followed by Gen
1s and the smallest Gen 2s.
We monitored a slew of other Perf counters - so if u need any other
info to help, I can supply the perf counter values readily.
QUESTION - How do I make sense of the page faults being so
excessive...? Can you supply some info and or documentation to help me
determine if this is a good, bad or expected behavior for .NET apps...?
I tried researching in lot of places but no luck to help me. Almost
every doc I find outlines that if you have hard page faults, that is a
bad thing, while soft page faults are ok.
(Sustained period = we selected 30 secs - example -> so if the
%Processor Time is over 80% for 30 secs or more we would get concerned). Tag: DataBindings??? Tag: 106361
msi file copy permission denied
I have an msi installer with a custom action that copies some files to
a directory. It won't copy them if the existing file have RA
attributes, but if the read-only attribute is taken off, then it works
fine.
Don't msi installers run as user? I'm an admin on this box. Tag: DataBindings??? Tag: 106358
ISAPI extension change .Net default stack size
Okay this is ugly, but here it goes.
We have an unmanaged IIS ISAP extension. We use the worker thread approach
and spin up our own threads creating the stack size that we want.
Later in our code we have a C# module that get's executed and we begin
executing managed code here. Inside of the managed code we we start a thread
using the below approach (for timeout). The problem is that there are certin
cases where the new thread we created is running out of stack.
Sure if we had an exe we could use editbin to increase the default size of
the stack. But I don't think this works for dll's.
Is there anything we can do to change the default size of the stack that
will be created in the C# module? It is important to note that the C# module
at the end of the day executes some other unmanaged C++ code. There is no
recursion to eliminate there is just a very structured and complicated
application (in both good and bad ways but we really can't change too much
here).
Our other thought is to rewrite C# module in good old unmanaged C++ so that
we can make calls that allow use to create threads of arbitrary size.
Regards
Frank
// ScriptThread is our class that does the work
ScriptThread st = new ScriptThread(method,null,Thread.CurrentThread,"",null);
ThreadStart threadDelegate = new ThreadStart(st.Run);
Thread newThread = new Thread(threadDelegate);
newThread.Start();
newThread.Join(_nTimeoutSeconds *1000);
newThread.Abort(); Tag: DataBindings??? Tag: 106357
Versioning 1.1/2.0
I could need some advice on how to work with a project that should work
with framework 1.1 and 2.
Currently i work on a VS solution with about fifteen projects within. Most
of them we convert to VS2005 but a few of them are base libraries that are
used in VS 2003 solutions / dotnet 1.1 as well.
To handle this, we now maintain a version of the solution/projects files
for each version.
How can i make sure, that when you work on the VS2005 projects you won't
mess up the code for 2003? Two things i have in mind are
- Configure the base library projects to only use ISO-1 csharp features?
(i don't know even know if that setting is really exactly the same as
dotnet1.1)
- Set all references of this libraries back to the 1.1 framework dlls?
(but i have no glue if that is such an good idea to mix the versions and
then it is compiled with dotnet 2.0 csc anyway)
Did i miss some project setting for the target framework so i could just
say "this specific project has to work with and is compiled/compilable on
framework 1.1"?
btw: for specific code for dotnet2 that honors deprecated/new functions i
have defined a constant on each vs2005 project DOTNET_2 and then #if
DOTNET_2 #else #endif handling in the code.
Isn't there really no way to determine the framework on compile time in
the code? When i think back to C++ times, microsoft placed all kind of
#defines into the headers with most of them noone had an idea what they
could be good for so how come i don't find some that says
"I_AM_DOTNET_2_AND_COMPILED_ON_A_MACHINE_WITH_OFFICE_AND_SQLSERVER_INSTALLED"
or something like that :) Tag: DataBindings??? Tag: 106356
Trouble Selecting a ListViewItem Programmatically
I know it, I know it. It's come up a lot. I've done the Googling, but
the standard answer doesn't do what I expect it to. For the record, the
standard answer is: "Set the Selected property of a ListViewItem to
true." I also know from MSDN that the selection won't really take
effect until the ListView has focus.
My specific problem is that setting item.Select = true doesn't actually
select my item (or at least, doesn't highlight it). I'm implementing a
search feature, and the highlighting is kind of important.
Even more curious, Microsoft's own C# code sample at
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.NETDEVFX.v20.en/CPref17/html/P_System_Windows_Forms_ListViewItem_Selected.htm
(might need to get there through VS2005 documentation) illustrates my
problem exactly. The first list item does not get selected on list
population, even though the code tells it to do so. Selection seems to
work after a click on the button, but not before.
1) What's so magical about that button click?
2) Is this a bug in the framework?
Spanks
ff Tag: DataBindings??? Tag: 106350
App <-> Windows Service
My name is Gabriel
I was reading a lot about windows services. I have a little problem and I
need one of those incredible advices. I'm developing a windows service with
a "System.Timer" to check MessageQueues and do some work I need it to do, is
a kind of monitor. I would like to expose some methods from this service to
make them available through Web Services. I was reading lot of your
solutions but I can't have a complete idea yet, I read some advices to use
Remoting is that ok ? can you tell me how ? or what solution is the best ?
To have an idea how this architecture looks ...
_____ _______________
| WS | <-------> | Windows Service |
--------- --------------------------
Where windows service checks some Message Queues and get all the messages
and "exposes some methods" to do some stuff and I want to use this methods
from some web services.
Thank you in advance,
Gabriel Aizcorbe Tag: DataBindings??? Tag: 106348
Invalid SecureString Error
When loading an online form I get the following:
Server Error in '/' Application
Exception Details: System.ArgumentException: Invalid SecureString
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentException: Invalid SecureString]
Version Information: Microsoft .NET Framework Version:1.1.4322.2300;
ASP.NET Version:1.1.4322.2300
Can anyone explain what I am missing? Tag: DataBindings??? Tag: 106341
Download over HTTP and client caching
I want to build a component that could
download files from HTTP url store them
in temporary internet files and always
check if file modified before download
(using etag and last modify).
I want to be able to use the component in
windows forms applications or NT Services.
I know that wininet.dll does something like
this, but does not work very well in NT service
and is internet explorer cache options dependent.
(I don't want a dependent component)
Can you point me the right way to achive my
objectives?
Thanks in advance Tag: DataBindings??? Tag: 106338
Uri with "@" in username
Hello,
I am trying to create a Webrequest. The used Uri is something like
"http://username@domain.com:password@www.shfgshfge.com".
Note that the username contains an "@"-character.
I tried two ways. Neither does work.
1. Directly creating an Uri:
Uri u=new Uri("http://username@domain.com:password@www.shfgshfge.com");
It fails with an System.UriFormatException (Something like "The hostname
cannot be parsed.")
2. Using an UriBuilder:
UriBuilder ub=new UriBuilder();
ub.Host="www.shfgshfge.com";
ub.Scheme="http";
ub.Path="/";
ub.Username="username@domain.com";
ub.Password="password";
Uri u=ub.Uri;
It fails with the above error.
Unfortunately, the UserInfo property of Uri is readonly.
How can I generate a valid Uri from this string and subsequently use it in a
WebRequest?
TIA Tag: DataBindings??? Tag: 106336
System.Xml.Serialization - deserializing xml to types created in dynamic assembly
Hi All,
I've been working on a saved dynamic assembly that holds all the types
and corresponding xml serialization attributes I need to deserialize
xml documents into objects.
You might wonder why I would choose a dynamic assembly over simply
coding the types at compile time - the simple answer is I don't know
what the types will be before hand and I only have an xml schema (from
which I build the dynamic assembly) with various attributes that change
frequently.
Since the schema only defines data types (methods,events,delegates
could probably be defined within xs:appinfo tags but in my case they
are not), I needed a way to add functionality to these dynamically
created classes which were otherwise, nothing more than just data
stubs.
The method I chose was to define (at compile-time) abstract base
classes from which classes in my dynamic assembly could inherit. Now
these simple data-stub classes had a complement of methods to enable
them to do more than simply hold data in fields.
Unfortunately, it seems that since my dynamic classes now inherit from
classes defined at compile-time, the xml serializer gets confused (see
error and stack trace below).
It worked fine before I added the inheritance - maybe I need a
reference (somehow) to the hardcoded assembly containing the types I
inherit from in my dynamic assembly.
Any suggestions? Thanks in advance, Rein
[[error and stack trace]]
"An unhandled exception of type 'SystemIO.FileNotFoundException'
occurred in mscorlib.dll.
Addtional Information: File or assembly name [xxxxx.dll], or one of
it's dependencies, was not found."
stack trace:
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String
codeBase, Boolean isStringized, Evidence assemblySecurity, Boolean
throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,
Boolean stringized, Evidence assemblySecurity, StackCrawlMark&
stackMark)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef, Evidence
assemblySecurity)
at System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly()
at System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly()
at System.Xml.Serialization.Compiler.Compile()
at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[]
xmlMappings)
at
System.Xml.Serialization.XmlSerializer.GenerateTempAssembly(XmlTypeMapping
xmlTypeMapping)
at System.Xml.Serialization.XmlSerializer..ctor(Type type, String
defaultNamespace)
at System.Xml.Serialization.XmlSerializer..ctor(Type type) Tag: DataBindings??? Tag: 106334
Uniformaty
Now I know that VS2005 has master pages and webparts etc etc. However, at
present I am forced to work with VS2003 so I have a couple of basic
questions related to the subject matter for which I am hoping to acheive
inspirationan and or direction.
I want to create my new site with a high degree of consistancy and
managability. The perfect way to do this is to choose something other than
asp.net 2003 to do it in, like I dont know , lets say front page for example
where I can use dynamic templates to create editable areas much the same as
I do on 2005 ( If i were able to use it ). But thats not the case.
So, Im trying to devise a way to acheive this. As far as I am aware, I cant
inherit aspx forms, so this leaves me with ( AFAIK ) creating a template to
copy from and then altering the code for each new page.
I dont want to use Includes or Frames, OR MS Positioning, so Im thinking
about using Flow layout panels and adding custom controls to do the menus
etc.
Does anyone have any pearls of wisdom for me before I go ahead and get
myself in a whole heap of trouble ?
PS: If any of my assertions above are incorrect, Im sure ( and hope ) that
someone will let me know.
--
Best Regards
The Inimitable Mr Newbie º¿º Tag: DataBindings??? Tag: 106332
RTM .Net SDK 2.0 Quickstart SQL Express Fails
Intallation of MSDN release version of .Net SDK 2.0 tries to install SQL
Express.
This fails as follows:
10:09:33 AM Tuesday, November 08, 2005: [Fail] Config_SSE_INST_Install: SQL
Express service install (failed): [Fail] Config_SSE_INST_Install: SQL Express
service install (failed). The process did not return a success value.
ExitCode: 70036 Command: 'C:\Documents and Settings\john\Local
Settings\Temp\SQLEXPR32.exe -q /norebootchk /qn reboot=ReallySuppress
addlocal=all SCCCHECKLEVEL=IncompatibleComponents:1 instancename=SQLEXPRESS'.
Anybody have an idea why?
--
J. Tag: DataBindings??? Tag: 106331
OT: Find pattern in sound
Hi,
do you know any sw, whis find pattern (+- %) in specific sound file and
retur position
thc Tag: DataBindings??? Tag: 106322
encrypting/ decrypting xml based dataset with RSA
My webdatabase has RSA encrypted Credit Card info which i download to
my windows app via a webservice. A dataset in the windows form code
then decrypts the data with a private key and displays on the form.
I want to create a cached version of the data in xml, therefore the cc
data has to be re-encrypted before it is saved to the local drive. To
do this I have both pub and private keys with the user app on their
PC's. This is where i seem to have a problem as when the data is
re-encrypted it changes.
My encryption/ decryption code is as follows:
###################################################
Function RSADecrypt(ByVal instring As String) As String
If instring.Length > 0 Then
Dim RSA As RSACryptoServiceProvider = New
RSACryptoServiceProvider(1024)
Dim sr As StreamReader = New StreamReader("RSAKeyPriv.xml")
Dim s As String = sr.ReadToEnd()
sr.Close()
RSA.FromXmlString(s)
Dim inp As Byte() = Convert.FromBase64String(instring)
'This always throws an exception "invalid key" :(((
Dim outp As Byte() = RSA.Decrypt(inp, False)
Return System.Text.Encoding.Unicode.GetString(outp)
RSA.Clear()
Else
Return instring
End If
End Function
Public Function RSAEncrypt(ByVal instring As String) As String
Dim RSA As RSACryptoServiceProvider = New
RSACryptoServiceProvider(1024)
Dim sr As StreamReader = New StreamReader("RSAKeyPub.xml")
Dim s As String = sr.ReadToEnd()
sr.Close()
RSA.FromXmlString(s)
Dim inp As Byte() = System.Text.Encoding.Unicode.GetBytes(instring)
Dim outp As Byte() = RSA.Encrypt(inp, False)
Return Convert.ToBase64String(outp)
RSA.Clear()
End Function
###############################################
my dataset manipulation to decrypt the data so it can be displayed on
the form is as follows:
#################################
Public Function SyncOrderHeader() As DataSet
Try
dsH = ws.SyncOrderheader
If File.Exists("orderheader.xml") Then
Dim cache As New DataSet
cache.ReadXml("orderheader.xml")
' synchronize the data with cached file
If (cache.HasChanges()) Then
dsH.Merge(cache.GetChanges())
'ws.UpdateCustomers(dsH)
dsH.AcceptChanges()
File.Delete("orderheader.xml")
End If
End If
Catch er As Exception
MessageBox.Show(er.ToString)
online = False
StatusBar.Text = "Working in offline mode"
' try to get the data from the cache file
If (File.Exists("orderheader.xml")) Then
dsH.ReadXml("orderheader.xml")
End If
End Try
Try
dsH.Tables(0).TableName = "OrderHeader"
Dim r As DataRow
For Each r In dsH.Tables(0).Rows
r.Item("cc_Type") = RSADecrypt(r.Item("cc_Type"))
r.Item("cc_OwnerName") = RSADecrypt(r.Item("cc_OwnerName"))
r.Item("cc_ExpiryDate") = RSADecrypt(r.Item("cc_ExpiryDate"))
r.Item("cc_StartDate") = RSADecrypt(r.Item("cc_StartDate"))
r.Item("cc_SecDigits") = RSADecrypt(r.Item("cc_SecDigits"))
r.Item("cc_IssueNumber") =
RSADecrypt(r.Item("cc_IssueNumber"))
r.Item("cc_CardNumber") = RSADecrypt(r.Item("cc_CardNumber"))
Next
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
Return dsH
End Function
##########################################
When my app closes the cc columns in the dataset are encrypted again
using:
###########################################
Dim r As DataRow
For Each r In dsH.Tables(0).Rows
r.Item("cc_Type") = RSAEncrypt(r.Item("cc_Type"))
r.Item("cc_OwnerName") = RSAEncrypt(r.Item("cc_OwnerName"))
r.Item("cc_ExpiryDate") = RSAEncrypt(r.Item("cc_ExpiryDate"))
r.Item("cc_StartDate") = RSAEncrypt(r.Item("cc_StartDate"))
r.Item("cc_SecDigits") = RSAEncrypt(r.Item("cc_SecDigits"))
r.Item("cc_IssueNumber") = RSAEncrypt(r.Item("cc_IssueNumber"))
r.Item("cc_CardNumber") = RSAEncrypt(r.Item("cc_CardNumber"))
Next
###########################################
Any ideas why this wouldnt work? Tag: DataBindings??? Tag: 106321
Security settings for intranet zone
Hi,
I have a problem executing a managed application from a server's share -
hopefully, someone can give me a hint. The application and all DLLs are
signed with a key, therefore have a strong name.
Now, I was assuming that if I create a code group under the
"Organization" level with that strong name as criterium and the
FullTrust permission set, my assemblies should be able to access all
ressources (including reflection which is causing all the trouble); but
when executing the application, I get a SecurityException. I tried
setting that policy to LevelFinal and Exclusive, but still that nasty
SecurityExceptions keep popping up. The only way I found to make it work
is when I set the LocalIntranet zone security setting to the highest
level. But of course, customers will not be wanting to grant full access
to just any assembly on the intranet.
Therefore, my questions are:
1. How does the zone security setting affect the runtime policies?
2. How can I grant my application FullTrust permission set, but only my
application?
Thanks for any hints on this!
Roland Tag: DataBindings??? Tag: 106317
Win32Exception on calling myProcess.start() method
Hello,
Probably this question has been asked yet, but I can't find any answer
to my problem.
I have an ASP.NET application, which call a method which has to launch
a batch. To do it, I use an instance of the Process class. But when I
try to execute the start() method of this instance, it throws an
exception : " Win32Exception (0x80004005): Access is denied"
I think there is a way by using the System.Security.Permissions
namespace, but I can't find how to do it.
For information, when I change the identity of the pool which support
this application in IIS and set it to an administrator, it works ...
but I'd prefer not to do it ;)
many thanks Tag: DataBindings??? Tag: 106316
Distributing .NET Framework 1.1 SP1
Hi!
I am about to distribute .NET Framework 1.1 SP1 to a bunch of clients. I
thought that there were a redist version of the framework including SP1, but
after looking around this doesn't seem to be correct.
Can someone verify this?
My conclusion is that i have to dist .NET Framework 1.1 (dotnetfx.exe) as
well as SP1 (NDP1.1sp1-KB867460-X86.exe)?
--
/JockeB - Developer Tag: DataBindings??? Tag: 106306
Is it a BUG in C# compiler ?!!!!
Hi All.
I faced with strange behavior of C# compiler - in some cases it generates
not working code!
I mean code that lead to the exception - System.InvalidProgramException:
Common Language Runtime detected an invalid program.
The situation is following - 3rd vendor library generates a class that
contains too big InitializeComponent method (copy-paste of
InitializeComponent method to empty text file gives us 23.100 lines and size
= 1.9mb). When calls this method is called application immediately crashed
with the message - "System.InvalidProgramException: Common Language Runtime
detected an invalid program."
Content of InitializeComponent is similar to such methods in Windows.Forms
or Asp.Net application - there are initializations of components properties
ans so on - nothing special, just lot of assignments; no local variables -
ony class members used.
Just by a guess I tried to split up that method to more small pieces of
code - InitializeComponent1, InitializeComponent2 and so on. After that
mentioned error disappeared - all things begin to work fine.
I tested this case on 3 different computers - this error is stable (btw, I
my computer is Pentium4-3GHz/1Gb RAM/120Gb HDD, then I do not think that
error could appears because of weak computer).
One more case I tested - Debug and Release builds of that application -
mentioned error appears constantly only in Debug build, Release build of the
application works fine.
And one more interesting thing - this error stable appears in VS.Net 2003
and VS.Net 2005 Beta2.
Then is could be a problem of new VS.Net too.
My questions are:
Is it a BUG in C# compiler? Is it limitation of compiler? Where such
limitations described?
Should I think my conclusion about reason of this error (I mean - too many
code in one class method) is correct?
Or perhaps you could see any other possible reasons of the problem? Which?
Could we expect Microsoft to release the patch in the nearest future?
Or should we ask 3rd vendor to implement the workaround I found (I mean -
splitting up big method to smaller)?
The problem is very serious for us, please help!
WBR,
Dmitry. Tag: DataBindings??? Tag: 106305
Another Obsolete method RegisterClientScriptBlock
The replacement is .ClientScript.RegisterClientScriptBlock(type as
<type>,key as <string>, script as <string>)
What is the type parameter looking for? There is no enumerated list and
documentation is no help.
Thanx,
--
- Robert Beaubien
- President
- Kool Software
- Tag: DataBindings??? Tag: 106298
Configuration Obsolete method
My converted application is generating warnings for the following line, but
I can not find any system.configuration.configurationManager.AppSettings
items. What am I missing?
SqlConnection1.ConnectionString =
System.Configuration.ConfigurationSettings.AppSettings.Get("ConnectionPrimary")
Warning 13 'Public Shared ReadOnly Property AppSettings() As
System.Collections.Specialized.NameValueCollection' is obsolete: 'This
method is obsolete, it has been replaced by
System.Configuration!System.Configuration.ConfigurationManager.AppSettings'
D:\VS2005\Projects\NVC\NVCArmls\ArmlsDAL\ArmlsUsers.vb 22 43 ArmlsDAL Tag: DataBindings??? Tag: 106295
Dumbass Dependancy Chain
Hi
I cant install .Net 2.0 because of an error with the Windows 3.0 Installer,
this in turn means i cant install Sql Server 2005 Express Edition. Does
Microsoft seriously expect that Im going to open myself up to this kind of
bullshit dependancy chain for every copy of my software I sell? Not likely.
Seems to me the support costs of this 2.0 model alone would eat through any
profit I might make. Maybe those VB6ers do have a point.
TM Tag: DataBindings??? Tag: 106292
TextWriterTraceListener
I'm using the TextWriterTraceListener that is configured via an app config
file. This works great when there's only 1 instance of the applciation
running. If there are more than 1, then I get an access denied because
another process has the file locked. I could add the
TextWriterTraceListener in code at runtime and specify a unique file name
but I was hoping to keep the configuration in the app config file. What is
the best way to handle using the TextWritrTraceListener in this scenario?
Thanks,
Eric Tag: DataBindings??? Tag: 106289
Communication via IPC
Hello,
I've been reading up on IPC and looking at sample code, and I can't seem to
figure out how to actually accomplish communication from a client to a
server. I understand the concept of a server hosting a dll which contains a
method that the client can call. However, how can the server also obtain a
reference to the same object? I want the client to be able to send a message
that makes it to where the server can use it.
To clarify my question, the examples I've seen so far have been like this:
Server creates a channel exposing Class A.
Class A contains a handy-dandy method that can multiply two ints.
Client creates a channel to be able to instantiate a new Class A object and
call its methods.
But how does Client get a message all the way back to Server?
I tried creating a client channel in the server itself, but I can't make
that work. I get an exception saying that there is already a registered
object for that channel. I also tried creating an instance of Class A in the
server, but it was a completely separate object that did not see messages
that the client put into it.
To give some context, I have a Windows service that needs to be controlled
via a Windows Forms app. As I understand it, to get messages to the Windows
service, I would create a channel there and have the Forms app be the client.
But how do I actually retrieve the messages from within the service?
Apparently IPC is the way to go for on-box communication, but I haven't seen
any examples showing how to get a client and server to exchange actual
messages. Please help!
Brian Tag: DataBindings??? Tag: 106286
DataGrid Troubles
I have used in my c# code a DataGrid in various kinds, but in any cases when
attempt to double click on vertical scrollbar the result is impredictable:
the grid is resized in some strange ways and ther's no way to get back in
the past size.I had analized MESSAGES from controls and didn't appears any
kind of Resizing messages.
Somebody can help me about that trouble ??
Thanks a lot Tag: DataBindings??? Tag: 106282
ANN: Reminder: Online chat tomorrow regarding Smart Device Programming
Hello!
Just a note that we'll be hosting an online chat tomorrow concerning Smart
Device Programming with Visual Studio. The title on MSDN says Visual Studio
.NET 2003, but now that VS2005 has shipped those questions should be fair
game as well! Members of the development teams (.NETCF, Visual Studio for
Devices and SQL Mobile) will be on hand ready to answer your questions, so
bring 'em on!
November 8, 2005
10:00 - 11:00 A.M. Pacific time
Additional Time Zones:
http://www.timeanddate.com/worldclock/fixedtime.html?year=2005&month=11&day=8&hour=10&min=0&sec=0&p1=234
Chat: Smart Device Programming with Visual Studio .NET
Description: Please join the members of the .NET Compact Framework and
Visual Studio product groups in this live chat regarding the .NET Compact
Framework and the Smart Device Programming features of VS.NET. The .NET
Compact Framework brings the world of managed code and XML Web services to
smart devices, and it enables the execution of secure, downloadable
applications on devices such as personal digital assistants (PDAs), mobile
phones, and set-top boxes. Please come prepared to ask the tough questions!
To join this chat, please log on via the main MSDN chat page at:
http://msdn.microsoft.com/chats
--
Thanks!
Michael Fosmire
MVP Lead, Windows Embedded/NetCF
This posting is provided AS IS with no warranties, and confers no rights. Tag: DataBindings??? Tag: 106280
Excel Events
Hi Group,
VB.Net I'm displaying the names of the open Excel workbooks in a listbox on
my form. It looks as if it might be possible to monitor Excel's events
(OpenWorkbook in this case) and update my listbox.
If this is possible, could someone could point me in the right direction for
some reading material or provide some code as to how the mechanism works,
that would be great.
Thanks,
Kenneth Hutson
San Antonio, TX Tag: DataBindings??? Tag: 106278
OutOfMemoryException in service but not in application
I have a C# app which calls the RTC 1.3 API through the interop wrapper.
The app will make a large number of logins for different users.
If I run it as a standalone app, it is fine and that I can make more than
1000 logins.
But if I run as a Windows service, I will get OutOfMemoryException always
around at 420 logins.
System.OutOfMemoryException: Not enough storage is available to complete
this operation.
at RTCCore.RTCClientClass.InitializeEx(Int32 lFlags)
What could be the difference between running as a service and a standalone
app?
Both run under the same user account.
Thanks. Tag: DataBindings??? Tag: 106274
Routing System for buildings
Hi,
I have got a problem. I want to design something like a navigation/routing
software for a building (like: I am in room A and I want to room E --> route!)
How would you do it or is there a software for that for ASP.NET?
thx
juvi Tag: DataBindings??? Tag: 106260
Clickonce CreateFileAssociation
Hi,
I don't konw I got the right discussion group, but here goes:
I have a deployment issue with .NET 2.0 and clickonce. My application uses a
few different filetypes, which should be registered so that the application
user can click on them and the files will be opened in the application.
I know that this is not possible by default i clickonce, but is it possible
to use a mix of msi and clickonce or somthing? If so how? Tag: DataBindings??? Tag: 106258
Visual Studio 2005 Final release and .Net Framework 2.0
Hi,
Where can I get the Visual Studio 2005 Final release and .Net Framework
2.0.
I have a valid MSDN subscription ID from my organisation.
Best Regards,
Sanjeev Tag: DataBindings??? Tag: 106257
Windows Services, COM objects and user accounts
We have a windows service that runs under SYSTEM which launches a COM object.
Is there any way that an application running under a user account can access
that COM object, and if so, how is it done ? Currently, we get an automation
error whenever the user application attempts to access the COM object.
Many thanks for any help
Cliff Cooley Tag: DataBindings??? Tag: 106256
.Net and MS Access
How do I invoke an Access report from a .Net program?
My customer has Access 2000 and I have Access 2003. Tag: DataBindings??? Tag: 106250
.Net Magazines or news resources -- what's popular?
Hi guys,
I'm getting started with learning asp.net framework (decided to go the
C# route), but with Microsoft constantly changing the products all the
time, is there any .Net magazine or resource I can subscribe to to keep
up-to-date with what's going on? Even an emailed newsletter, RSS feed,
anything that'll help me stay in the loop of Microsoft's ideals. Where
do you guys get the latest news and info about these changes?
Just curious --
Sam Tag: DataBindings??? Tag: 106243
Does Language Matters?
Hello,
I am developing an application on my system which has .NET framewor 1.1
(English) installed. Then I am trying to run the same application on my
another system which has .NET 1.1 (German) installed. Now the problem is
there are few operations with decimal nos. I mean (5.0 + 3.6) and so on...
But these operartions are performed as 50+36 as in europe we use ,(comma) to
seperate nos. Now my problem is how can I make my app universal given these
constraints?
Please help me ASAP... Tag: DataBindings??? Tag: 106228
Datagrid with checkbox ( multi selection)
Hi,
I trying to create a datagrid that allows multi selection. So I created a
first checkbox column where the user will click selecting the row.
But in runtime, the checkboxes from this column are always disabled.
I tried adding a new column in the datatable and adding a new style
column in the datagrid. The result is always the same.
Thank you,
Roby Eisenbraun Martins Tag: DataBindings??? Tag: 106222
Sleeping thread problem when closing app
I use Thread.Sleep to cause my background threads to for 500ms. The
structure of the thread is:
do
{
...
-- code --
...
Thread.Sleep(500);
} while (!closing)
Now my problem is that occassionally when my application is exiting it just
hangs and won't close. In my FormClosing event I have the following code:
closing = true;
backgroundThread.Interrupt();
backgroundThread.Abort();
But it doesn't seem to stop the problem. And when the background thread
doesn't sleep the problem doesn't occur, but its not an option because CPU
usage is high if it doesn't sleep.
How do I fix this?
Cheers... Tag: DataBindings??? Tag: 106221
Combo Box Selected Value changed event Gives Unhandleed exception.
Hey All,
What we are trying to achieve is, when Selected value changed event is fired
for a combo box, then we are trying to close the current form and display the
new form. The forms are mdi child of a MDI form named as MasterForm.
The code being used to close the current form and open the new form is as
follows:
lForm = new TestForm
lForm.MdiParent = Me.MdiParent
lForm.Show()
Me.Close()
Problem is on Selected value changed event, we get an unhandled exception,
Object reference not set to an instance of Object. I debugged and found that
while closing the current form, its throwing the error.
Can anyone please suggest this behaviour, is it a known issue.
Thanks,
Vinay Kant Tag: DataBindings??? Tag: 106218
Errror With mscorlib.dll - Please Help me
Everytime I Use ImageList Control to add Image that has more than 256Bits
colours and then an Exception throws at the line:
imageList1.ImageStream =
((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")))
All I have to do is create new Windows Application Project, then add an
ImageList Control to the form and then add an image likes 16bit colors to
Imagelist. Then Run.
When Run, an Run-time exception has thrown, the contain of exception:
An unhandled exception of type 'System.Reflection.TargetInvocationException'
occurred in mscorlib.dll
Additional information: Exception has been thrown by the target of an
invocation.
After that, every time I try to run Search in Windows Explorer, it returs
errror:
Unexpected Errors
Action could not be completed.
Anyone can show me how to solve this problem. I'm in hurry
I'm using Windows Server 2003, Visual Studio .NET 2003 and Framework version
v1.1.4322.
Thanks a lot. Tag: DataBindings??? Tag: 106211
Range of Values
Does .Net framework has class that
can support the computation of range of values?
For example, if I have a range of [1.23,4.45)
and i can subtract a range (1.5,2.3]
and will get a range of [1.23,1.5], (2.3,4.45)
Thanks. Tag: DataBindings??? Tag: 106209
text box and SqlDecimal datatypes
Hi all, I have a DAL which takes in a value as shown below ready for my
MSSQL stored procedure.
protected SqlDecimal _annualLeave = SqlDecimal.Null;
public SqlDecimal AnnualLeave
{
get {return _annualLeave;}
set{ _annualLeave = value;}
}
I have a problem where when I try to pass in information from a textbox on a
ASP.NET page OR Winform the *damn* thing gets rounded to an Integer!
I thought I could just go..
((System.Data.SqlDecimal)AnnualLeave.Text)
Where AnnualLeave.Text is the value of my textbox on my form, but I received
"Cannot convert type 'string' to 'System.Data.SqlTypes.SqlDecimal" error
(Which is fair enough)
So, I tried
((System.Data.SqlDecimal)(Convert.ToDecimal(AnnualLeave.Text))
but for some reason, this rounds the number to an integer!! e.g. 12.2
becomes 12!!!!!
Can someone please tell me what am I doing wrong here, it's been a long day
:P
Thanks
Mark Tag: DataBindings??? Tag: 106205
Visual Studio 2005 Question regarding Multi Framework support.
I heard somewhere that you can use the Visual Studio 2005 IDE to continue
work on VS2003 applications.
The reason for my question is I am rebuilding my machine this week and I
want to know if in need to install both VS2003 and VS2005 IDE's.
Thanks,
Red Tag: DataBindings??? Tag: 106204
ListView columns resizing
Hi,
Is there a way to get notified when the user tries to resize a column in a
ListView ( set for Details view).
Thank you Tag: DataBindings??? Tag: 106196
How to determine application to launch
How can I determine the correct type of application to launch from a file
extension, in C#?
I would prefer not to have to get a user to find the application executable. Tag: DataBindings??? Tag: 106191
Custom Compile Time Attributes?
I am trying to implment some business level user authorization in my current
.net 1.1 app. In C#, I would like to do something like:
[AuthorizationRule( "SomeRuleName" )]
public void MethodRequiringAuthorization()
{
... some code that requires authorization
}
But then have this code changed at compile time to something like:
public void MethodRequiringAuthorization()
{
if( Principal.Authorize( "SomeRuleName" ) )
{
... some code that requires authorization
}
}
Is there a way to do this? If not, is there some other way I can accomplish
the desired effect which is to decorate code with authorization rules
instead having to actually code it?
TIA// Tag: DataBindings??? Tag: 106179
SaveFileDialog
Hello,
I am programmatically creating a System.Windows.Forms.SaveFileDialog.
Everything works fine, however, I want to be able to detect when somebody
changes the filter property. Basically, I want to know when the file
extension is changed by the user so that I can automatically update the
filename property to have this extension at the end of the filename.
However, I can't seem to find some type of onfilterchange event to handle
this.
Does anybody have any ideas?
Thanks,
-- John Tag: DataBindings??? Tag: 106174
1.1 runtime required?
Scenario: i have some applications (exe and dll) compiled in Vs2003 using
default options.
On a clean machine, if i install only .net framework 2.0, will these
applications run? Tag: DataBindings??? Tag: 106169
Compisite Custom Controls - Event Handlers
Hi,
Im doing something really stupid here, But I cant see the wood for the
trees. This is some of the code for my custom composite control. It renders
fine and the buttons do cause a Post to occur. But the Click Handlers are
not are never receiving a click event. I note that the name of the control
is _ctl0 or 1 etc.
<span id="MyDamnButton1" style="width:192px;Z-INDEX: 101; LEFT: 16px;
POSITION: absolute; TOP: 24px"><input type="submit" name="_ctl0"
value="Submit Me" /><input type="submit" name="_ctl1" value="Submit Me 2"
/></span>
What could I have done wrong ?
------------------------
Protected btnSubmit As New System.Web.UI.WebControls.Button
Protected btnSubmit2 As New System.Web.UI.WebControls.Button
Protected Overrides Sub CreateChildControls()
btnSubmit.Text = "Submit Me"
btnSubmit2.Text = "Submit Me 2"
Controls.Add(btnSubmit)
Controls.Add(btnSubmit2)
AddHandler btnSubmit.Click, AddressOf Me.Click1Handler
AddHandler btnSubmit2.Click, AddressOf Me.Click1Handler2
End Sub
Private Sub Click1Handler(ByVal sender As System.Object, ByVal e As
System.EventArgs)
Dim a As Int16 = 0
End Sub
Private Sub Click1Handler2(ByVal sender As System.Object, ByVal e As
System.EventArgs)
Dim a As Int16 = 0
End Sub
--
Best Regards
The Inimitable Mr Newbie º¿º Tag: DataBindings??? Tag: 106167
Is there a definitive and exhaustive examination of the usage of
Control.DataBindings?