|
check that Meta Search engine http://www.searchbug.com and http://www.axmo.com
Kareem Shaker
|
|
|
|
|
I've managed to install and successfully run web services that call numerous components in the Microsoft.Practices.EnterpriseLibrary on my local development box (XP PRO) calling a local instance of sql server.
My production server does not have Visual Studio installed so when I install the Enterprise Library, the code does not compile. So I just copied the compiled modules from my local box to the server.
As a final step, I ran the "Install Services" batch file after all the above and it ran just fine.
However, when I make a call on the production server to the db server (same box), my service complains with 'The Type initializer for "Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataCommandFailedEvent" threw an exception'
Of course this doesnt happen when I run the same code locally.
Any help on this issue would be greatly appreciated.
Rob
|
|
|
|
|
Hi friends,
I have 2 problem regarding Smart phone Windows Application:
1.I want to use multiple Emulators.How to create instance for Emulator.
2.I am adding Webreference for Webservice in my Windows Smart Phone Application.While i am Debugging that Application it works properly.
If i am change to release mode and build that Application,At that time also its not say any compiler error.But if i am go to Projectfolderpath/Bin/Release
and run that project exe,it says the error that method written in Webservice not reflected.It occurs in form where instance for Webservice is created.
Please give the solution.
Regards.,
|
|
|
|
|
I am trying to create a launcher form where I create dynamically several buttons, each of which holds in the Tag attribute,
the name of a form class (i.e. Form1, Form2,....)
After I have the buttons created and also a handler for each button wired to the buttons click event, I want to call the corresponding form and open it. I have a sub called "ActivateFormOnTheFly" from wich I can open those forms.
The problem I found is that I can't come with the right code to open the forms using the button's Tag attribute
The name of the form is available in sender.Tag() of "ActivateFormOnTheFly"
What snippet of code should I write there?
Thans in advance
Private Sub Check4Forms()<br />
<br />
Dim myFiles() As String<br />
myFiles = Directory.GetFiles(Application.StartupPath & "\...\")<br />
<br />
Dim FilePath, FileName, FileExt, File As String<br />
Dim myPath(), myFile() As String<br />
<br />
For Each FilePath In myFiles<br />
<br />
myPath = FilePath.Split("\")<br />
FileName = myPath(myPath.GetUpperBound(0))<br />
myFile = FileName.Split(".")<br />
FileExt = myFile(myFile.GetUpperBound(0))<br />
File = myFile(myFile.GetLowerBound(0))<br />
<br />
Dim FButton As New System.Windows.Forms.Button<br />
<br />
If File.StartsWith("F") And FileExt = "vb" Then<br />
<br />
FButton.Text = File<br />
FButton.Tag = File<br />
Me.Panel1.Controls.Add(FButton)<br />
FButton.Dock = DockStyle.Top<br />
<br />
AddHandler FButton.Click, New System.EventHandler(AddressOf Me.ActivateFormOnTheFly)<br />
<br />
End If<br />
<br />
Next<br />
<br />
End Sub<br />
<br />
Public Sub ActivateFormOnTheFly(ByVal sender As Object, ByVal e As EventArgs)<br />
<br />
End Sub
|
|
|
|
|
So you have the name of the class as a string and want to instantiate and invoke methods? Use reflection. Like
Form f = (Form) Activator.CreateInstance(Type.GetType("your_string_here"));
f.ShowDialog();
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I using vb.net and load the crystal report by using crystalReportViewer.
And when i press the button print which at crystalReportViewer's toolbar.
It will show a print diaolog to me.
Now i want set the printer name "Epson LQ 2180 " as default printer name in that print dialog which belong to crystalReportViewer's toolbar.Before that the printer name as default is "Laser Jet HP 100" which are the default printer in my network.
report.Load("D:Ticket Selection\E-FG Export.rpt")
CrystalReportViewer1.ReportSource = report
CrystalReportViewer1.PrintReport()'This function will show me the print dialog
So i would like to ask....
How to write the coding behind to set the printer name as i want be default in Print dialog?
Cheer Up (^_^)
|
|
|
|
|
How can I insert differently colored strings into ListView control or other (I need so table). Is it possible? I'm programming in Visual Basic.NET. Thanks!!!
|
|
|
|
|
You'll need to draw them yourself, perhaps in a derived class ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
ListViewItem item1 = myListView.Items.Add( "Item1" );
ListViewItem item2 = myListView.Items.Add( "Item1" );
item1.ForeColor = Color.Red;
item2.ForeColor = Color.Blue;
|
|
|
|
|
Hi All,
Can u please tell me how do i store user details in the system in a windows application. i.e. once i enter the details in a windows form the secomd time i open the same form it should display the detials on form load. is there any way? Then please let me know.
Thanks in advance,
Mansi
|
|
|
|
|
|
hey thanks a lot for ur reply...
i gotto do in xml. can u give me an example if possible. not familiar with XML.
thanks again,
mansi
|
|
|
|
|
<pre><applicationSettings>
<add name="Your key"/>
</applicationSettings></pre>
|
|
|
|
|
Why do you NEED To do it in XML ? Does it give you real advantages, or does it just sound cool ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
why not in the registry too ?
most programs use it to store the windows size, position and so on there...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I wouldn't touch registry unless I really had to. It is an option, but IMHO it's not nice. For many reasons, e.g. additional platform dependency, breaks XCopy deployment...
David
David
|
|
|
|
|
I have an example where I have a client and a server. Via remoting I am instantiating a remote object (singleton mode), calling a method on the remote object, which fires an event (using a delegate) back to the client machine. I have created a tcp channel on both the client and the server for bi-directional communication.
If I start the server, then start the client, everything works fine and calls to the server result in an event being fired and sent back to the client.
If I keep the server running, shutdown the client, restart the client listening on the same port, I get the following error:
System.Runtime.Remoting.RemotingException: Requested Service Not Found
I have a feeling this has to do with the remote object lease, but I'm not sure what I need to do in this case.
If anybody could help me, I'd greatly appreciate it.
|
|
|
|
|
I suspect it's got something to do with lease too. Server objects get disconnected from the remoting framework after a particular period of inactivity (no method calls on the server).
I'd suggest overriding InitializeLifetimeServices and returning null. That would keep the server object connected forever.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I have already attempted this and it does not fix the problem. It seems that the keeping the server alive keeps a reference to the client port. Closing the client and then re-opening will re-open that port, but somehow the server cannot communicate via the port.
If I unregister the server channel and then recreate it, it works fine.
|
|
|
|
|
I have resolved this issue. I was attaching event handlers from the client proxy to a remote event, but was not removing the handler when the client shut down. Therefore, the server was still attempting to trigger the remote events to the client, which was no longer alive.
|
|
|
|
|
I see. I guess you're removing the event handlers when the client closes. But what will you do if there are 5 clients for your singleton object and the first subscriber's event handler throws an exception?
I'd suggest manually invoking the event within a try catch block. Something like
protected void OnEventOccurred(...)
{
if (eventHandler == null)
return;
Delegate []delegateList = eventHandler.GetInvocationList();
foreach(MessageReceivedEventHandler handler in delegateList)
{
try
{
handler(this, args);
}
catch(Exception e)
{
}
}
}
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
In my prototype, the event is added during a call to the remote, async process. I am removing the event handler once the event is received on the client proxy and the process has successfully completed. I then raise a local event to a user defined event handler, where they can monitor the status of the remote process, cancel it, etc...
I will also wrap all of the appropriate code in try catch blocks to trap, log and allow successfull recovery of my code.
I appreciate your comments and help!
Mark
|
|
|
|
|
Hi!
I was wondering if it's possible to validate the input given in setup dialogs in a setup project created in VS.NET?
In my setup I've added a Textboxes(A) dialog for the user to input a port to be written into a config file.
I haven't found a way to verify that the input is correct (or that the user even entered _anything_) before feeding it into my custom action.
Is there a way to achieve this?
Thanks in advance for every input,
mav
|
|
|
|
|
There are plenty of articles and samples out there that teach us how to add to Outlook. What about reading data from? I have found a few articles about getting email information and have implemented those into some of my projects. Now I'm faced with reading the calendar information. I have searched hi and low for articles, samples and even discussions by yet to find anything worth while.
I'm sure with the new Interop components there is a way to read a users calendar information do you know or have you come across an article worth reading?? Samples??
|
|
|
|
|
Hi,
Is it possible to measure execution time of methods
of my classes without adding any code to them.
Say I have a class library (without source code) and I
would like to know how long some of it's methods work.
Does .NET runtime allow to obtain list of methods it executed
from some assembly and their execution time ?
Using Reflection namespace I could filter methods I need.
Please, give a hint on it.
Thanks,
Slava
|
|
|
|