|
There is no method to do with without writing an extension to NTFS, which you can't do in VB.NET or C#.
|
|
|
|
|
Hi,
I am facing a great problem to make my windows service install itself without installUtil.exe. i read the article Windows Services Installing Themselves but i didnt understand some of the steps. like the code is given and instructed that make a cs file in the service executable project. should i need to have a second project in my windows service project or executable project is the one windows service project. i tried making file in windows service project but got some unexpecetd results.
in the above article i also got a code for main() function where should i put it. coz in my service project there is already a code in the main which is actually starting the service.
please advise, i am very upset.
Khayyam Sikander
|
|
|
|
|
If you are faceing any problem related with some article, the best place to ask the query is the Discussion Board for that article. Author can response you the best as early as possible.
Thanks !
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Dear Abhijit Jana,
I posted already 4 messages there but no body is replying me i am in a great trouble.
Thanks for reply
Khayyam Sikander
|
|
|
|
|
Thanks
I got the solution please follow this link
<a href="http://cavemansblog.wordpress.com/2008/06/19/installing-dotnet-windows-services-the-easiest-way/">http://cavemansblog.wordpress.com/2008/06/19/installing-dotnet-windows-services-the-easiest-way/</a>
Thanks
|
|
|
|
|
Hi,
Nowaday I'm working on .net remoting and I've got some problem with leasing.
there is my code:
public class X : MarshalByRefObject
{
public int x;
public X()
{
Console.WriteLine("some X object is done...");
}
public void PrintAboutMe()
{
ILease itfILease = (ILease)RemotingServices.GetLifetimeService(this);
Console.WriteLine("CurrentState: " + itfILease.CurrentState);
Console.WriteLine("InitialLeaseTime: " + itfILease.InitialLeaseTime.Minutes +
":" + itfILease.InitialLeaseTime.Seconds);
Console.WriteLine("CurrentLeaseTime: " + itfILease.CurrentLeaseTime.Minutes +
":" + itfILease.CurrentLeaseTime.Seconds);
Console.WriteLine("RenewOnCallTime: " + itfILease.RenewOnCallTime.Minutes +
":" + itfILease.RenewOnCallTime.Seconds);
Console.WriteLine("SponsorShipTime: " + itfILease.SponsorshipTimeout.Minutes +
":" + itfILease.SponsorshipTimeout.Seconds);
Console.WriteLine("x = " + x);
}
public override object InitializeLifetimeService()
{
ILease itfLease = (ILease)base.InitializeLifetimeService();
if (itfLease.CurrentState == LeaseState.Initial)
{
itfLease.InitialLeaseTime = TimeSpan.FromSeconds(10);
itfLease.RenewOnCallTime = TimeSpan.FromSeconds(6);
itfLease.SponsorshipTimeout = TimeSpan.FromSeconds(6);
}
return itfLease;
}
public void IncrementX()
{
x++;
Console.WriteLine("\nIncrement x member ...\n");
}
public void ChangeLifetime()
{
ILease itfILease = (ILease)RemotingServices.GetLifetimeService(this);
itfILease.Renew(TimeSpan.FromSeconds(20));
}
}
public class MySponsor : MarshalByRefObject, ISponsor
{
public TimeSpan Renewal(ILease il)
{
Console.WriteLine("I've been asked to renew the lease.");
return TimeSpan.FromSeconds(20);
}
}
public static void Main(string[] args)
{
HttpChannel c = new HttpChannel(null,
new BinaryClientFormatterSinkProvider(),
null);
ChannelServices.RegisterChannel(c);
RemotingConfiguration.RegisterActivatedClientType(
typeof(X), "http://localhost:667");
X x = new X();
Console.WriteLine("Client runs...");
x.x = 8;
x.PrintAboutMe();
ILease serverLease = (ILease)RemotingServices.GetLifetimeService(x);
MySponsor sponsor = new MySponsor();
serverLease.Register(sponsor);
x.IncrementX();
Thread.Sleep(8000);
x.ChangeLifetime();
x.PrintAboutMe();
Console.ReadKey();
}
static void Main(string[] args)
{
BinaryServerFormatterSinkProvider serverProv = new BinaryServerFormatterSinkProvider();
serverProv.TypeFilterLevel = System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;
IDictionary props = new Hashtable();
props["port"] = 667;
HttpChannel c = new HttpChannel(props,
null,
serverProv);
ChannelServices.RegisterChannel(c );
RemotingConfiguration.RegisterActivatedServiceType(
typeof(X));
Console.WriteLine("Server runs...");
Console.ReadKey();
}
My first question is:
Whay I can't change CurrentLeaseTime via any way? I think when I increment x member it should change my remote object lease time. I receive the same result when I'm trying to change it by ChangeLifetime() method and even my Sponsor doesn't seem to work.
My second question:
Is any way to catch client remote object on server side? I mean I want to have got a references to client objects.
Thank You in advance!
|
|
|
|
|
For the first question, this code runs fine for me and the lease is being successfully renewed.
For the second question, you already are, when you run this code the client is interacting with the remote (ie. proxy) object and the actual object exists and is even outputting text onto the Server's console.
I haven't done much with remoting, but that's my two cents, hope it helps.
|
|
|
|
|
I'd like to thank you for help, I found the solution for first problem... I didn't know that:
current lease time = MAX(lease time - expired time,renew on call time)<br /> source: http://msdn.microsoft.com/en-us/magazine/cc300474.aspx
2.
You wrote:
"and the actual object exists and is even outputting text onto the Server's console"
yes, I know but I'd like to have a reference to this object (I want to communicate with it), this remote object is working fine (object is created and managed by client) but everything is working on "background". I have got a primitive way to comunicate with every object by static class members but it's not exactly what I want to.
|
|
|
|
|
For the first response, neither did I! I just changed the renewed lease time to 5 days so I could easily see it was working.
For the second, I agree it sounds less than ideal, but I'm not sure how else you would do it. Maybe your design could change a little? Perhaps the client-side object can quietly "phone home" asychronously for some new info? Perhaps the client-side object could raise an event that you handle on the server?
|
|
|
|
|
My query is can we design workflows from stored procedure, and if so then how???
Thank youn
|
|
|
|
|
i am trying to load visual studio 2005/2008 on my computer but i am getting an error " suite integration toolkit has encountered an error and needs to close" but i don't get any error while loading visual studio 2003...i have tried searching on the net but i couldn't find any satisfactory answer. PLZ help.
|
|
|
|
|
Is anybody using Dotfuscator Community edition?I have referenced a dll in one of my project i obfuscated that dll.But the problem is, after obfuscation as u know it'll change the naming of properties and methods in that referenced dll so the project referencing that dll won't work as before because of that renaming of methods and properties.How can i solve that problem?Any help would be appreciated.
|
|
|
|
|
I solved that.
While dotfuscation do it for both exe and Dll.
|
|
|
|
|
Hi
I connect to oracle database with a dll file
My friend has a service
He wants to connect to my dll and use it !
1) I can not share my drive !
2) He can not reference from my dll !
reflection is our solution.
I don't know about assembly & it's settings.
|
|
|
|
|
We using a .net platform language called dimensions. Can anyone get the function from vb.net (Tooltip function) that allows to insert a text, so when the mouse hovers over the field it gives a brief description
|
|
|
|
|
In VB.NET, all you do is drop a ToolTip control on the form, then the TextBox control gets a new property called, oddly enough, ToolTip. All you do is set the text of the ToolTip property and your done.
|
|
|
|
|
Its not that easy. its a new language dimensions,and dont have that as a property.
|
|
|
|
|
I assume that the dimensions vendor has a support forum - that's your best place for an answer.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
When I call the webservice method from my class synchronously or assynchronously i am receiving the following error:
(System.NullReferenceException: Object reference not set to an instance)
I am being able to call the loadWindow webservice method without any problem but when i pass the dataset as parameter in the saveWindow im receiving the error above. Any solution will be appreciated.
<pre>
private void SaveData()
{
try
{
SYS_WS sysws = new SYS_WS();
sysws.SaveWindowCompleted +=new SaveWindowCompletedEventHandler(sysws_SaveWindowCompleted);
sysws.SaveWindowAsync((SYSDataset)dsSystem.GetChanges());
}
catch (Exception ex)
{
throw (ex);
}
}
private void sysws_SaveWindowCompleted(object sender,
SaveWindowCompletedEventArgs e)
{
try
{
if (e.Error != null)
{
return;
}
this.dsSystem.AcceptChanges();
}
catch (Exception ex)
{
throw ex;
}
}
[WebMethod(EnableSession = true)]
public bool SaveWindow(SYSDataset ds)
{
try
{
WindowController cont = new WindowController();
cont.SaveWindows(ds);
return true;
}
catch (Exception ex)
{
throw (ex);
}
}
[WebMethod(EnableSession = true)]
public SYSDataset LoadWindow(string WindowID)
{
WindowController cont = new WindowController();
return cont.LoadWindow(WindowID);
}
</pre>
|
|
|
|
|
I have a gsm modem sim300.
When I connect it to computer and type at or ate1 in hyperterminal the result is "OK", but when I type any other prompt like at+cpin or at+cmgs the result is "error".
Can any one Help me?
|
|
|
|
|
you're not allowed to spam the forums: you should choose the most appropriate forum for your problem, post your question there and only there.
|
|
|
|
|
hi i m final yr student of BE .mujhe remote desktop pe report submit karne hai...can u help pe
|
|
|
|
|
Well, you could try phrasing your question using words that people can actually understand. I appreciate that English may not be your first language, but posting this as if it were a mobile SMS message is unlikely to get a useful response.
|
|
|
|
|
Ask your question in pure English so that everybody can understand.
|
|
|
|
|
Presently considering a project to modify existing bluetooth wireless voice command code for a device that may or may not involve windows mobile. I write to inquire about the following:
- A wireless voice command application by definition would not need user buttons or physical interaction. Is there some additional tool that would facilitate such a development?
- If the intended device is not a windows mobile device is the application form appropriate? What options exist for a multiplatform workspaces for Visual Basic 2008 and/or Visual Studio Professional 2005?
Much thanks for guidance on this topic
|
|
|
|