|
Hello,
I'm using .NET 2.0 and setting up a remoting interface for a Windows Service. I like to be in control of how other applications use the service so I wanted to specify that client applications should only use the remoted object via an interface. My question is - Can I setup a client activated object so that clients don't have to know about the object class type (beyond the interface)?
So far I have made this work for the server activated (singleton) styled remoted object. This works fine using (ISomeInterface) Activator.GetObject( SomeInterfaceType, ....), but when I try something similar with Activator.CreateInstance( SomeInterfaceType, ... ) the system complains I need a MarshalByRefObject type . I understand why it's refusing to activate the object, but I'm wondering if there is a way around this.
BTW: If you are wondering why I want to use Client activated, it's because there is a future possibility of per client session information that needs to be evaluated per call. If each client has it's own object, then the instance can contain the session information. If I had to store per client session information in a singleton it would involve a lot more management complexity (add more code to maintain, slow things down at runtime, etc..).
Assert(this);
|
|
|
|
|
Hi
How can I transform a C++.Net code to a VB.Net code?
I don't want to run a C++.Net code in Visual Basic.Net.
I can program by VB.Net and I learned this language, but now I find a code which is important for me. I want to understand this code.
can you help me?
bye
modified on Saturday, June 21, 2008 6:14 AM
|
|
|
|
|
Reza12 wrote: How can I transform a C++.Net code to a VB.Net code?
Why would you want to? I'm curious. If the C++ code is CLS Compliant, then you can run it directly in any other CLS compliant environment.
|
|
|
|
|
Hy there,my problem is this: I have a shared assembly(dll) that must be used by many applications and I don't wan't to install it in GAC,I wan't to update it manually. So i need it to be 2 directories UP of the applications(..\..\). To achieve this,I had to sign the assembly with a SNK. That wasn't a problem,the problem is that this shared assembly has satellite assemblies for 3 languages. When I run my application,it finds the shared assembly 2 directories up,but it does not find it's its satellite assembly. I noticed that it searches for the satellite next to my app satellite assemblies. Why is that? the satellite assembly should be linked to the shared assembly,so it should look for it,for culture fr for instance, in [shared_assembly_location]\fr
If any one can help me,thanks in advance.
|
|
|
|
|
Hi All,
Could some one explain the three types of JIT
Thanks in Advance
Dana
|
|
|
|
|
|
|
Simply rewording your question like this doesn't answer the question posed to you.
|
|
|
|
|
Which 3 types of JIT compilers?
|
|
|
|
|
My question Is it possible to generate report in hindi (language) format( using anything crystal report or report services of sel server) . Every thing will be in English only report language be in hindi.
|
|
|
|
|
When I select:
1) File-->New-->New Project
2) Other Languages
3) Visual C#
4) Smart Device
One of the selections is 'Windows CE 5.0'
I have installed the CE 6.x SDK, and I so see:
'Platform Builder for CE 6.0'
Have they change the names? Should'nt I also be able to install so that I see 'Windows CE 6.0' under:
1) File-->New-->New Project
2) Other Languages
3) Visual C#
4) Smart Device
If so, how? I have searched all over the web and I not been able to find the answer.
I am go to work through the book 'Microsoft Mobile Development Handbook', but my ultimate target will be an AIM processor running a .NET versin of CE 6.0.
Thanks,
|
|
|
|
|
Hi
I need to track my employee's internet activity. This needs to link to job cards.
Any idea where to start
Regards
Progress is a process , so value it
|
|
|
|
|
You want to use .NET to write a program to do this ?
I'd say your best plan is to hire people you can trust.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
True
But this is Africa my Friend. And I'm in the mood for a challange
Regards
Progress is a process , so value it
|
|
|
|
|
Check out oDesk. They have an application that takes screen shots at regular intervals, exactly for monitoring work. I'm sure it will have something for the internet as well.
|
|
|
|
|
I've just started to work on a windows service with distributed transactions using com+ and have stumbled upon a design question: When is a transaction started?
Is it when the class is created or when a method is invoked. Consider the example below:
[Transaction(TransactionOption.Required)]
public class TransactionTest : ServicedComponent
{
public TransactionTest()
{
}
public void BeginLoop(int count)
{
for (int i = 0; i < count; ++i)
MakeTransactions();
}
[AutoComplete]
private void MakeTransactions()
{
if ((new Random()).Next(10) < 4)
ContextUtil.SetAbort();
else
ContextUtil.SetComplete();
}
}
A simple transaction based class with a method that is being invoked multiple times internally. Are all calls to MakeTransactions() in the same transaction or is a new transaction started each time SetAbort/Complete is invoked?
|
|
|
|
|
Short answer is I don't know. I know there is a difference between starting a transaction and participating in one. The code you posted could result in only a single transaction being started and multiple participations in the transaction.
There are many resources available on MSDN for the Transaction topic that you may want to dig into.
led mike
|
|
|
|
|
I can only point you to Tim Ewald's excellent book Transactional COM+[^]. Note that this only covers COM+ up to Windows 2000, and the little information it has on .NET is out of date (it was published in 2001), but the core information is very much correct.
DoEvents: Generating unexpected recursion since 1991
|
|
|
|
|
I have registered a assembly in GAC.
The assembly can be used by multiple windows applications.
i have update the assembly and registered new version in th GAC.
But my windows applications are using old assembly only.
Is it possible to use new version assembly whenever its update.
How to automate this process?
How can I achieve this???
|
|
|
|
|
What happens if you remove the old version from the GAC ? I would expect your apps by default to use the version they were built with, unless it's not present, then it may choose another version.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I'm working with some web references in an application which works fine on many clients. But at clients using proxy networks the whole system fails. I tried several ways of gettting the connection established but no luck. If the client fills in the .asmx file location in it's browser it sees the default webservice information page. But some how the connection times out because of authorization to fullfill the request.
For testing purposes I made a simple Form application with 2 buttons, some textboxes (the client Proxy settings) and 1 output textbox to catch the exceptions. I attached with VS2008 a web reference "WebClient". the webservice single task in this sample/test is to get the server DateTime. Every time the client tries to connect it receives a time out exception.
The two buttons have the folowing Click functions, the first gets the settings from the client automatically and in the second button action i asked the client to provide his proxy settings first and confirm by pressing the button. Both buttons sent back an exception. See a bottom of the message.
AnY help is appreciated,
private void btnProxyAuto_Click(object sender, EventArgs e)
{
WebClient.webUser myService = new coProxy.WebClient.webUser();
myService.Proxy = System.Net.WebRequest.DefaultWebProxy;
myService.Credentials = CredentialCache.DefaultCredentials;
try
{
DateTime dt = myService.SyncDB();
AddLinesTextbox("1. Webservice Auto Detect Proxy Connection success");
AddLinesTextbox("1. Server time: " + dt.ToLongDateString());
}
catch (Exception ex)
{
AddLinesTextbox("1. Webservice Auto Detect Proxy Connection failed");
AddLinesTextbox("1. " + ex.ToString());
}
}
private void btnProxyAndCredentials_Click(object sender, EventArgs e)
{
if (!TestInput())
{
AddLinesTextbox("2. Please fill in the username and password");
return;
}
if (tbProxyAddress.Text.Length == 0)
{
AddLinesTextbox("2. Please fill in the proxyserver address.");
return;
}
if (tbPort.Text.Length == 0)
{
AddLinesTextbox("2. Please fill in the proxy port.");
return;
}
int pPort = 80;
try{
pPort = Convert.ToInt32(tbPort.Text);
}
catch(Exception ex){
AddLinesTextbox("2. No valid port.");
AddLinesTextbox("2. " + ex.ToString());
}
System.Net.WebProxy proxyObject = new System.Net.WebProxy(tbProxyAddress.Text, pPort);
proxyObject.Credentials = new System.Net.NetworkCredential(tbUsername.Text, tbPassword.Text, tbProxyDomain.Text);
WebClient.webUser myService = new coProxy.WebClient.webUser();
myService.Proxy = proxyObject;
try
{
DateTime dt = myService.SyncDB();
AddLinesTextbox("2. Webservice Connection success ");
AddLinesTextbox("2. Server time: " + dt.ToLongDateString());
}
catch (Exception ex)
{
AddLinesTextbox("2. Webservice Connection failed");
AddLinesTextbox("2. " + ex.ToString());
}
}
Error Messages
***************************
1. Webservice Auto Detect Proxy Connection failed
***************************
1. System.Net.WebException: The operation has timed out at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at coProxy.WebClient.webUser.SyncDB()
at coProxy.Form1.btnProxyAuto_Click(Object sender, EventArgs e)
***************************
2. Webservice Connection failed
***************************
2. System.Net.WebException: The operation has timed out
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)]
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at coProxy.WebClient.webUser.SyncDB()
at coProxy.Form1.btnProxyAndCredentials_Click(Object sender, EventArgs e)
|
|
|
|
|
Try getting the info from registry using the Microsoft.win32 package. U can read Registry keys from
HKCurrentUser\Software\Microsoft\Windows\CurrentVersion\Internet Settings
or
HKCurrentUser\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections\DefaultConnectionSettings (REG_BINARY)
This should give you the necessary information
|
|
|
|
|
Hi,
I am curious to know some of the popular .net based desktop apps out there ?
Thanks
My Findings:
============
Paint.net (win forms based)
Windows Live Writer (win forms based)
modified on Monday, June 16, 2008 2:38 PM
|
|
|
|
|
codeprojecter_ wrote: I am curious to know how many .net based desktop apps out there ?
178534.926
led mike
|
|
|
|
|