|
Add the "@"-sign before the connectionstring, e.g.;
conn=@"computer name/Sqlexpress"
--edit--
and turn that backslash around;
conn=@"computer name\Sqlexpress;
Initial Catalog=myDataBase;
User Id=myUsername;
Password=myPassword;"
I are Troll
|
|
|
|
|
Hi guys,
I am writing a C# app with Visual studio 2008 professional and .NET 3.5 on an XP SP2 box
I build an MSI installer and install it on a target machine (XP or Vista, same problem)
The install specifies 'All users'
I can start the app from other accounts than the one who installed it, but if the password changes, I cannot start it anymore
(get a message saying 'XYZ encountered a problem and must close... Send a report to Microsoft)
Does someone have an idea of what I am doing wrong?
Thenks
Andre
|
|
|
|
|
Dear All Gurus!
I have created a windows service that runs perfect when i use installUtil.exe but produce following error when i try to make it like self install like thing.
Error 1053: The service did not respond to the start or control request in a timely fashion.
i read self install technique from this Windows Services Can Install Themselves article, the author of the article is bit busy and not responding to my messages please help me.
Khayyam Sikander
|
|
|
|
|
|
Dear Aman Bhullar,
this link is not working...
Khayyam
|
|
|
|
|
|
Thanks for help
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
|
|
|
|
|
sir
pls help me
i want to change label or textbox text at runtime form on vb.net
thx
|
|
|
|
|
what is the problem in changing the text.
Just use the "Text" Property of control to get/set the Text
|
|
|
|
|
labelName.Text = "WHATEVER YOU WANT"
Humble Programmer
|
|
|
|
|
this problem is not resolved by me .plz help me in this problem.
private void hSLFilterToolStripMenuItem_Click_1(object sender, EventArgs e)
{
// create filter
SaturationCorrection filter =new SaturationCorrection(0.1);
// apply the filter
System.Drawing.Bitmap Image = filter.Apply(image);
}
a nullreferance exception is occured in applying the filter
hope for good reply
|
|
|
|
|
fizza bib wrote: System.Drawing.Bitmap Image = filter.Apply(image);
Where the image object is declared and Initialized
|
|
|
|
|
Thanks sir for your kind reply.
Image is placed in Form1's picturebox.
i am waiting for ur reply.
|
|
|
|
|
Thanks sir for your kind reply.
Image is placed in Form1's picturebox.
i am waiting for ur reply.
/////////best regards
Fizza Bibi
|
|
|
|
|
I am looking to lock my usb pen drive. It should ask for password when i try to open the file in the usb pen drive. Is there any way I can do this using vb.net or c#.
|
|
|
|
|
I do not know a programmatic way to do what you want. Someone else may come along who does, but in case not:
1) TrueCrypt has a tutorial here[^] on how to do it with their software, which I believe is free.
2) Zip the confidential data in a password protected *.zip file. There are several free Zip Libraries for .NET. (google)
3) Get a U3 enabled drive such as this[^] one which comes with security enabled. The link is a UK one, but it is the drive that you should look at.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
use the cryptography namespace to encrypt the file on the pen-drive?
|
|
|
|
|
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.
|
|
|
|